~javiljoen/lttb-numpy

lttb-numpy/Makefile -rw-r--r-- 1.2 KiB
9463159eJA Viljoen Remove builds.sr.ht script 1 year, 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.PHONY: help clean clean-all clean-pyc clean-build clean-caches lint test coverage test-all build upload

help:
	@echo "clean - remove Python file & build artifacts"
	@echo "lint - run linters to check the code style and formatting"
	@echo "test - run tests with the default Python"
	@echo "coverage - generate test coverage report with the default Python"
	@echo "test-all - run tests in multiple environments"
	@echo "build - package"
	@echo "upload - release package to PyPI"

clean: clean-build clean-pyc

clean-all: clean clean-caches

clean-build:
	rm -fr build/
	rm -fr dist/
	rm -fr src/*.egg-info

clean-pyc:
	find . -name '*.pyc' -exec rm -f {} +
	find . -name '*.pyo' -exec rm -f {} +
	find . -name '*~' -exec rm -f {} +
	find . -name __pycache__ -type d -exec rmdir {} +
	rm -fr .cache/

clean-caches:
	rm -fr .eggs/
	rm -fr .hypothesis/
	rm -fr .pytest_cache/
	rm -fr .tox/
	rm -fr htmlcov/

lint:
	flake8 src tests
	black --check .
	isort --check src tests
	pydocstyle src

test:
	pytest -n 2

coverage:
	coverage run -m pytest
	coverage html
	coverage erase

test-all:
	PYENV_VERSION="" tox -p 2

build: clean
	python setup.py sdist bdist_wheel
	ls -l dist

upload: build
	twine check dist/*
	twine upload dist/*