Hello, Am Tue, Feb 18, 2025 at 05:51:25PM -0500 schrieb Gary Johnson: > 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.
package definitions are self-contained. So when calling "guix shell", first the python-pytz package would be built (but this fails), then the shell would be started with the packages in it. Otherwise said, the package builds see nothing of your shell - this is part of the functional paradigm, package builds are functions of their arguments (inputs etc.) and independent of the surrounding state. Or very short: build environment ≠ your guix shell The attached patch works when you are in a git checkout of Guix, with the current Python and with python-next. But it requires a lot of package rebuilds, so I am not going to apply it on master. I suppose that the Python team will apply something like it when updating Python. Andreas
>From f4036ebe78bc6e7f18fbb5c971f6494e814effea Mon Sep 17 00:00:00 2001 Message-ID: <f4036ebe78bc6e7f18fbb5c971f6494e814effea.1740152892.git.andr...@enge.fr> From: Andreas Enge <andr...@enge.fr> Date: Fri, 21 Feb 2025 16:47:25 +0100 Subject: [PATCH] gnu: python-pytz: Add python-setuptools. * gnu/packages/time.scm (python-pytz)[native-inputs]: Add python-setuptools. Change-Id: Ic8e021bf2e5bf300a3c37987f99d7c500da9edc1 --- gnu/packages/time.scm | 1 + 1 file changed, 1 insertion(+) diff --git a/gnu/packages/time.scm b/gnu/packages/time.scm index 46e78c7ab7..06b60cf5d9 100644 --- a/gnu/packages/time.scm +++ b/gnu/packages/time.scm @@ -208,6 +208,7 @@ (define-public python-pytz (base32 "0yrxykwhk18x22lp0hjlj98mgnzrzlclz8kxam5vl7jap6zdskvv")))) (build-system python-build-system) + (native-inputs (list python-setuptools)) (home-page "http://pythonhosted.org/pytz") (synopsis "Python timezone library") (description "This library brings the Olson tz database into Python. It base-commit: a036a455da1c91282ac2c6a7ca9757ee2e8ba107 prerequisite-patch-id: 4112cdb912e4a3cda381c856517850fa4181cb2c -- 2.48.1