File: rules

package info (click to toggle)
xrayutilities 1.7.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 12,452 kB
  • sloc: python: 29,264; ansic: 4,232; makefile: 23
file content (36 lines) | stat: -rwxr-xr-x 1,216 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
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS=hardening=+all

# copy the tests to the build dir to be able to pass nose
export PYBUILD_NAME=xrayutilities
export PYBUILD_BEFORE_TEST=cp -r tests {build_dir}; cp -r examples {build_dir}; cp -r lib/xrayutilities/materials/data {build_dir}/xrayutilities/materials/
export PYBUILD_AFTER_TEST=rm -rf {build_dir}/tests; rm -rf {build_dir}/xrayutilities/materials/data; rm -rf {build_dir}/examples

%:
	dh $@ --with python3,sphinxdoc --buildsystem=pybuild

override_dh_auto_clean:
	rm -rf build
	dh_auto_clean

override_dh_strip:
	dh_strip --no-automatic-dbgsym

override_dh_auto_install:
	dh_numpy3
	dh_auto_install

override_dh_auto_test:
	dh_auto_test -- -s custom --test-args="{interpreter} {dir}/setup.py egg_info -e {build_dir}; cd {build_dir}; {interpreter} -m unittest2 discover -v;"

override_dh_sphinxdoc:
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
	# build doc
	dh_auto_build -- -s custom --build-args="env PYTHONPATH={build_dir} {interpreter} setup.py build_doc"
	dh_installdocs -p python-xrayutilities-doc build/sphinx/html
	dh_sphinxdoc -O--buildsystem=pybuild
endif