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
|
#!/usr/bin/make -f
export DH_VERBOSE=1
export PYBUILD_NAME=freesas
export PYBUILD_SYSTEM=pyproject
# 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,src,*.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_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=../testdata {interpreter} run_tests.py -v"
override_dh_installdocs:
python3 build-doc.py
dh_installdocs "build/sphinx" -p freesas-doc
dh_installdocs
|