Download PIP packages for specific architectures

37 views
Skip to first unread message

Matthew Giassa

unread,
Jan 12, 2018, 2:42:49 PM1/12/18
to pypa-dev
I'm currently working on an installer that bundles together application
binaries, native (.so) libraries, python modules, etc. In order to pre-bundle
the appropriate PIP modules (without using a virtual environment via
`virtualenv'), I download the modules to a local folder (rather than my system's
"site-packages" folder) via the following [1]:

    pip install --install-option="--prefix=$PREFIX_PATH" package_name

I have a question on extending this, as I'd prefer to have a single Makefile
solution to generate this installer for multiple architectures, as opposed to
having to spin up Vagrant VMs on-the-fly to generate these per-architecture
installers: is it possible to specify the CPU architecture for any arbitrary
(supported) architecture, so that I could download a specific arbitrary package
for i386, x86_64, aarch64, armhf, etc; from an x86/x64 host?  It appears to be
possible via the "--platform" parameter [2]. My problem is that I don't see a
way to query via PIP for which architectures are supported, and what strings
correspond to them (i.e. what values are valid to supply to the "--platform"
argument).

Thank you.


1. "Install a Python package into a different directory using pip?",
  <https://stackoverflow.com/questions/2915471/>, last accessed 2018-01-12.

2. "How to download cross-platform wheels via pip?",
  <https://stackoverflow.com/questions/24097168>, last accessed 2018-01-12.

Matthew Giassa

unread,
Jan 12, 2018, 3:44:24 PM1/12/18
to pypa-dev
Additionally, I'm trying to find out how to specify the OS as well (i.e. Windows, OSX, Linux, BSD, etc).
Reply all
Reply to author
Forward
0 new messages