File: rules

package info (click to toggle)
pyopenssl 19.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,128 kB
  • sloc: python: 7,775; makefile: 151
file content (64 lines) | stat: -rwxr-xr-x 1,904 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

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

export LC_ALL=C.UTF-8

PY2VERS := $(shell pyversions -r -v)
PY3VERS := $(shell py3versions -r -v)
PYVERS := $(PY2VERS) $(PY3VERS)

%:
	dh $@ --with python2,python3,sphinxdoc

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

	$(MAKE) -C doc html PYTHONPATH=$(CURDIR)/`python -c "from distutils.command.build import build ; from distutils.core import Distribution ; b = build(Distribution()) ; b.finalize_options() ; print(b.build_purelib)"`

override_dh_auto_test:
ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
	# run tests
	-for py in $(PY2VERS); do  \
	    LIB=$$(python$$py -c "from distutils.command.build import build ; from distutils.core import Distribution ; b = build(Distribution()) ; b.finalize_options() ; print(b.build_purelib)") ; \
	    PYTHONPATH=$$LIB py.test ;\
	done
	-for py in $(PY3VERS); do  \
	    LIB=$$(python$$py -c "from distutils.command.build import build ; from distutils.core import Distribution ; b = build(Distribution()) ; b.finalize_options() ; print(b.build_purelib)") ; \
	    PYTHONPATH=$$LIB py.test-3 ;\
	done
endif


override_dh_auto_clean:
	-for py in $(PYVERS); do \
	    python$$py setup.py clean --all; \
	done

	rm -rf build

	$(MAKE) -C doc clean

	rm -rf *.key *.pem tmp*

	dh_clean build-stamp version.pyc

override_dh_auto_install: DH_OPTIONS=
override_dh_auto_install:
	set -e; \
	for py in $(PY2VERS); do \
	    echo "installing for python$$py ..."; \
 	    python$$py setup.py install --root=$(CURDIR)/debian/python-openssl --install-layout=deb; \
 	done
	set -e; \
	for py in $(PY3VERS); do \
	    echo "installing for python$$py ..."; \
 	    python$$py setup.py install --root=$(CURDIR)/debian/python3-openssl --install-layout=deb; \
 	done

override_dh_installchangelogs:
	dh_installchangelogs CHANGELOG.rst