You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.6 KiB

  1. .PHONY: info build shell py2 py3 test ftest publish
  2. info:
  3. @echo ""
  4. @echo "Available Make Commands"
  5. @echo ""
  6. @echo "build: builds the image"
  7. @echo "shell: starts a bash shell in the container
  8. @echo "py2: maps ~/Documents/nd2s to /var/nd2s and runs a Python 2.7 interpreter"
  9. @echo "py3: maps ~/Documents/nd2s to /var/nd2s and runs a Python 3.4 interpreter"
  10. @echo "test: runs all unit tests (in Python 3.4)"
  11. @echo "ftest: runs all functional tests (requires specific ND2 files that are not publicly available"
  12. @echo "publish: publishes the code base to PyPI (maintainers only)"
  13. @echo ""
  14. build:
  15. docker build -t jimrybarski/nd2reader .
  16. shell:
  17. xhost local:root; docker run --rm -v ~/nd2s:/var/nd2s -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix$(DISPLAY) -it jimrybarski/nd2reader bash
  18. py2:
  19. xhost local:root; docker run --rm -v $(CURDIR):/opt/nd2reader -v ~/nd2s:/var/nd2s -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix$(DISPLAY) -it jimrybarski/nd2reader python2.7
  20. py3:
  21. xhost local:root; docker run --rm -v $(CURDIR):/opt/nd2reader -v ~/nd2s:/var/nd2s -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix$(DISPLAY) -it jimrybarski/nd2reader python3.4
  22. test: build
  23. docker run --rm -v $(CURDIR):/opt/nd2reader -it jimrybarski/nd2reader python3.4 test.py
  24. docker run --rm -v $(CURDIR):/opt/nd2reader -it jimrybarski/nd2reader python2.7 test.py
  25. ftest: build
  26. docker run --rm -v $(CURDIR):/opt/nd2reader -v ~/nd2s:/var/nd2s -it jimrybarski/nd2reader python3.4 /opt/nd2reader/ftest.py
  27. docker run --rm -v $(CURDIR):/opt/nd2reader -v ~/nd2s:/var/nd2s -it jimrybarski/nd2reader python2.7 /opt/nd2reader/ftest.py
  28. publish:
  29. python setup.py sdist upload -r pypi