File: rules

package info (click to toggle)
pyfai 0.21.3%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 89,640 kB
  • sloc: python: 51,853; lisp: 7,445; sh: 226; ansic: 165; makefile: 108
file content (46 lines) | stat: -rwxr-xr-x 1,594 bytes parent folder | download
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 DH_VERBOSE=1

export PYBUILD_NAME=pyfai
#export PYBUILD_SYSTEM=distutils
export PYBUILD_AFTER_INSTALL=rm -rf {destdir}/usr/bin/
# to remove once the pocl bug is solved
# https://github.com/silx-kit/pyFAI/issues/1319
export PYFAI_OPENCL=False

# get the default python3 interpreter version
PY3VER := $(shell py3versions -dv)

%:
	dh $@ --buildsystem=pybuild

execute_after_dh_clean:
	rm -f $(patsubst %.pyx,%.c,$(wildcard pyFAI/ext/*.pyx))
	rm -rf doc/build/html
	rm -rf build/man
	rm -rf *.egg-info
	rm -f all_testimage.json fai_cfg.json lima_cfg.json profile.log

override_dh_auto_build-arch:
	dh_auto_build

override_dh_auto_build-indep: override_dh_auto_build-arch
	-dh_auto_build -- -s custom -p $(PY3VER) --build-args="PYTHONPATH={build_dir} xvfb-run -a --server-args=\"-screen 0 1024x768x24\" {interpreter} setup.py build_man"

ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	dh_auto_build -- -s custom -p $(PY3VER) --build-args="cd doc && env PYTHONPATH={build_dir} {interpreter} -m sphinx -N -bhtml source build/html"
endif

override_dh_auto_test:
	dh_auto_test -- -s custom --test-args="PYTHONPATH={build_dir} WITH_QT_TEST=False PYFAI_TESTIMAGES=testimages PYFAI_DATA=$(shell pwd) xvfb-run -a --server-args=\"-screen 0 1024x768x24\" {interpreter} ./run_tests.py -v --low-mem --installed"

execute_after_dh_install:
	# install scripts into pyfai
	python3 setup.py install_scripts -d debian/pyfai/usr/bin

execute_after_dh_installman:
	dh_installman -p pyfai build/man/*.1

execute_after_dh_installdocs:
	dh_installdocs -p python-pyfai-doc "doc/build/html"