mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: python-cheetah: Do not set PYTHONPATH.
* gnu/packages/python-xyz.scm (python-cheetah) [arguments]: Remove the '#:modules' argument. [phases]: Delete trailing #t. {check}: Do not set PATH nor PYTHONPATH.
This commit is contained in:
parent
0f878656fc
commit
ce9253b38c
1 changed files with 8 additions and 26 deletions
|
@ -14490,43 +14490,25 @@ possible on all supported Python versions.")
|
||||||
"0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
|
"0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
|
||||||
(build-system python-build-system)
|
(build-system python-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:modules ((guix build utils)
|
`(#:phases (modify-phases %standard-phases
|
||||||
(guix build python-build-system)
|
|
||||||
(ice-9 ftw)
|
|
||||||
(srfi srfi-1)
|
|
||||||
(srfi srfi-26))
|
|
||||||
#:phases (modify-phases %standard-phases
|
|
||||||
(add-after 'unpack 'use-absolute-python
|
(add-after 'unpack 'use-absolute-python
|
||||||
(lambda _
|
(lambda _
|
||||||
(substitute* "Cheetah/CheetahWrapper.py"
|
(substitute* "Cheetah/CheetahWrapper.py"
|
||||||
(("#!/usr/bin/env python")
|
(("#!/usr/bin/env python")
|
||||||
(string-append "#!" (which "python"))))
|
(string-append "#!" (which "python"))))))
|
||||||
#t))
|
|
||||||
(add-after 'unpack 'fix-tests
|
(add-after 'unpack 'fix-tests
|
||||||
(lambda _
|
(lambda _
|
||||||
(substitute* "Cheetah/Tests/ImportHooks.py"
|
(substitute* "Cheetah/Tests/ImportHooks.py"
|
||||||
(("os.path.dirname\\(__file__\\)")
|
(("os.path.dirname\\(__file__\\)")
|
||||||
(string-append "'" (getcwd) "/Cheetah/Tests'")))
|
(string-append "'" (getcwd) "/Cheetah/Tests'")))))
|
||||||
#t))
|
|
||||||
(replace 'check
|
(replace 'check
|
||||||
(lambda _
|
(lambda _
|
||||||
(let ((cwd (getcwd)))
|
(setenv "TMPDIR" "/tmp")
|
||||||
(setenv "PYTHONPATH"
|
(substitute* "Cheetah/Tests/Test.py"
|
||||||
(string-append
|
(("unittest.TextTestRunner\\(\\)")
|
||||||
cwd "/build/"
|
"unittest.TextTestRunner(verbosity=2)"))
|
||||||
(find (cut string-prefix? "lib" <>)
|
|
||||||
(scandir (string-append cwd "/build")))
|
|
||||||
":" (getenv "PYTHONPATH")))
|
|
||||||
(setenv "PATH"
|
|
||||||
(string-append (getenv "PATH")
|
|
||||||
":" cwd "/bin"))
|
|
||||||
(setenv "TMPDIR" "/tmp")
|
|
||||||
|
|
||||||
(substitute* "Cheetah/Tests/Test.py"
|
(invoke "python" "Cheetah/Tests/Test.py"))))))
|
||||||
(("unittest.TextTestRunner\\(\\)")
|
|
||||||
"unittest.TextTestRunner(verbosity=2)"))
|
|
||||||
|
|
||||||
(invoke "python" "Cheetah/Tests/Test.py")))))))
|
|
||||||
(propagated-inputs
|
(propagated-inputs
|
||||||
`(("python-markdown" ,python-markdown))) ;optional
|
`(("python-markdown" ,python-markdown))) ;optional
|
||||||
(home-page "https://cheetahtemplate.org/")
|
(home-page "https://cheetahtemplate.org/")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue