Commit

Minor changes to Makefile and .travis.yml
Daniel Moch committed 5 years ago (Tree)

Diffstat

 {{cookiecutter.project_slug}}/.travis.yml | 1 -
 {{cookiecutter.project_slug}}/Makefile | 13 ++++++++-----

{{cookiecutter.project_slug}}/.travis.yml

17 17 - PIPENV_HIDE_EMOJIS=1 PIPENV_NO_INHERIT=1
18 18
19 19 install:
20 - - pip install pipenv python-coveralls
21 20 - make test-install
22 21
23 22 jobs:

{{cookiecutter.project_slug}}/Makefile

24 24 endef
25 25 export PRINT_HELP_PYSCRIPT
26 26
27 -BROWSER := python -c "$$BROWSER_PYSCRIPT"
27 +PYTHON := python
28 +PIP := pip
29 +BROWSER := $(PYTHON) -c "$$BROWSER_PYSCRIPT"
28 30 PIPENV := pipenv
29 31 PIPRUN := $(PIPENV) run
30 32 PIPINST := $(PIPENV) --bare install --dev --skip-lock
31 33
32 34 help:
33 - @python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)
35 + @$(PYTHON) -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)
34 36
35 37 clean: clean-build clean-pyc clean-test ## remove all build, test, coverage and Python artifacts
36 38
. . .
58 60 $(PIPRUN) pylint {{ cookiecutter.project_slug }} tests --disable=parse-error
59 61
60 62 test: ## run tests quickly with the default Python
61 - $(PIPRUN) python -m pytest
63 + $(PIPRUN) $(PYTHON) -m pytest
62 64
63 65 test-all: ## run tests on every Python version with tox
64 66 $(PIPRUN) tox
65 67
66 68 test-install: ## install dependenices from Pipfile (for tox / CI builds)
69 + $(PYTHON) -m $(PIP) install --upgrade pip pipenv python-coveralls
67 70 $(PIPINST)
68 71
69 72 coverage: ## check code coverage quickly with the default Python
70 - $(PIPRUN) python -m pytest --cov={{ cookiecutter.project_slug }}
73 + $(PIPRUN) $(PYTHON) -m pytest --cov={{ cookiecutter.project_slug }}
71 74 $(PIPRUN) coverage report -m
72 75
73 76 coverage-html: coverage ## generate an HTML report and open in browser
. . .
90 93 $(PIPRUN) flit install --deps=none
91 94
92 95 run: ## run the package from site-packages
93 - $(PIPRUN) python -m {{ cookiecutter.project_slug }} $(cmd)
96 + $(PIPRUN) $(PYTHON) -m {{ cookiecutter.project_slug }} $(cmd)
94 97
95 98 debug: install ## debug the package from site packages
96 99 $(PIPRUN) pudb3 $$($(PIPRUN) which {{ cookiecutter.project_slug }}) $(cmd)