File: rules

package info (click to toggle)
python-regex 0.1.20221031-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 3,464 kB
  • sloc: ansic: 48,293; python: 8,506; makefile: 31
file content (43 lines) | stat: -rwxr-xr-x 1,132 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
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

PYTHON3=$(shell py3versions -r)

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

override_dh_clean:
	dh_clean
	rm -rf Features.html build/ Python?/unicodedata_db.h

override_dh_auto_build:
	dh_auto_build
	set -e; \
	for python in $(PYTHON3); do \
		$$python setup.py build ; \
	done

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
override_dh_auto_test:
	for python in $(PYTHON3); do \
		echo "-- running tests for "$$python" plain --" ; \
		LIB=$$($$python -c "from distutils.command.build import build ; from distutils.core import Distribution ; b = build(Distribution()) ; b.finalize_options() ; print(b.build_platlib)"); \
		cp regex_3/test_regex.py $$LIB ; \
		cd $$LIB ; \
		PYTHONPATH=. $$python test_regex.py; \
		rm test_regex.py ; \
		cd - ; \
	done
endif

override_dh_install:
	set -e; \
	for python in $(PYTHON3); do \
		$$python setup.py install --install-layout=deb --root=$(CURDIR)/debian/python3-regex; \
	done

override_dh_installdocs:
	dh_installdocs -A README.rst docs/UnicodeProperties.rst docs/Features.html