diff options
| author | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2020-03-06 15:57:16 +0000 |
|---|---|---|
| committer | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2020-03-06 15:57:16 +0000 |
| commit | b2bb3ac54bb5887d12a89f4009e29fff914fe42a (patch) | |
| tree | e2c84125a7bf7857703f5fa3173193c3d2ce7f8b | |
| parent | Add release script (diff) | |
| download | pygensvm-b2bb3ac54bb5887d12a89f4009e29fff914fe42a.tar.gz pygensvm-b2bb3ac54bb5887d12a89f4009e29fff914fe42a.zip | |
Update Makefile to current workflow
| -rw-r--r-- | Makefile | 56 |
1 files changed, 25 insertions, 31 deletions
@@ -5,9 +5,10 @@ # http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html PACKAGE=gensvm -DOC_DIR='./docs/' +DOC_DIR=./docs/ +VENV_DIR=/tmp/gensvm_venv -.PHONY: help cover +.PHONY: help cover dist venv .DEFAULT_GOAL := help @@ -24,43 +25,36 @@ install: ## Install for the current user using the default python command python setup.py build_ext --inplace python setup.py install --user -install2: ## Install for the current user using the python2 command - python2 setup.py build_ext --inplace - python2 setup.py install --user +test: venv ## Run nosetests using the default nosetests command + source $(VENV_DIR)/bin/activate && green -a -vv -f -test: in ## Run nosetests using the default nosetests command - green -vvv -f +develop: ## Install a development version of the package needed for testing + python setup.py develop --user -test2: ## Run nosetests using the nosetests2 command - python2 setup.py build_ext -i - nosetests2 -v +dist: ## Make Python source distribution + python setup.py sdist -cover: test ## Test unit test coverage using default nosetests - nosetests --with-coverage --cover-package=$(PACKAGE) \ - --cover-erase --cover-inclusive --cover-branches \ - --cover-html --cover-html-dir=cover +docs: doc +doc: venv ## Build documentation with Sphinx + source $(VENV_DIR)/bin/activate && $(MAKE) -C $(DOC_DIR) html clean: ## Clean build dist and egg directories left after install - rm -rf ./dist ./build ./$(PACKAGE).egg-info - rm -rf gensvm/cython_wrapper/*.so + rm -rf ./dist + rm -rf ./build + rm -rf ./$(PACKAGE).egg-info + rm -rf ./cover + rm -rf $(VENV_DIR) rm -f MANIFEST + rm -f ./$(PACKAGE)/cython_wrapper/*.so $(MAKE) -C ./src/gensvm clean + find . -type f -iname '*.pyc' -delete + find . -type d -name '__pycache__' -empty -delete cleaner: clean rm -f ./src/wrapper.c +venv: $(VENV_DIR)/bin/activate -develop: ## Install a development version of the package needed for testing - python setup.py develop --user - -develop2: ## Install a development version of the package needed for testing (python2) - python2 setup.py develop --user - -dist: ## Make Python source distribution - python setup.py sdist - -dist2: ## Make Python 2 source distribution - python2 setup.py sdist - -docs: doc -doc: ## Build documentation with Sphinx - poetry run $(MAKE) -C $(DOC_DIR) html +$(VENV_DIR)/bin/activate: + test -d $(VENV_DIR) || virtualenv $(VENV_DIR) + source $(VENV_DIR)/bin/activate && pip install -e .[dev] + touch $(VENV_DIR)/bin/activate |
