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
|
#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
# override HOME (for weave) and matplotlib config directory
# to allow building in chroots with read-only HOME
export HOME=$(CURDIR)/build
export MPLCONFIGDIR=$(HOME)
include /usr/share/python/python.mk
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
export OPT+=-O0
export FOPT+=-O0
endif
# one rule to rule them all ...
%:
# need to enforce distutils, since we also have a makefile
dh $@ --buildsystem=python_distutils --builddirectory=build
override_dh_auto_build:
: # Cython pyx sources
for f in */*.pyx; do cython $$f; done
dh_auto_build
echo "backend : Agg" >| build/matplotlibrc
: # and docs
PYTHONPATH=$(CURDIR)/$(call py_builddir_sh) \
$(MAKE) -C docs html
: # but remove jquery copy (later on link to Debian's version)
-rm build/html/_static/jquery.js
-rm build/html/_static/underscore.js
: # objects inventory is of no use for the package
-rm build/html/objects.inv
: # also doc source files only consume space
-rm -r build/html/_sources
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
for v in $(shell pyversions -vr); do \
echo "I: Running PyMC unittests using python$$v"; \
python$$v /usr/bin/nosetests -v -s --exclude='test_(interactive|gradients|LazyFunction|consistency|random|missing)' \
$(call py_builddir_sh, $$v)/pymc || exit 1 ;\
done
endif
override_dh_install:
dh_install
dh_numpy
## immediately useable documentation
## and exemplar data (they are small excerpts anyway)
override_dh_compress:
dh_compress -X.py -X.html -X.css -X.jpg -X.txt -X.js -X.json -X.rtc -X.par -X.bin
override_dh_auto_clean:
dh_auto_clean
for f in */*.pyx; do rm -f $${f%.pyx}.c; done
|