File: rules

package info (click to toggle)
python-pip 20.3.4-4%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 7,008 kB
  • sloc: python: 77,841; makefile: 60; sh: 59
file content (78 lines) | stat: -rwxr-xr-x 2,003 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/usr/bin/make -f

export PYBUILD_NAME=pip
#export PYBUILD_VERBOSE=1
#export DH_VERBOSE=1

export PIP_NO_VENDOR_FOR_DOWNSTREAM=1
export DIRTBIKE_DIRECTORY=\
    $(CURDIR)/debian/python-pip-whl/usr/share/python-wheels

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

# Patching DEBUNDLED=True in pip/_vendor/__init__.py is enough to disable
# vendoring.  We remove these files (as suggested by pip/_vendor/README.rst)
# as added insurance.  find/rm code adapted from upstream's travis run.sh.
override_dh_auto_build:
	find src/pip/_vendor -depth \
		-not -regex 'src/pip/_vendor/__init__\.py$$' \
		-not -regex 'src/pip/_vendor/vendor.txt$$' \
		-not -regex 'src/pip/_vendor$$' \
		-exec rm -rf {} \;
	dh_auto_build

# Upstream does not bundle enough of the source tree in the tarball to run the
# test suite.  https://github.com/pypa/pip/issues/3370
override_dh_auto_test:

override_dh_python3:
	dh_python3 -v
	rm -f debian/python3-pip/usr/bin/pip3.?
	rm -rf debian/python3-pip/usr/lib/python3.?

override_dh_auto_install:
	dh_auto_install
	mkdir -p $(CURDIR)/debian/python-pip-whl/usr/share/python-wheels
	dirtbike appdirs
	dirtbike CacheControl
	dirtbike certifi
	dirtbike chardet
	dirtbike colorama
	dirtbike distlib
	dirtbike distro
	dirtbike html5lib
	dirtbike idna
	dirtbike ipaddr
	dirtbike packaging
	dirtbike pep517
	dirtbike --py2 pkg_resources
	dirtbike progress
	dirtbike pyparsing
	dirtbike resolvelib
	dirtbike toml
	dirtbike requests
	dirtbike retrying
	dirtbike --py2 setuptools
	dirtbike six
	dirtbike urllib3
	dirtbike webencodings
	dirtbike wheel
	dirtbike contextlib2
	dirtbike msgpack
	python3 setup.py bdist_wheel \
		--universal \
		-d $(CURDIR)/debian/python-pip-whl/usr/share/python-wheels
	debian/genbuildusing.sh >> debian/python-pip-whl.substvars

override_dh_installchangelogs:
	dh_installchangelogs NEWS.rst

override_dh_installman:
	mkdir -p debian/tmp
	rst2man debian/pip-manpage.rst > debian/tmp/pip3.man
	dh_installman

override_dh_clean:
	dh_clean
	rm -rf debian/tmp