File: rules

package info (click to toggle)
pyfai 2025.03-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 92,020 kB
  • sloc: python: 62,094; lisp: 8,286; sh: 347; ansic: 247; makefile: 135; xml: 69
file content (49 lines) | stat: -rwxr-xr-x 1,737 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
47
48
49
#!/usr/bin/make -f

export DH_VERBOSE=1
export PYBUILD_NAME=pyfai

# temporaty until this bug is closed
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1077205
DEB_CFLAGS_MAINT_APPEND = -Wno-error=incompatible-pointer-types
export DEB_CFLAGS_MAINT_APPEND

PY3VER := $(shell py3versions -dv)

# temporary until the 1/1/1970 issue is solved in debian stable
include /usr/share/dpkg/pkg-info.mk # sets SOURCE_DATE_EPOCH

%:
	dh $@ --buildsystem=pybuild

execute_after_dh_clean:
	rm -f $(patsubst %.pyx,%.c,$(wildcard pyFAI/ext/*.pyx))
	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:
	PYBUILD_BUILD_ARGS="-Ccompile-args=--verbose" dh_auto_build

override_dh_auto_build-indep: override_dh_auto_build-arch
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	env PYTHONPATH=$(shell pybuild --build -i $(PY3VER) -s custom --build-args 'echo {build_dir}') \
	SPHINXBUILD="$(PY3VER) -m sphinx" \
	SPHINXOPTS="-D mathjax_path=MathJax.js" \
	sphinx-build -N -bhtml doc/source build/html
endif

# no test during build, only autopkgtest
override_dh_auto_test:

execute_after_dh_auto_install:
	dh_install -p pyfai debian/python3-pyfai/usr/bin /usr
	rm -rf debian/python3-pyfai/usr/bin
	dh_install -p pyfai applications/*.desktop /usr/share/applications/
	dh_install -p pyfai applications/*.xml /usr/share/metainfo
	dh_install -p pyfai doc/source/img/pyFAI-calib2.png /usr/share/icons/hicolor/48x48/apps
	dh_install -p pyfai doc/source/img/pyFAI-diffmap.png /usr/share/icons/hicolor/48x48/apps
	dh_install -p pyfai doc/source/img/pyFAI-integrate.png /usr/share/icons/hicolor/48x48/apps

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