-
Notifications
You must be signed in to change notification settings - Fork 84
/
Makefile
82 lines (65 loc) · 2.3 KB
/
Makefile
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Package list, in order of ancestry
# removed pytest-qt-app
EXTRA_DEPS = setuptools-git \
pytest-timeout \
pypandoc \
wheel \
coverage \
python-jenkins \
redis \
pymongo \
psycopg2-binary\
boto3 \
docker \
kubernetes
COPY_FILES = VERSION CHANGES.md common_setup.py MANIFEST.in LICENSE
UPLOAD_OPTS =
PYPI_INDEX =
PIP_INSTALL_ARGS := $(shell [ ! -z "${PYPI_INDEX}" ] && echo --index ${PYPI_INDEX} )
# removed from PHONY: circleci_sip circleci_pyqt
.PHONY: extras copyfiles wheels eggs sdists install develop test upload clean
extras:
pip install ${PIP_INSTALL_ARGS} ${EXTRA_DEPS}
copyfiles:
./foreach.sh 'for file in ${COPY_FILES}; do cp ../$$file .; done'
wheels: copyfiles
pip install ${PIP_INSTALL_ARGS} -U wheel
./foreach.sh --changed 'python setup.py bdist_wheel'
eggs: copyfiles
./foreach.sh --changed 'python setup.py bdist_egg'
sdists: copyfiles
./foreach.sh --changed 'python setup.py sdist'
install: copyfiles
pip install ${PIP_INSTALL_ARGS} -U wheel
./foreach.sh 'python setup.py bdist_wheel'
./foreach.sh 'pip install ${PIP_INSTALL_ARGS} dist/*.whl'
develop: copyfiles extras
./foreach.sh 'pip install ${PIP_INSTALL_ARGS} -e.[tests]'
test:
rm -f FAILED-*
./foreach.sh 'DEBUG=1 python setup.py test -sv -ra || touch ../FAILED-$$PKG'
bash -c "! compgen -G 'FAILED-*'"
test-ci:
rm -f FAILED-*
mkdir junit
./foreach.sh 'cat *.egg-info/top_level.txt | xargs -Ipysrc coverage run -p --source=pysrc -m pytest --junitxml junit.xml -svvvv -ra || touch ../FAILED-$$PKG'
./foreach.sh 'cp junit.xml ../junit/junit-$PKG.xml || true'
list-test-failures:
@if compgen -G 'FAILED-*' > /dev/null; then \
echo "Error: Found failure artifacts:"; \
compgen -G 'FAILED-*'; \
exit 1; \
else \
echo "No failure artifacts found."; \
fi
upload:
pip install twine
./foreach.sh --changed '[ -f common_setup.py ] && twine upload $(UPLOAD_OPTS) dist/*'
clean:
./foreach.sh 'rm -rf build dist *.xml *.egg-info .eggs htmlcov .cache $(COPY_FILES)'
rm -rf pytest-pyramid-server/vx pip-log.txt
find . -name *.pyc -delete
find . -name .coverage -delete
find . -name .coverage.* -delete
rm -f FAILED-*
all: extras develop test