File: rules

package info (click to toggle)
pynx 2025.1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 38,288 kB
  • sloc: python: 53,283; lisp: 6,474; ansic: 1,186; makefile: 210; sh: 40
file content (37 lines) | stat: -rwxr-xr-x 1,249 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

export DH_VERBOSE=1

# How to recursively find all files with the same name in a given folder
rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2))
ALL_PYX := $(call rwildcard,pynx/,*.pyx)
#NOTA: No space before *

export PYBUILD_AFTER_INSTALL=rm -rf {destdir}/usr/bin/ {destdir}/usr/pynx/
export PYBUILD_DISABLE=test
export PYBUILD_NAME=pynx

%:
	dh $@ --buildsystem=pybuild


execute_after_dh_clean:
	rm -f $(patsubst %.pyx,%.c,${ALL_PYX})

execute_after_dh_auto_install:
        # install scripts
	python3 setup.py install_scripts -d debian/pynx/usr/bin

override_dh_auto_test: export http_proxy=127.0.0.1:9
override_dh_auto_test: export https_proxy=127.0.0.1:9
override_dh_auto_test:
	dh_auto_test -- -s custom --test-args="PYTHONPATH={build_dir} {interpreter} pynx/scripts/pynx_test.py"

override_dh_sphinxdoc:
# do not build until sphinx_link is available in Debian
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	PYBUILD_SYSTEM=custom \
	PYBUILD_BUILD_ARGS="cd doc && PYTHONPATH={build_dir} http_proxy='127.0.0.1:9' {interpreter} -m sphinx -N -bhtml . build/html" dh_auto_build  # HTML generator
	dh_installdocs "doc/build/html" -p python-pynx-doc
	dh_sphinxdoc -O--buildsystem=pybuild
endif