[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
70/163: gnu: solfege: Wrap with the new Guix PYTHONPATH.
From: |
guix-commits |
Subject: |
70/163: gnu: solfege: Wrap with the new Guix PYTHONPATH. |
Date: |
Mon, 25 Jan 2021 02:01:34 -0500 (EST) |
apteryx pushed a commit to branch cu/farewell-to-pythonpath
in repository guix.
commit 4abecb487312d9cce2c18d1bf51fa73bb024cb53
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Sat Jan 23 01:06:51 2021 -0500
gnu: solfege: Wrap with the new Guix PYTHONPATH.
* gnu/packages/music.scm (solfege): Delete trailing #t.
[phases]{add-sitedirs}: Indent Python snippet.
{wrap-program}: Wrap with the new Guix PYTHONPATH.
---
gnu/packages/music.scm | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index b3c25a7..af16d4f 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -33,6 +33,7 @@
;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
;;; Copyright © 2019 Riku Viitanen <riku.viitanen0@gmail.com>
;;; Copyright © 2020 Ryan Prior <rprior@protonmail.com>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1670,7 +1671,12 @@ Key features include:
"1w25rxdbj907nsx285k9nm480pvy12w3yknfh4n1dfv17cwy072i"))))
(build-system gnu-build-system)
(arguments
- `(#:tests? #f ; xmllint attempts to download DTD
+ `(#:imported-modules ,(cons '(guix build python-build-system)
+ %gnu-build-system-modules)
+ #:modules ((guix build gnu-build-system)
+ ((guix build python-build-system) #:select (guix-pythonpath))
+ (guix build utils))
+ #:tests? #f ; xmllint attempts to download DTD
#:test-target "test"
#:phases
(modify-phases %standard-phases
@@ -1680,16 +1686,14 @@ Key features include:
(("/usr/bin/aplay") "aplay")
(("/usr/bin/timidity") "timidity")
(("/usr/bin/mpg123") "mpg123")
- (("/usr/bin/ogg123") "ogg123"))
- #t))
+ (("/usr/bin/ogg123") "ogg123"))))
(add-before 'build 'patch-python-shebangs
(lambda _
;; Two python scripts begin with a Unicode BOM, so patch-shebang
;; has no effect.
(substitute* '("solfege/parsetree.py"
"solfege/presetup.py")
- (("#!/usr/bin/python") (string-append "#!" (which "python"))))
- #t))
+ (("#!/usr/bin/python") (string-append "#!" (which "python"))))))
(add-before 'build 'add-sitedirs
;; .pth files are not automatically interpreted unless the
;; directories containing them are added as "sites". The
directories
@@ -1699,22 +1703,20 @@ Key features include:
(substitute* "run-solfege.py"
(("import os")
"import os, site
-for path in [path for path in sys.path if 'site-packages' in path]:
site.addsitedir(path)"))
- #t))
+for path in [path for path in sys.path if 'site-packages' in path]:
+ site.addsitedir(path)"))))
(add-before 'build 'adjust-config-file-prefix
(lambda* (#:key outputs #:allow-other-keys)
(substitute* "run-solfege.py"
(("prefix = os.path.*$")
- (string-append "prefix = " (assoc-ref outputs "out"))))
- #t))
+ (string-append "prefix = " (assoc-ref outputs "out"))))))
(add-after 'install 'wrap-program
(lambda* (#:key inputs outputs #:allow-other-keys)
;; Make sure 'solfege' runs with the correct PYTHONPATH.
(let* ((out (assoc-ref outputs "out"))
- (path (getenv "PYTHONPATH")))
+ (pythonpath (guix-pythonpath inputs)))
(wrap-program (string-append out "/bin/solfege")
- `("PYTHONPATH" ":" prefix (,path))))
- #t)))))
+ `(,pythonpath ":" prefix (,(getenv pythonpath))))))))))
(inputs
`(("python" ,python-2)
("pygtk" ,python2-pygtk)
- 119/163: gnu: komikku: Wrap with the new Guix PYTHONPATH., (continued)
- 119/163: gnu: komikku: Wrap with the new Guix PYTHONPATH., guix-commits, 2021/01/25
- 121/163: gnu: python-pathos: Do not set PYTHONPATH., guix-commits, 2021/01/25
- 126/163: gnu: python-hdf4: Do not set PYTHONPATH., guix-commits, 2021/01/25
- 20/163: gnu: gess: Adjust to use Guix PYTHONPATH., guix-commits, 2021/01/25
- 23/163: gnu: find-circ: Wrap with the new Guix PYTHONPATH., guix-commits, 2021/01/25
- 17/163: gnu: bamm: Update following changes to the Python build system., guix-commits, 2021/01/25
- 28/163: gnu: python-cffi: Do not set PYTHONPATH., guix-commits, 2021/01/25
- 46/163: gnu: avogadro: Wrap with the new Guix PYTHONPATH., guix-commits, 2021/01/25
- 33/163: gnu: python-pyhamcrest: Update to 2.0.2., guix-commits, 2021/01/25
- 52/163: gnu: ibus: Wrap with the new Guix PYTHONPATH., guix-commits, 2021/01/25
- 70/163: gnu: solfege: Wrap with the new Guix PYTHONPATH.,
guix-commits <=
- 101/163: gnu: presentty: Wrap with the new Guix PYTHONPATH., guix-commits, 2021/01/25
- 87/163: gnu: python-fenics-dijitso: Do not alter PYTHONPATH., guix-commits, 2021/01/25
- 96/163: gnu: entangle: Wrap with the new Guix PYTHONPATH., guix-commits, 2021/01/25
- 85/163: gnu: units: Wrap with the new Guix PYTHONPATH., guix-commits, 2021/01/25
- 84/163: gnu: glimpse: Use the new Guix PYTHONPATH., guix-commits, 2021/01/25
- 103/163: gnu: python-pytest-isort: Do not set PYTHONPATH., guix-commits, 2021/01/25
- 107/163: gnu: rhythmbox: Wrap with the new Guix PYTHONPATH., guix-commits, 2021/01/25
- 127/163: gnu: python-aenum: Do not set PYTHONPATH., guix-commits, 2021/01/25
- 133/163: gnu: python-pygithub: Do not set PYTHONPATH., guix-commits, 2021/01/25
- 26/163: gnu: python-xmlschema: Do not set PYTHONPATH., guix-commits, 2021/01/25