Build error when dh-virtualenv tries to invoke pip
Spriithy opened this issue · comments
Hello there,
It seems dh-virtualenv can't invoke the pip command.
This problem started to occur recently and has made building our deb package impossible.
No change in package dependencies were made.
Here is a copy of some of the debian config files :
$ cat debian/control
Source: alkaline
Section: python
Priority: standard
Maintainer: ALKALINE_MAINTAINER <ALKALINE_MAINTAINER_EMAIL>
Build-Depends: debhelper (>= 9), python3, python3-setuptools, python3-distutils, python3-pip, python3-dev, dh-virtualenv (>= 0.17), libffi-dev
Standards-Version: ALKALINE_PYTHON_VERSION
Package: alkaline
Architecture: any
Pre-Depends: python3-distutils, dpkg (>= 1.16.1), python3 (>= 3), ${misc:Pre-Depends}
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: ALKALINE_DESCRIPTION
ALKALINE_DESCRIPTION
#!/usr/bin/make -f
EXTRA_REQUIREMENTS=--upgrade-pip --preinstall setuptools --preinstall distutils --preinstall wheel
DH_VENV_ARGS= --with python-virtualenv --setuptools --python python3 --extras all $(EXTRA_REQUIREMENTS) --extra-pip-arg=':all:' -v
%:
dh $@ $(DH_VENV_ARGS)
override_dh_virtualenv:
dh_virtualenv --python python3
override_dh_strip:
dh_strip --exclude=/site-packages/
override_dh_shlibdeps:
dh_shlibdeps --exclude=/site-packages/
And the error output while building with dpkg-buildpackage -us -uc
:
dpkg-buildpackage: info: source package alkaline
dpkg-buildpackage: info: source version 0.9.1
dpkg-buildpackage: info: source distribution stable
dpkg-buildpackage: info: source changed by spriithy <spriithy@alkaline.fr>
dpkg-source --before-build .
dpkg-buildpackage: info: host architecture amd64
debian/rules clean
dh clean --with python-virtualenv --setuptools --python python3 --extras all --upgrade-pip --preinstall setuptools --preinstall distutils --preinstall wheel --extra-pip-arg=':all:' -v
dh_autoreconf_clean -O--setuptools -O--python=python3 -O--extras=all -O--upgrade-pip -O--preinstall=setuptools -O--preinstall=distutils -O--preinstall=wheel -O--extra-pip-arg=:all: -O-v
dh_clean -O--setuptools -O--python=python3 -O--extras=all -O--upgrade-pip -O--preinstall=setuptools -O--preinstall=distutils -O--preinstall=wheel -O--extra-pip-arg=:all: -O-v
rm -f debian/debhelper-build-stamp
rm -rf debian/.debhelper/
rm -f -- debian/alkaline.substvars debian/files
rm -fr -- debian/alkaline/ debian/tmp/
find . \( \( \
\( -path .\*/.git -o -path .\*/.svn -o -path .\*/.bzr -o -path .\*/.hg -o -path .\*/CVS -o -path .\*/.pc -o -path .\*/_darcs \) -prune -o -type f -a \
\( -name '#*#' -o -name '.*~' -o -name '*~' -o -name DEADJOE \
-o -name '*.orig' -o -name '*.rej' -o -name '*.bak' \
-o -name '.*.orig' -o -name .*.rej -o -name '.SUMS' \
-o -name TAGS -o \( -path '*/.deps/*' -a -name '*.P' \) \
\) -exec rm -f {} + \) -o \
\( -type d -a -name autom4te.cache -prune -exec rm -rf {} + \) \)
dpkg-source -b .
dpkg-source: info: using source format '1.0'
dpkg-source: info: building alkaline in alkaline_0.9.1.tar.gz
dpkg-source: info: building alkaline in alkaline_0.9.1.dsc
debian/rules build
dh build --with python-virtualenv --setuptools --python python3 --extras all --upgrade-pip --preinstall setuptools --preinstall distutils --preinstall wheel --extra-pip-arg=':all:' -v
dh_update_autotools_config -O--setuptools -O--python=python3 -O--extras=all -O--upgrade-pip -O--preinstall=setuptools -O--preinstall=distutils -O--preinstall=wheel -O--extra-pip-arg=:all: -O-v
dh_autoreconf -O--setuptools -O--python=python3 -O--extras=all -O--upgrade-pip -O--preinstall=setuptools -O--preinstall=distutils -O--preinstall=wheel -O--extra-pip-arg=:all: -O-v
dh_auto_configure -O--setuptools -O--python=python3 -O--extras=all -O--upgrade-pip -O--preinstall=setuptools -O--preinstall=distutils -O--preinstall=wheel -O--extra-pip-arg=:all: -O-v
dh_auto_configure: Please use the third-party "pybuild" build system instead of python-distutils
dh_auto_configure: This feature will be removed in compat 12.
create-stamp debian/debhelper-build-stamp
debian/rules binary
dh binary --with python-virtualenv --setuptools --python python3 --extras all --upgrade-pip --preinstall setuptools --preinstall distutils --preinstall wheel --extra-pip-arg=':all:' -v
dh_testroot -O--setuptools -O--python=python3 -O--extras=all -O--upgrade-pip -O--preinstall=setuptools -O--preinstall=distutils -O--preinstall=wheel -O--extra-pip-arg=:all: -O-v
dh_prep -O--setuptools -O--python=python3 -O--extras=all -O--upgrade-pip -O--preinstall=setuptools -O--preinstall=distutils -O--preinstall=wheel -O--extra-pip-arg=:all: -O-v
rm -f -- debian/alkaline.substvars
rm -fr -- debian/.debhelper/generated/alkaline/ debian/alkaline/ debian/tmp/
dh_installdocs -O--setuptools -O--python=python3 -O--extras=all -O--upgrade-pip -O--preinstall=setuptools -O--preinstall=distutils -O--preinstall=wheel -O--extra-pip-arg=:all: -O-v
install -d debian/alkaline/usr/share/doc/alkaline
install -d debian/.debhelper/generated/alkaline
dh_installchangelogs -O--setuptools -O--python=python3 -O--extras=all -O--upgrade-pip -O--preinstall=setuptools -O--preinstall=distutils -O--preinstall=wheel -O--extra-pip-arg=:all: -O-v
install -p -m0644 debian/changelog debian/alkaline/usr/share/doc/alkaline/changelog
debian/rules override_dh_virtualenv
make[1]: Entering directory '/build/dist/alkaline-0.9.1'
dh_virtualenv --python python3
Already using interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /build/dist/alkaline-0.9.1/debian/alkaline/opt/venvs/alkaline/bin/python3
Also creating executable in /build/dist/alkaline-0.9.1/debian/alkaline/opt/venvs/alkaline/bin/python
Installing setuptools, pkg_resources, pip, wheel...done.
Processing /build/dist/alkaline-0.9.1
DEPRECATION: A future pip version will change local packages to be built in-place without first copying to a temporary directory. We recommend you use --use-feature=in-tree-build to test your packages with this new behavior before it becomes the default.
pip 21.3 will remove support for this functionality. You can find discussion regarding this at https://github.com/pypa/pip/issues/7555.
WARNING: Discarding file:///build/dist/alkaline-0.9.1. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Traceback (most recent call last):
File "/usr/bin/dh_virtualenv", line 110, in <module>
sys.exit(main() or 0)
File "/usr/bin/dh_virtualenv", line 93, in main
deploy.install_package()
File "/usr/lib/python2.7/dist-packages/dh_virtualenv/deployment.py", line 260, in install_package
subprocess.check_call(self.pip(package), cwd=os.path.abspath(self.sourcedirectory))
File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/build/dist/alkaline-0.9.1/debian/alkaline/opt/venvs/alkaline/bin/python', '/build/dist/alkaline-0.9.1/debian/alkaline/opt/venvs/alkaline/bin/pip', 'install', '--log=/tmp/tmpmliOvb', '.']' returned non-zero exit status 1
make[1]: Leaving directory '/build/dist/alkaline-0.9.1'
make[1]: *** [debian/rules:10: override_dh_virtualenv] Error 1
make: *** [debian/rules:7: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
/build
@nailor Any idea what might cause the problem ?
Build is occurring in a debian buster docker container (with compat 11) and required packages.
Thank you for replying !
Are there any path I could take to further investigate ?
Any quick ideas to try ?
Thanks in advance
Since this is not an issue with dh-virtualenv I’m closing the issue