Debian Codegraph @

package/debian10/rules

raw
1 #!/usr/bin/make -f
2
3 export PYBUILD_NAME=freesas
4
5 # Make does not offer a recursive wildcard function, so here's one:
6 rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2))
7
8 # How to recursively find all files with the same name in a given folder
9 ALL_PYX := $(call rwildcard,freesas/,*.pyx)
10 #NOTA: No space before *
11
12 %:
13 dh $@ --with python3,sphinxdoc --buildsystem=pybuild
14
15 override_dh_clean:
16 dh_clean
17 # remove the cython generated file to force rebuild
18 rm -f $(patsubst %.pyx,%.cpp,${ALL_PYX})
19 rm -f $(patsubst %.pyx,%.c,${ALL_PYX})
20 rm -f $(patsubst %.pyx,%.html,${ALL_PYX})
21 rm -rf build/html
22 rm -rf build/man
23 rm -rf *.egg-info
24
25 override_dh_auto_build:
26 dh_auto_build
27 python3 setup.py build build_man build_doc
28 override_dh_install:
29 dh_numpy3
30
31 # move the scripts to right package
32 dh_install -p freesas debian/python3-freesas/usr/bin/* usr/bin
33 rm -rf debian/python3-freesas/usr/bin
34 dh_install
35
36 override_dh_auto_test:
37 dh_auto_test -- -s custom --test-args="env PYTHONPATH={build_dir} FREESAS_TESTDATA=testimages WITH_QT_TEST=False {interpreter} run_tests.py -v"
38
39 override_dh_installman:
40 dh_installman -p freesas build/man/*.1
41
42 override_dh_sphinxdoc:
43 python3 setup.py build build_man build_doc
44 dh_installdocs "build/sphinx/html" -p python-freesas-doc --doc-main-package=python3-freesas
45 dh_sphinxdoc -O--buildsystem=pybuild
46