build process fails to install python virtualenv

Asked by Cornelius Kölbel

I am trying to build an ubuntu package, but during the installation process I try to install software from the python package index using dh-virtualenv.
I end up with this error:

~~~
dh binary --with python-virtualenv
   dh_testroot
   dh_prep
   dh_install
   dh_installdocs
   dh_installchangelogs
   debian/rules override_dh_virtualenv
make[1]: Entering directory '/<<PKGBUILDDIR>>'
dh_virtualenv --upgrade-pip
New python executable in /<<PKGBUILDDIR>>/debian/privacyidea/opt/venvs/privacyidea/bin/python2
Also creating executable in /<<PKGBUILDDIR>>/debian/privacyidea/opt/venvs/privacyidea/bin/python
Installing setuptools, pkg_resources, pip, wheel...done.
Running virtualenv with interpreter /usr/bin/python2
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f5f8825ec90>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/pip/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f5f87680090>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/pip/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f5f87680190>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/pip/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f5f87680450>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/pip/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f5f876805d0>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/pip/
Requirement already up-to-date: pip in ./debian/privacyidea/opt/venvs/privacyidea/lib/python2.7/site-packages
Collecting alabaster==0.7.10 (from -r ./requirements.txt (line 1))
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f1f8a7923d0>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/alabaster/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f1f8a792310>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/alabaster/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f1f8a7b0f90>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/alabaster/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f1f8a7b0a50>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/alabaster/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f1f89798190>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/alabaster/
  Could not find a version that satisfies the requirement alabaster==0.7.10 (from -r ./requirements.txt (line 1)) (from versions: )
No matching distribution found for alabaster==0.7.10 (from -r ./requirements.txt (line 1))

~~~~

Is connecting externally possible?

Thanks a lot
Cornelius

Question information

Language:
English Edit question
Status:
Answered
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Colin Watson (cjwatson) said :
#1

External internet connections aren't permitted. dh-virtualenv usually isn't suitable for use in Launchpad builds; you should normally package your dependencies and (build-)depend on them instead.

If that isn't possible for whatever reason, then you might find some other useful ideas in https://answers.launchpad.net/launchpad/+question/677949.

Can you help with this problem?

Provide an answer of your own, or ask Cornelius Kölbel for more information if necessary.

To post a message you must log in.