VERSION := $(shell python setup.py --version)
export COVERAGE_RCFILE := pyproject.toml
export CIBW_ENVIRONMENT_PASS_LINUX := CFLAGS PIP_CONFIG_SETTINGS DEPENDENCY_INJECTOR_LIMITED_API
export PIP_CONFIG_SETTINGS ?= build_ext=-j4
export DEPENDENCY_INJECTOR_LIMITED_API ?= 1
export CFLAGS ?= -g0
clean:
find src -name '*.py[cod]' -delete
find src -name '__pycache__' -delete
find src -name '*.c' -delete
find src -name '*.h' -delete
find src -name '*.so' -delete
find src -name '*.html' -delete
find tests -name '*.py[co]' -delete
find tests -name '__pycache__' -delete
find examples -name '*.py[co]' -delete
find examples -name '__pycache__' -delete
build: clean
python setup.py build_ext --inplace
mkdir -p reports/cython/
find src -name '*.html' -exec mv {} reports/cython/ \;
docs-live:
sphinx-autobuild docs docs/_build/html
install: uninstall clean build
pip install -ve .
uninstall:
- pip uninstall -y -q dependency-injector 2> /dev/null
test:
coverage erase
coverage run -m pytest
coverage report
coverage html
check:
flake8 src/dependency_injector/
flake8 examples/
pydocstyle src/dependency_injector/
pydocstyle examples/
mypy tests/typing
test-publish: build
python -m build --sdist
twine upload --repository testpypi dist/dependency-injector-$(VERSION)*
publish:
git checkout master
git merge --no-ff release/$(VERSION) -m "Merge branch 'release/$(VERSION)' into master"
git push origin master
git tag -a $(VERSION) -m 'version $(VERSION)'
git push --tags
wheels:
cibuildwheel --output-dir wheelhouse