Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 UPSTREAM_GIT := https://github.com/eventlet/eventlet
4 include /usr/share/openstack-pkg-tools/pkgos.make
5 include /usr/share/dpkg/buildopts.mk
6
7 export PYBUILD_NAME=eventlet
8 export TRAVIS=true
9
10 export SETUPTOOLS_SCM_PRETEND_VERSION=$(shell dpkg-parsechangelog -SVersion | sed -e 's/^[[:digit:]]*://' -e 's/[-].*//' -e 's/~git.*//' -e 's/~bpo.*//' -e 's/~/.0/' -e 's/+dfsg1//' -e 's/+ds1//' | head -n 1)
11
12 %:
13 dh $@ --with python3,sphinxdoc --buildsystem=pybuild
14
15 override_dh_auto_clean:
16 dh_auto_clean
17 rm -f hatch.toml eventlet/_version.py
18 find . -iname '*.pyc' -delete
19 for i in $$(find . -type d -iname __pycache__) ; do rm -rf $$i ; done
20
21 override_dh_auto_build:
22 echo "__version__ = '$$SETUPTOOLS_SCM_PRETEND_VERSION'" >eventlet/_version.py
23 dh_auto_build
24
25 override_dh_fixperms:
26 dh_fixperms
27 echo "__version__ = '$$SETUPTOOLS_SCM_PRETEND_VERSION'" >$(CURDIR)/debian/python3-eventlet/usr/lib/python3/dist-packages/eventlet/_version.py
28
29 override_dh_sphinxdoc:
30 ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
31 PYTHONPATH=. python3 -m sphinx -N -b html doc/source $(CURDIR)/debian/python-eventlet-doc/usr/share/doc/python-eventlet-doc/html
32 endif
33 dh_sphinxdoc
34
35 override_dh_compress:
36 dh_compress -X.inv -X.txt
37
38 override_dh_installchangelogs:
39 dh_installchangelogs NEWS
40
41 override_dh_auto_test:
42 ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
43 # Backlist 4 unit tests depending on /etc/resolv.conf:
44 # test_clear
45 # test_noraise_dns_tcp
46 # test_raise_dns_tcp
47 # test_dns_methods_are_green
48 # See upstream issue: https://github.com/eventlet/eventlet/issues/963
49 # Non-deterministic:
50 # test_direct_raise_instance
51 # test_cancel_proportion'
52 # See #1082997
53 # test_orig_thread
54 # See #1090270
55 # fail on armel:
56 # test_send_1k_req_rep
57 set -e ; set -x ; for i in $(shell py3versions -vr 2>/dev/null) ; do \
58 PYTHONPATH=. PYTHON=python$$i python$$i -m pytest tests -v $(DEB_BUILD_OPTION_PARALLEL:%=-n %) -k ' not test_fork_after_monkey_patch and not test_cancel_proportion and not test_clear and not test_noraise_dns_tcp and not test_raise_dns_tcp and not test_dns_methods_are_green and not test_orig_thread and not test_send_1k_pub_sub and not test_ssl_close and not test_send_1k_req_rep and not test_double_close_219 and not test_reverse_name and not test_os_read_nonblocking and not test_tpool and not test_zero_second_sleep and not test_threading_condition and not test_is_alive and not test_name and not test_blocking_select_methods_are_deleted and not test_subprocess_after_monkey_patch and not test_patcher_threading_subclass_done and not test_patcher_existing_logging_module_lock and not test_threadpoolexecutor and not test_patcher_existing_locks and not test_threading_join and not test_is_daemon and not test_patcher_existing_locks_early and not test_regular_file_readall and not test_greenlet and not test_context_version_setters and not test_patched_communicate_290 and not test_importlib_lock and not test_fork_in_thread_after_monkey_patch_threading and not test_early_patching and not test_join and not test_patcher_existing_locks_exception and not test_patcher_existing_locks_late and not test_threading_current and not test_ident and not test_greenthread and not test_patched_thread and not test_late_patching and not test_keyerror and not test_simple and not test_can_use_eventlet_in_os_threads and not test_socketserver_selectors and not test_os_write_nonblocking' ; \
59 done
60 endif