[Distutils] Distributing packages to offline machines

Eric Gorr ericgorr at gmail.com
Wed Apr 4 21:11:51 EDT 2018


I had a question about distributing python packages to offline machines
when the offline machine is running a different OS then a machine with an
internet connection. The packages I am concerned with are third party upon
which mine depend.

Based on what I have learned so far, there are three solutions.

(a) Use a CI to run a fleet of machines for each OS one needs to target to
obtain the OS specific wheels.

(b) 'pip download <package_list> --no-binary :all:' -- the intention here
is to grab the source distribution without any OS specific code included.

(c) use https://warehouse.pypa.io/api-reference/json to look for
distributed wheels for the target OS and python version and download them
directly. (This may make for a nice flag to add to pip somewhere...the
ability to specify what wheel one wants when it isn’t for the machine pip
is running on)

The issue I see with (a) is the shear amount work it would take to setup
and maintain such a system.

The issue I see with (b) is that it is not 100% reliable as some packages
are tricky to install and may not work well with 'pip download’.

I have not played around with (c) yet, so I do not know how well it will
work, but it seems like a viable solution.

I was just wondering if anyone had any comments on this as I think though
the ways to solve this problem.

Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20180405/ed42087c/attachment.html>


More information about the Distutils-SIG mailing list