Install PyPi dependency from a PPA build

Asked by Florian

I am trying the following in my rules file:

override_dh_auto_configure: $(BUILD_FLAGS_FILE)
 python3 -m venv .venv
 rm -rf Build && mkdir -p Build
 . "$${PWD}/.venv/bin/activate" \
   && pip3 --no-cache-dir install "Sphinx" \
   && cd Build \
  && ../bootstrap --prefix=/usr --docdir=/share/doc/cmake --mandir=/share/man \
                   --init=../$(BUILD_FLAGS_FILE) --no-system-libs \
                  --sphinx-man --sphinx-html --sphinx-flags="-D today=\"$(BUILD_DATE)\"" \
                   $(BOOTSTRAP_PARALLEL) --verbose

Locally this works flawless. The Launchpad build machines however fail to install the pip3 package "sphinx":

Collecting Sphinx
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fa390fe8978>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/sphinx/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fa390fe8a90>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/sphinx/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fa390fe8b70>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/sphinx/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fa3916556a0>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/sphinx/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fa391655a58>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/sphinx/
  Could not find a version that satisfies the requirement Sphinx (from versions: )

Can anybody help me with that? Is pypi access maybe actively blocked by launchpad?

Kind Regards
Florian

Question information

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

Sorry, but PPA builds are not permitted access to the public internet. You'll have to either vendor anything you need into the source package, or make sure that whatever you need is available in .debs that you can build-depend on.

Revision history for this message
Colin Watson (cjwatson) said :
#2

(A much more conventional approach would be to build-depend on python3-sphinx or similar, and if you need a newer version then backport that.)

Revision history for this message
Florian (freim) said :
#3

Wow ok, I actually didn't expect Ci without internet in the 21st century 😀. This makes stuff much more difficult than it needs to be, in my opinion. The python3-sphinx package is too old (on bionic at least) and I really would like to get stuff done instead of creating useless backports of maaany python packages that work just fine with a single pip3 install command.

I guess my CMake backport is going to be documentation-less and manpage-less, then.

Revision history for this message
Colin Watson (cjwatson) said :
#4

For what it's worth, PPAs are meant for binary distribution rather than CI, which may sound similar but is a definitely distinct goal.

Revision history for this message
Florian (freim) said :
#5

You are right, I just called it CI as they are also meant to build the source code and not just distribute the binaries. We are using the service for releases and it works perfectly for that. I was just astonished that pulling external python dependencies isn't possible.