File: rules

package info (click to toggle)
python-cryptography 1.7.1-3~bpo8%2B1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 3,164 kB
  • sloc: python: 37,971; ansic: 587; java: 319; makefile: 158
file content (51 lines) | stat: -rwxr-xr-x 1,396 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS=hardening=+bindnow

export PYBUILD_NAME=cryptography
export PYBUILD_TEST_PYTEST=1
export PYBUILD_TEST_ARGS={dir}/tests/
export PYBUILD_BEFORE_TEST=cp -R {dir}/src/${PYBUILD_NAME}.egg-info {build_dir}
export PYBUILD_AFTER_TEST=rm -r {build_dir}/.hypothesis


ifeq ($(filter nodoc,$(DEB_BUILD_PROFILES)),)
SPHINXDOC=,sphinxdoc
else
SPHINXDOC=
endif
%:
	dh $@ --with python2,python3$(SPHINXDOC) --buildsystem=pybuild


override_dh_auto_clean:
	dh_auto_clean
	rm -rf cryptography/hazmat/bindings/__pycache__ \
	       cryptography/hazmat/primitives/__pycache__


ifeq ($(filter nodoc,$(DEB_BUILD_PROFILES)),)
override_dh_auto_build:
	dh_auto_build
	PYTHONPATH=. \
	   http_proxy='127.0.0.1:9' \
	   https_proxy='127.0.0.1:9' \
	   sphinx-build -N -b html docs/ $(CURDIR)/.pybuild/docs/html/
endif


override_dh_python2:
	dh_python2
	# Remove "cffi" from requires after dh_python has seen it (so that the
	# pydist file takes effect), because it is not actually needed at
	# runtime.
	sed -i '/^cffi/d' \
	    debian/python-cryptography/usr/lib/python*/dist-packages/cryptography*.egg-info/requires.txt


override_dh_python3:
	dh_python3
	rm -rf debian/python3-cryptography/usr/lib/python3.?
	# See comment in override_dh_python2
	sed -i '/^cffi/d' \
	    debian/python3-cryptography/usr/lib/python3/dist-packages/cryptography*.egg-info/requires.txt