On 2/12/21 8:45 pm, Miro Hrončok wrote:
Hello PyPy folks,
I co-maintain the PyPy and CPython interpreter packages in Fedora
Thanks for supporting PyPy
We basically took the advice from
https://doc.pypy.org/en/latest/build.html
That documentation may now need some updating.
Several different versions of pypy (e.g. 3.6 and 3.7) could be
installed alongside each other, as long as only one of them "owned"
/usr/bin/pypy3.
This e.g. means that the standard library is installed in:
/usr/lib64/pypy3.8/lib/pypy3.8/
Or the header files are in:
/usr/lib64/pypy3.8/include/pypy3.8/
Double namespacing like this seems a bit overengineered, and since the
idea was to resemble CPython, I was aiming at this setup:
...
It seems reasonable that PyPy should follow CPython's lead in layout.
Which would be the exact copy of our CPython setup | sed s/python/pypy/
Indeed, that is the goal.
However, I found 4 problems:
1) The PyPy install scheme only has "lib", not "lib64"
I think we could sort this by a tiny patch that we used to carry in
CPython 3.8 before configurable platlibdir was introduced in 3.9.
If it is part of CPython 3.9, it should be part of PyPy 3.9 as well. Can
you check that the latest nightly at
https://buildbot.pypy.org/nightly/py3.9/ indeed no longer needs that change?
2) The /usr/include/PyPy.h file is *not* namespaced with PyPy Python
version
I don't know if we even need to ship this file. It seems deprecated.
Maybe it can be in /usr/include/pypy3.8/PyPy.h?
I was confused by this as well. As Armin pointed out, it was part of the
older cffi embedding code, and I think it can be dropped. See
https://foss.heptapod.net/pypy/pypy/-/issues/3608
3) /usr/bin/pypy3.8 is a symbolic link to /usr/bin/pypy3
I would expect it to be the other way around
This makes sense. For testing, we need pypy3, but can create it as a
symlink already as part of the build.
4) The /usr/bin/libpypy3-c.so file is *not* namespaced and seems
misplaced
This is the one thing I cannot wrap my head around. I do not wish to
install this file "globally" to /usr/bin
This also makes sense and some ideas were floated in other responses to
this thread. It would be best if someone with a plan could open an issue
for discussion, and even better a PR.
So, I am asking on this list: How should we package PyPy 3.8 for
Fedora? Do we need to install it to /usr/lib64/pypy3.8/ prefix even
thou most (but not all) of the directories within would contain a
"pypy3.8" subdirectory? Or is there a better option I do not yet see?
While it is too late for pypy3.8, now is the time to tweak pypy3.9. I am
not sure what support you expect from PyPy to recreate the same layout
as the one used in CPython. Are there patches we can upstream?
There are other repackagers: debian, BSD, and conda-forge, so any
changes would need to be done with an eye toward not breaking their
workflow as well.
Matti
_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
https://mail.python.org/mailman/listinfo/pypy-dev