forked from LudovicRousseau/PyKCS11
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (50 loc) · 1.19 KB
/
Copy pathMakefile
File metadata and controls
63 lines (50 loc) · 1.19 KB
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
59
60
61
62
63
# give some default values
ifeq (, $(PYTHON))
PYTHON=python3
endif
COVERAGE ?= python3-coverage
build:
$(PYTHON) -m build
constants:
mv PyKCS11/__init__.py PyKCS11/__init__.py.x
$(PYTHON) generate_constants.py > PyKCS11/constants.py
mv PyKCS11/__init__.py.x PyKCS11/__init__.py
install:
$(PYTHON) -m pip install --editable .
clean distclean:
$(PYTHON) setup.py clean
rm -f src/pykcs11_wrap.cpp
rm -f src/LowLevel.py
rm -rf build
rm -f *.pyc PyKCS11/*.pyc
rm -f PyKCS11/LowLevel.py
rm -f PyKCS11/_LowLevel*
rm -f build-stamp
rm -f test/*.pyc
find . -name .DS_Store -exec rm {} \;
src/pykcs11.i: src/opensc/pkcs11.h src/pkcs11lib.h src/pykcs11string.h src/ck_attribute_smart.h
touch $@
pypi: clean
rm -rf dist
$(PYTHON) -m build
$(PYTHON) -m twine upload dist/*
test:
$(PYTHON) run_pytest.py
coverage:
$(COVERAGE) erase
$(COVERAGE) run run_test.py
$(COVERAGE) report
$(COVERAGE) html
tox:
./get_PYKCS11LIB.py > tox.env
tox
pylint:
$(PYTHON) -m pylint PyKCS11
$(PYTHON) -m pylint samples
doc:
cd docs ; ./generate.sh
doc-upload: doc
rm -rf api
mv docs/_build/html api
scp -r api ludov@web.sourceforge.net:/home/project-web/pkcs11wrap/htdocs
.PHONY: build install clean doc test