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.
 
 
 
 

39 lines
1.1 KiB

  1. PYTHON ?= python3
  2. REQ_MINOR_VERSION = 6
  3. all : | env build
  4. @echo "Build complete! You can run dupeGuru with 'make run'"
  5. # If you're installing into a path that is not going to be the final path prefix (such as a
  6. # sandbox), set DESTDIR to that path.
  7. # Our build scripts are not very "make like" yet and perform their task in a bundle. For now, we
  8. # use one of each file to act as a representative, a target, of these groups.
  9. submodules_target = hscommon/__init__.py
  10. reqs :
  11. @ret=`${PYTHON} -c "import sys; print(int(sys.version_info[:2] >= (3, ${REQ_MINOR_VERSION})))"`; \
  12. if [ $${ret} -ne 1 ]; then \
  13. echo "Python 3.${REQ_MINOR_VERSION}+ required. Aborting."; \
  14. exit 1; \
  15. fi
  16. @${PYTHON} -m venv -h > /dev/null || \
  17. echo "Creation of our virtualenv failed. Something's wrong with your python install."
  18. # Ensure that submodules are initialized
  19. $(submodules_target) :
  20. git submodule init
  21. git submodule update
  22. env : | $(submodules_target) reqs
  23. @echo "Creating our virtualenv"
  24. ${PYTHON} -m venv env
  25. ./env/bin/python -m pip install -r requirements.txt
  26. build:
  27. ./env/bin/python build.py
  28. run:
  29. ./env/bin/python run.py
  30. .PHONY : reqs build run all