Hello all,
I have an interesting problem regarding substituting out a different version of 
Python.

Guix Generation
---------------------------
````
   guix 91f5036
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: 91f50366e5bc54951851e99f5600f9abb628b6ec
````

Scenario
---------------
I am trying to write a Guix package for a Python project which needs v3.12. 
Thus, I am using `(package-input-rewriting `((,python . ,python-next)) #:deep? 
#t)` to rewrite the package definition.

However, this fails in the build phase for the dependency `python-pip` - where 
it cannot find `setuptools`. 
```
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'
```

Root Cause Analysis
--------------------------------
This error is reproducible via the CLI. `guix build python-pip` succeeds as 
expected. But `guix build --with-input=python=python-next python-pip` fails 
with the same error.

Re: `guix shell --container -D python-pip`. In 
`$GUIX_ENVIRONMENT/lib/python3.10/site-packages/` setuptools is present.

Re: `guix shell --container --with-input=python=python-next -D python-pip`. In 
`$GUIX_ENVIRONMENT/lib/python3.12/site-packages/` setuptools is not present. 

Where did it go?? Am I misunderstanding the effect of package-input-rewriting 
or is there a knock-on effect from the substitution? I see the changing usage 
of `--with-ensurepip` in the various python definitions but it is turned on in 
`python-next` so I don't see how that's the problem.

Thank you,
Michael



Reply via email to