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
|
PYTHON ?= python3
TOX ?= tox
COVERAGE ?= coverage
build:
$(TOX) run -m build
install: clean
$(PYTHON) -m pip install --editable .
clean:
$(PYTHON) setup.py clean
rm -rf build
rm -f src/smartcard/scard/_scard*.so
pypi: clean
# files generated by swig
rm -f src/smartcard/scard/scard.py
rm -f src/smartcard/scard/scard_wrap.c
rm -rf dist
# Use the tox 'build' label to generate wheels for all Python versions.
$(TOX) run -m build
python3 -m twine upload dist/*
test:
pytest --verbose
test_parallel:
pytest --parallel-threads=10 --iterations=10 --verbose
coverage:
$(COVERAGE) erase
$(COVERAGE) run -m pytest
$(COVERAGE) combine
$(COVERAGE) report
$(COVERAGE) html
pylint:
$(PYTHON) -m pylint smartcard
cd test ; $(PYTHON) -m pylint .
cd src/smartcard/Examples ; $(PYTHON) -m pylint --ignore wx .
cd src/smartcard/test ; $(PYTHON) -m pylint .
ChangeLog.git:
git log --stat --decorate=short > $@
.PHONY: sync-docs
sync-docs: clean
$(TOX) -e docs
rsync \
--recursive --verbose --update --rsh=ssh --links \
build/docs/ \
ludov@web.sourceforge.net:/home/project-web/pyscard/htdocs/
.PHONY: clean build pypi test
|