#!/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 src/pip/_vendor -depth \ -not -regex 'src/pip/_vendor/pep517.*' \ -not -regex 'src/pip/_vendor/__init__\.py$$' \ -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 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 certifi dirtbike chardet dirtbike colorama dirtbike distlib dirtbike distro dirtbike html5lib dirtbike idna dirtbike ipaddress dirtbike lockfile dirtbike packaging dirtbike pkg_resources dirtbike progress dirtbike pyparsing dirtbike pytoml 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 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/pip.man rst2man debian/pip-manpage.rst > debian/tmp/pip3.man dh_installman override_dh_clean: dh_clean rm -rf debian/tmp