| 12
 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
 79
 80
 81
 82
 
 | #!/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 python2,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 pip/_vendor -depth \
		-not -regex 'pip/_vendor/__init__\.py$$' \
		-not -regex '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
	rm -f debian/python3-pip/usr/bin/pip
	rm -f debian/python3-pip/usr/bin/pip3.?
	rm -rf debian/python3-pip/usr/lib/python3.?
	python3 debian/makepip.py /usr/bin/python3 \
		debian/python3-pip/usr/bin/pip3
override_dh_python2:
	dh_python2
	rm -f debian/python-pip/usr/bin/pip2.?
	python3 debian/makepip.py /usr/bin/python \
		debian/python-pip/usr/bin/pip
	python3 debian/makepip.py /usr/bin/python \
		debian/python-pip/usr/bin/pip2
override_dh_auto_install:
	dh_auto_install
	mkdir -p $(CURDIR)/debian/python-pip-whl/usr/share/python-wheels
	dirtbike appdirs
	dirtbike CacheControl
	dirtbike chardet
	dirtbike colorama
	dirtbike distlib
	dirtbike distro
	dirtbike html5lib
	dirtbike ipaddress
	dirtbike lockfile
	dirtbike packaging
	dirtbike pkg_resources
	dirtbike progress
	dirtbike pyparsing
	dirtbike requests
	dirtbike retrying
	dirtbike setuptools
	dirtbike six
	dirtbike urllib3
	dirtbike webencodings
	dirtbike wheel
	python3 setup.py bdist_wheel \
		--universal \
		-d $(CURDIR)/debian/python-pip-whl/usr/share/python-wheels
override_dh_installchangelogs:
	dh_installchangelogs CHANGES.txt
override_dh_installman:
	mkdir -p debian/tmp
	rst2man debian/pip-manpage.rst > debian/tmp/pip.man
	rst2man debian/pip-manpage.rst > debian/tmp/pip3.man
	dh_installman
override_dh_clean:
	dh_clean
	rm -rf debian/tmp
 |