me
/
guix
Archived
1
0
Fork 0

gnu: python-distlib: Update to 0.3.7.

* gnu/packages/python-xyz.scm (python-distlib): Update to 0.3.7.
[build-system]: Switch to PYPROJECT-BUILD-SYSTEM.
[arguments]: Remove redundant phases.
[native-inputs]: Remove PYTHON-PYPA-BUILD.
Marius Bakke 2023-09-10 15:02:23 +08:00
parent 9d285c8beb
commit c08b919b67
No known key found for this signature in database
GPG Key ID: A2A06DF2A33A54FA
1 changed files with 7 additions and 19 deletions

View File

@ -8537,42 +8537,30 @@ and therefore easier to read and write.")
(define-public python-distlib
(package
(name "python-distlib")
(version "0.3.5")
(version "0.3.7")
(source
(origin
(method url-fetch)
(uri (pypi-uri "distlib" version))
(sha256
(base32
"1zmjraasgqkz0gfv4mc4w4fj4k2fxj62h1pf5dgb5qqbqwvmgxx7"))))
(build-system python-build-system)
"1a27f5p93j9i1l3324qgahs3g8ai91fmx783jpyyla506i5ybbwx"))))
(build-system pyproject-build-system)
(arguments
(list
#:phases
#~(modify-phases %standard-phases
(replace 'build
(lambda _
;; ZIP does not support timestamps before 1980.
(setenv "SOURCE_DATE_EPOCH" "315532800")
(invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
(add-before 'build 'no-/bin/sh
(lambda _
(substitute* '("distlib/scripts.py" "tests/test_scripts.py")
(("/bin/sh") (which "sh")))))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(add-before 'check 'prepare-test-environment
(lambda _
(setenv "HOME" "/tmp")
;; NOTE: Any value works, the variable just has to be present.
(setenv "SKIP_ONLINE" "1")
(when tests?
(invoke "pytest" "-vv"))))
(replace 'install
(lambda _
(let ((whl (car (find-files "dist" "\\.whl$"))))
(invoke "pip" "--no-cache-dir" "--no-input"
"install" "--no-deps" "--prefix" #$output whl)))))))
(setenv "SKIP_ONLINE" "1"))))))
(native-inputs
(list python-pypa-build python-pytest))
(list python-pytest))
(home-page "https://github.com/pypa/distlib")
(synopsis "Distribution utilities")
(description "Distlib is a library which implements low-level functions that