File: rules

package info (click to toggle)
python-parsl 2025.01.13%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 12,072 kB
  • sloc: python: 23,817; makefile: 349; sh: 276; ansic: 45
file content (68 lines) | stat: -rwxr-xr-x 2,565 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/usr/bin/make -f
include /usr/share/dpkg/pkg-info.mk

export LANG=C.UTF-8

# Look at upstream Makefile to find examples of how to run the test suite.
export PYBUILD_TEST_ARGS=\
	--verbose \
	-k "not cleannet \
	    and not test_stdout.py \
	    and not test_interchange_binding_with_non_ipv4_address" \
	--config parsl/tests/configs/local_threads.py
# Note that test_stdout.py is skipped due to missing appropriate typeguards.
# Also, test_interchange_binding_with_non_ipv4_address is fragile depending on
# the content of /etc/hosts.

# These items need being cleansed up, otherwise they land at random
# places within binary packages.
export PYBUILD_AFTER_TEST=\
	rm -rvf {build_dir}/pytest-parsl {build_dir}/output.txt \
	        {build_dir}/hello1.txt   {build_dir}/std.out

PKGDIR=$(CURDIR)/debian/python3-parsl

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

execute_after_dh_auto_build:
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	# Build Sphinx documentation.
	$(MAKE) -C docs/ html
	# Remove dynamically injected privacy breaches.
	find docs/_build/html/ -name '*.html' -exec \
		sed -i 's@<script crossorigin="anonymous" integrity="[^"]*" src="https://[^"]*/require.min.js">@<script crossorigin="anonymous" src="file:///usr/share/javascript/requirejs/require.min.js">@' '{}' ';'
endif

execute_after_dh_install:
	# Cleanup scipts of primary interest for their classes.
	# They are still available within the module.
	rm -vf $(PKGDIR)/usr/bin/exec_parsl_function.py \
	       $(PKGDIR)/usr/bin/interchange.py \
	       $(PKGDIR)/usr/bin/parsl_coprocess.py \
	       $(PKGDIR)/usr/bin/process_worker_pool.py

override_dh_installman: export PYTHONPATH=$(CURDIR)
override_dh_installman:
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	help2man $(PKGDIR)/usr/bin/parsl-perf \
		--name "performance measurements of parsl configuration" \
		--version-string="$(DEB_VERSION_UPSTREAM)" \
		--no-info \
		--output debian/parsl-perf.1
	help2man $(PKGDIR)/usr/bin/parsl-visualize \
		--name "run parsl web dashboard" \
		--version-string="$(DEB_VERSION_UPSTREAM)" \
		--no-info \
		--output debian/parsl-visualize.1
	# parsl-globus-auth attempts to connect to an authentication
	# server for Globus no matter what, making it unsuitable for
	# help2man.  This command is manually documented instead.
	dh_installman --language=C
endif

before-pybuild-autopkgtest:
	# Pull test items that are otherwise uncaught by pybuild-autodep8.
	mkdir -p ../../autopkgtest_tmp/build/parsl
	cp -r /usr/lib/python3/dist-packages/parsl/tests \
		../../autopkgtest_tmp/build/parsl