GNU bug report logs - #52684
[BUG] Multiple Packages Failing to Build

Previous Next

Package: guix;

Reported by: Christopher Rodriguez <yewscion <at> gmail.com>

Date: Mon, 20 Dec 2021 20:13:01 UTC

Severity: normal

Full log


Message #38 received at 52684 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Rodriguez <yewscion <at> gmail.com>
To: 52684 <at> debbugs.gnu.org
Subject: [BUG] Multiple Packages Failing to Build
Date: Wed, 22 Dec 2021 14:59:09 -0500
[Message part 1 (text/plain, inline)]
I've been digging through the source, and it seems as though 
`python-build-system` does not actually set the $GUIX_PYTHONPATH 
variable in the environment. That variable seems to only be set by 
`python-2.7` and its derivatives, including `python3.9`, during a step 
after the install process.

I don't know if this is intended. If it is, that would mean that 
(currently) there is no easy way to set the $GUIX_PYTHONPATH variable 
outside of installing `python` in a profile. That would certainly be the 
most expedient way forward (and how it would be done on traditional 
distros).

Right now, beets is still calling the version of python in `/gnu/store`, 
but since it isn't installed alongside `beets` as a propagated-input the 
post-install step which sets that variable (which is called 
`install-sitecustomize.py` and relies of the package version of the 
python package being installed) is never run, and therefore the 
environment variable remains unset in the profile.

Both `guix install python` and `export 
GUIX_PYTHONPATH=/gnu/..../site-packages` work to allow the environment 
variable to be set. But it might be better and more future-proof to just 
install python in the profile as a dependency, since the program itself 
actually depends on `python` anyway.

What do You think?

Here is the relevant code, from /gnu/packages/python.scm.

```scheme

;Top of file


(define* (customize-site version)
  "Generate a install-sitecustomize.py phase, using VERSION."
  `(lambda* (#:key native-inputs inputs outputs #:allow-other-keys)
     (let* ((out (assoc-ref outputs "out"))
            (site-packages (string-append
                            out "/lib/python"
                            ,(version-major+minor version)
                            "/site-packages"))
            (sitecustomize.py (assoc-ref (or native-inputs inputs)
                                         "sitecustomize.py"))
            (dest (string-append site-packages "/sitecustomize.py")))
       (mkdir-p site-packages)
       (copy-file sitecustomize.py dest)
       ;; Set the correct permissions on the installed file, else the 
byte 

       ;; compilation phase fails with a permission denied error. 


       (chmod dest #o644))))


---8<-----------------------------------------------------------------
; python2.7 definition
	...
	...
         (add-after 'install 'install-sitecustomize.py
           ,(customize-site version)))))

```
[OpenPGP_0x1102102EBE7C3AE4.asc (application/pgp-keys, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]

This bug report was last modified 2 years and 361 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.