[Distutils] local platform tags and pip wheel caching

Robert Collins robertc at robertcollins.net
Tue Jun 9 21:09:54 CEST 2015


So the pip wheel caching feature has promoted a few latent problems
into the limelight.

One is that many wheels projects built are not actually as compatible
as thought.  https://github.com/pypa/pip/issues/2882
One is that wheels don't support writing datafiles outside their
environment. https://github.com/pypa/pip/issues/2874
And the one I want to talk about is that we don't generate
sufficiently good platform markers on Linux.
https://github.com/pypa/pip/issues/2875

That bug describes the scenario of using a wheel cache shared across
multiple Linux ABIs - e.g. LXC containers with a bind mounted home
dir, or NFS on a cluster. pip 7's implicit wheel cache triggers this
situation for people.

The OP has suggested that being able to control the platform tag that
pip a) looks for and b) instructs wheel to use would let them avoid
issues in this situation without having to solve the general problem
of 'the universe of Linuxs can't agree on anything'.

e.g, in each context they could set a /etc/pip.conf containing
[global]
wheel_platform = contextname

and then pip would use that and instruct built wheels to use that.

Further, they not that it can be used to e.g. describe other local
policies like 'I want hardened C builds' that are not inferrable from
context at all today.

But since this affects pip *and* wheel, we're bringing it here for discussion.

I'm in favour of it - it fits the existing wheel spec; its opt-in,
non-intrusive and solves a real, present problem. [just not the 'how
do we get these damn things into PyPI, yet].

-Rob

-- 
Robert Collins <rbtcollins at hp.com>
Distinguished Technologist
HP Converged Cloud


More information about the Distutils-SIG mailing list