cookiecutter-flit

A Cookiecutter template for a Flit package
git clone git://git.danielmoch.com/cookiecutter-flit.git
Log | Files | Refs | LICENSE

commit a64ff5190957e68a48b4eeed6137580db6f9d8eb
parent 4da21073897e5fbc7be1a107aff921072a4e7ce8
Author: Daniel Moch <daniel@danielmoch.com>
Date:   Sat, 15 Sep 2018 22:00:02 -0400

Minor changes to Makefile and .travis.yml

Diffstat:
M{{cookiecutter.project_slug}}/.travis.yml | 1-
M{{cookiecutter.project_slug}}/Makefile | 13++++++++-----
2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/{{cookiecutter.project_slug}}/.travis.yml b/{{cookiecutter.project_slug}}/.travis.yml @@ -17,7 +17,6 @@ env: - PIPENV_HIDE_EMOJIS=1 PIPENV_NO_INHERIT=1 install: - - pip install pipenv python-coveralls - make test-install jobs: diff --git a/{{cookiecutter.project_slug}}/Makefile b/{{cookiecutter.project_slug}}/Makefile @@ -24,13 +24,15 @@ for line in sys.stdin: endef export PRINT_HELP_PYSCRIPT -BROWSER := python -c "$$BROWSER_PYSCRIPT" +PYTHON := python +PIP := pip +BROWSER := $(PYTHON) -c "$$BROWSER_PYSCRIPT" PIPENV := pipenv PIPRUN := $(PIPENV) run PIPINST := $(PIPENV) --bare install --dev --skip-lock help: - @python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST) + @$(PYTHON) -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST) clean: clean-build clean-pyc clean-test ## remove all build, test, coverage and Python artifacts @@ -58,16 +60,17 @@ lint: ## check style with pylint $(PIPRUN) pylint {{ cookiecutter.project_slug }} tests --disable=parse-error test: ## run tests quickly with the default Python - $(PIPRUN) python -m pytest + $(PIPRUN) $(PYTHON) -m pytest test-all: ## run tests on every Python version with tox $(PIPRUN) tox test-install: ## install dependenices from Pipfile (for tox / CI builds) + $(PYTHON) -m $(PIP) install --upgrade pip pipenv python-coveralls $(PIPINST) coverage: ## check code coverage quickly with the default Python - $(PIPRUN) python -m pytest --cov={{ cookiecutter.project_slug }} + $(PIPRUN) $(PYTHON) -m pytest --cov={{ cookiecutter.project_slug }} $(PIPRUN) coverage report -m coverage-html: coverage ## generate an HTML report and open in browser @@ -90,7 +93,7 @@ install: ## install the package to the active Python's site-packages $(PIPRUN) flit install --deps=none run: ## run the package from site-packages - $(PIPRUN) python -m {{ cookiecutter.project_slug }} $(cmd) + $(PIPRUN) $(PYTHON) -m {{ cookiecutter.project_slug }} $(cmd) debug: install ## debug the package from site packages $(PIPRUN) pudb3 $$($(PIPRUN) which {{ cookiecutter.project_slug }}) $(cmd)