| 1 |
#!/usr/bin/make -f |
| 2 |
# -*- makefile -*- |
| 3 |
|
| 4 |
PY3VERS = $(shell py3versions -vs) |
| 5 |
|
| 6 |
%: |
| 7 |
dh $@ --with=python3,sphinxdoc --buildsystem=pybuild |
| 8 |
|
| 9 |
override_dh_clean: |
| 10 |
rm -rf openpyxl.egg-info openpyxl/formatting/tests/data/conditional-formatting.xlsx openpyxl/reader/tests/data/complex-styles.xlsx |
| 11 |
dh_clean |
| 12 |
|
| 13 |
override_dh_auto_build: |
| 14 |
cp -n debian/conditional-formatting.xlsx openpyxl/formatting/tests/data |
| 15 |
cp -n debian/complex-styles.xlsx openpyxl/reader/tests/data |
| 16 |
dh_auto_build |
| 17 |
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS))) |
| 18 |
cd doc && LC_ALL=C.UTF-8 sphinx-build -b html -d build/doctrees . build/html |
| 19 |
endif |
| 20 |
|
| 21 |
override_dh_auto_install: ${PY3VERS:%=python-install%} |
| 22 |
python-install%: |
| 23 |
python$* setup.py install --install-layout=deb --root=$(CURDIR)/debian/tmp |
| 24 |
|
| 25 |
override_dh_auto_test: ${PY3VERS:%=python-test%} |
| 26 |
python-test%: |
| 27 |
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) |
| 28 |
LC_ALL=C.UTF-8 python$* /usr/bin/py.test-3 openpyxl |
| 29 |
endif |
| 30 |
|
| 31 |
override_dh_installchangelogs: |
| 32 |
dh_installchangelogs doc/changes.rst |