[pypy-dev] pypy's INSTALL_SCHEME

Yury V. Zaytsev yury at shurup.com
Wed Nov 20 10:49:21 CET 2013


Hi Armin,

I'd like to second the complaint by Michal.

On Wed, 2013-11-20 at 10:22 +0100, Armin Rigo wrote:
> 
> Do you have a suggestion about how "--prefix=/usr" would end up
> meaning "/usr/lib64/pypy-2.2"?  

In what concerns your question, please have a look here:

http://docs.python.org/2/install/

For arch-indep modules (purelib), everything is clear, the default
install location should be just

    $prefix/lib/pypyX.Y/site-packages

so it's a matter of

-    'purelib': '$base/site-packages',
+    'purelib': '$base/lib/pypy{}.{}/site-packages'.format(X, Y),

One could argue that every pure-Python module that is compatible with
PyPy declaring compatibility with a given version of Python should be
available for this version of Python as well and so go to pythonX.Y
rather than pypyX.Y, but I'm not sure whether this is a good default.

In my opinion, it's better to leave this up to the distribution
packagers and policy makers.

For binary extensions (platlib), the path depends upon the
implementation of multiarch for every specific distribution. For Red
Hat, for instance, the packages containing binary extensions should go
to

    $prefix/lib64/pypyX.Y/site-packages

on x86_64 systems and to

    $prefix/lib/pypyX.Y/site-packages

on i386 systems. I'm not sure how this is implemented for CPython
though, maybe Michal can comment on this.

I know that in CPython you have platlib and purelib, which are defined
in sysconfig.py and can be overridden from the command line. Probably
the distributions patch sysconfig.py in their packages, because from
what I recall the CPython default is to use lib for both platlib and
purelib.

I guess that PyPy should ideally follow suit...

> More importantly, why do you need to specify any "--prefix" at all?

I hope that Michal will correct me if I'm wrong, but from what I know,
it's a distribution policy in SuSe for Python packages.

I don't quite understand the reasoning behind this choice, but it has
something to do with staged installation, which is the way the packages
are built. Somehow, the PYC-files are not properly generated if the
--prefix is not specified...

Hope that helps,

-- 
Sincerely yours,
Yury V. Zaytsev




More information about the pypy-dev mailing list