Debian Codegraph @

debian/rules

raw symbols SCIP
1 #!/usr/bin/make -f
2 include /usr/share/dpkg/pkg-info.mk
3
4 DEBIAN_DIR := $(CURDIR)/debian
5 export PYBUILD_NAME = distributed
6 export PYBUILD_TEST_CUSTOM = 1
7 export PYBUILD_TEST_ARGS = \
8 cd {build_dir}; \
9 $(DEBIAN_DIR)/run-tests \
10 $(DEBIAN_DIR)/get-test-exclusions rules {interpreter} \
11 -m pytest \
12 --verbose \
13 --color=no \
14 --timeout-method=signal \
15 --timeout=300 \
16 -m "not avoid_ci"
17
18 # FIXME: several tests are tripping on the missing dask_expr raising
19 # FutureWarnings on dask.dataframe module import. Setting configuration
20 # option "dataframe.query-planning" to False will not raise such
21 # warning, but the way forward would probably be to package dask_expr.
22 #
23 # Because the directory layout is different For autopkgtest-pkg-pybuild,
24 # we need to check the {build_dir} directory exists before trying to copy
25 # into it.
26 export PYBUILD_BEFORE_TEST = \
27 mkdir -pv {home_dir}/.config \
28 && printf '\173 "dataframe": \173 "query-planning": False \175 \175\n' \
29 > {home_dir}/.config/dask
30
31 export NEEDED_JS=distributed/http/static/js/anime.min.js \
32 distributed/http/static/js/reconnecting-websocket.min.js
33
34 %:
35 dh $@ --buildsystem=pybuild
36
37 UPSTREAM_VERSION = $(subst +ds,,$(DEB_VERSION_UPSTREAM))
38 execute_after_dh_testdir:
39 # Guard against version mismatch in debian/patches/fix-version.patch.
40 # This patch needs to be updated to newer upstream version every time.
41 grep -q $(UPSTREAM_VERSION) distributed/_version.py
42
43 # This cannot be moved to debian/python3-distributed.pyinstall,
44 # as that happens after the tests have been run.
45 export PYBUILD_AFTER_BUILD = \
46 cp -v distributed/tests/testegg-*-py*.egg distributed/tests/mytest.pyz \
47 {build_dir}/distributed/tests
48
49 override_dh_auto_build: export http_proxy=127.0.0.1:9
50 override_dh_auto_build: export https_proxy=127.0.0.1:9
51 override_dh_auto_build:
52 rm -f distributed/comm/tests/__init__.py
53 set -e; \
54 for p in ${NEEDED_JS}; do \
55 uglifyjs -o $$p debian/missing-sources/$${p%.min.js}.js ; \
56 done
57 cp /usr/share/javascript/sortable-tablesort/sortable.min.js distributed/http/static/js
58 cp /usr/share/javascript/sortable-tablesort/sortable.min.css* distributed/http/static/css
59 chmod a-x distributed/tests/test_utils_test.py
60 dh_auto_build
61 chmod a+x distributed/tests/test_utils_test.py
62 # ln -s /usr/share/javascript/mathjax docs/source/_static
63 ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
64 PYTHONPATH=. python3 -m sphinx -N -bhtml docs/source build/html # HTML generator
65 rm -rf build/html/_static/__pycache__
66 endif
67
68 # This is needed for newer versions of OpenSSL
69 dh_auto_test: export CRYPTOGRAPHY_OPENSSL_NO_LEGACY=1
70
71 override_dh_compress:
72 dh_compress -Xchangelog.html
73
74 override_dh_install:
75 dh_install
76 dh_installchangelogs docs/source/changelog.rst
77
78 override_dh_auto_install:
79 dh_auto_install
80 dh_link
81 find debian/ -name *.ico -exec chmod a-x {} \;
82 rm -rf debian/python3-distributed/usr/lib/python3*/dist-packages/dask-worker-space debian/python3-distributed/usr/lib/python3*/dist-packages/core debian/python3-distributed/usr/lib/python3*/dist-packages/test_cluster_dump
83
84 override_dh_installdocs:
85 dh_installdocs -ppython-distributed-doc --doc-main-package=python3-distributed
86 dh_installdocs --remaining-packages
87 rm -vf debian/python-distributed-doc/usr/share/doc/python3-distributed/html/_static/vendor/fontawesome/*/LICENSE.txt
88
89 override_dh_auto_clean:
90 touch distributed/comm/tests/__init__.py
91 dh_auto_clean
92 -rm $(NEEDED_JS)