Hi folks, I ran across a situation today in which I needed a newer version of Python than what is provided via the `python` package in Guix main (version 3.10.7).
Fortunately, Guix does have a `python-next` package (version 3.12.2) that is sufficiently up-to-date for my needs. Unfortunately, I also need some Python libraries installed along with it, and this makes the problem much more challenging. So let's start simple. I can create the environment I want with the standard `python` package: ``` guix shell --pure coreutils bash python python-grpcio python-protobuf python-dateutil python-pytz ``` I get Python 3.10.7, and all of the libraries I requested land in $GUIX_PYTHONPATH. This directory is, of course, tied to python3.10 and looks like this: ``` /gnu/store/$HASH-profile/lib/python3.10/site-packages ``` So that's close, but it's not really what I need. Next I try switching in `python-next` in place of `python`. ``` guix shell --pure coreutils bash python-next python-grpcio python-protobuf python-dateutil python-pytz ``` Now, I get Python 3.12.2, but $GUIX_PYTHONPATH is empty. This profile's directory is now tied to python3.12 and looks like this: ``` /gnu/store/2akhhxfkzddkanna5kp2pf95bq0gq8rs-profile/lib/python3.12/site-packages ``` Okay, so it looks like all of the libraries I wanted were still built against the `python` package because it is included by the `python-build-system`, which is used in all of their package definitions. For my next attempt, I used the `--with-input` package transformation option to try and recursively replace `python` with `python-next` in the package dependency tree like so: ``` guix shell --pure coreutils bash python-next python-grpcio python-protobuf python-dateutil python-pytz --with-input=python=python-next ``` Unfortunately, this crashes when attempting to build `python-pytz`. Here's the relevant build error: ``` ...previous phases are successful... starting phase `build' running "python setup.py" with command "build" and parameters () Traceback (most recent call last): File "<string>", line 1, in <module> ModuleNotFoundError: No module named 'setuptools' ``` So...`python-setuptools` is missing from the build environment? Unfortunately, adding `python-setuptools` to the `guix shell` invocation doesn't seem to work. What am I missing here? Surely some wise Guix hacker must have figured this out already, right? Thanks in advance, Gary -- Use `gpg --search-keys gary.john...@disroot.org' to find me Protect yourself from surveillance: https://emailselfdefense.fsf.org ======================================================================= () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments Why is HTML email a security nightmare? See https://useplaintext.email/ Please avoid sending me MS-Office attachments. See http://www.gnu.org/philosophy/no-word-attachments.html