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
|
#!/usr/bin/make -f
export PYBUILD_NAME=freesas
# Make does not offer a recursive wildcard function, so here's one:
rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2))
# How to recursively find all files with the same name in a given folder
ALL_PYX := $(call rwildcard,freesas/,*.pyx)
#NOTA: No space before *
%:
dh $@ --with python3,sphinxdoc --buildsystem=pybuild
override_dh_clean:
dh_clean
# remove the cython generated file to force rebuild
rm -f $(patsubst %.pyx,%.cpp,${ALL_PYX})
rm -f $(patsubst %.pyx,%.c,${ALL_PYX})
rm -f $(patsubst %.pyx,%.html,${ALL_PYX})
rm -rf build/html
rm -rf build/man
rm -rf *.egg-info
override_dh_auto_build:
dh_auto_build
python3 setup.py build build_man build_doc
override_dh_install:
dh_numpy3
# move the scripts to right package
dh_install -p freesas debian/python3-freesas/usr/bin/* usr/bin
rm -rf debian/python3-freesas/usr/bin
dh_install
override_dh_auto_test:
dh_auto_test -- -s custom --test-args="env PYTHONPATH={build_dir} FREESAS_TESTDATA=testimages WITH_QT_TEST=False {interpreter} run_tests.py -v"
override_dh_installman:
dh_installman -p freesas build/man/*.1
override_dh_sphinxdoc:
python3 setup.py build build_man build_doc
dh_installdocs "build/sphinx/html" -p python-freesas-doc --doc-main-package=python3-freesas
dh_sphinxdoc -O--buildsystem=pybuild
|