[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Python] pypy3 integration

From: Lars-Dominik Braun
Subject: [Python] pypy3 integration
Date: Sun, 19 Jul 2020 10:27:14 +0200


I’ve been looking into integrating pypy3 (a JIT Python 3 implementation)
tighter into guix. Right now we have a package, but it’s not that
useful, because there are no pypy3-* libraries.

The WIP patch attached – I’ll split it up later if this gets to code
review – adds some essential Python libraries like pytest and numpy to
pypy3. One issue however is the way Python’s site-packages directory is
discovered.  Usually it’s in /lib/python<python_version>/site-packages.
I modified pypy3 to use /lib/pypy<python_version>/site-packages
(python_version!=pypy version), but I’m having a hard time figuring out
how to build this path inside guix/build/python-build-system.scm’s
site-packages, because the inputs have been lowered to store paths
already. Right now I’m simply scanning the input’s /lib subdirectories,
but I had to add python→python3 symlinks to our python package to make
it work. This is discouraged by PEP 394[1] and triggers a world rebuild.

I thought about multiple alternative options:

1) Introducing a symlink in /share/guix/well-known/python/site-packages
   (or similar) for all three Python implementations (Python 2, Python
   3, PyPy 3) and use that
2) Use fixed /lib/python/site-packages for all Python packages (no two
   implementations can be used in the same environment right now anyway,
   due to shared PYTHONPATH)
3) Somehow access package metadata (native search path, properties, …)
   and encode the path there. This would be preferred, but is it even




Attachment: 0001-WIP-Proper-pypy3-support.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]