* setuptools in dependencies of rewritten Python package
@ 2024-12-20 1:20 Michael Zappa
2024-12-20 19:58 ` Hartmut Goebel
0 siblings, 1 reply; 2+ messages in thread
From: Michael Zappa @ 2024-12-20 1:20 UTC (permalink / raw)
To: help-guix
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: setuptools in dependencies of rewritten Python package
2024-12-20 1:20 setuptools in dependencies of rewritten Python package Michael Zappa
@ 2024-12-20 19:58 ` Hartmut Goebel
0 siblings, 0 replies; 2+ messages in thread
From: Hartmut Goebel @ 2024-12-20 19:58 UTC (permalink / raw)
To: help-guix
Am 20.12.24 um 02:20 schrieb Michael Zappa:
> Where did it go??
Looks like setuptools is no longer pre-installed with "ensurepip" and
"venv":
* https://docs.python.org/3.12/whatsnew/3.12.html (search for setuptools)
* https://github.com/astral-sh/python-build-standalone/issues/300
So I'm afraid you need to add setuptools as a netive-input to your build.
--
Regards
Hartmut Goebel
| Hartmut Goebel |h.goebel@crazy-compilers.com |
|www.crazy-compilers.com | compilers which you thought are impossible |
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-12-20 19:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-20 1:20 setuptools in dependencies of rewritten Python package Michael Zappa
2024-12-20 19:58 ` Hartmut Goebel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).