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 (define-public python-distlib
(package (package
(name "python-distlib") (name "python-distlib")
(version "0.3.5") (version "0.3.7")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (pypi-uri "distlib" version)) (uri (pypi-uri "distlib" version))
(sha256 (sha256
(base32 (base32
"1zmjraasgqkz0gfv4mc4w4fj4k2fxj62h1pf5dgb5qqbqwvmgxx7")))) "1a27f5p93j9i1l3324qgahs3g8ai91fmx783jpyyla506i5ybbwx"))))
(build-system python-build-system) (build-system pyproject-build-system)
(arguments (arguments
(list (list
#:phases #:phases
#~(modify-phases %standard-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 (add-before 'build 'no-/bin/sh
(lambda _ (lambda _
(substitute* '("distlib/scripts.py" "tests/test_scripts.py") (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
(("/bin/sh") (which "sh"))))) (("/bin/sh") (which "sh")))))
(replace 'check (add-before 'check 'prepare-test-environment
(lambda* (#:key tests? #:allow-other-keys) (lambda _
(setenv "HOME" "/tmp") (setenv "HOME" "/tmp")
;; NOTE: Any value works, the variable just has to be present. ;; NOTE: Any value works, the variable just has to be present.
(setenv "SKIP_ONLINE" "1") (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)))))))
(native-inputs (native-inputs
(list python-pypa-build python-pytest)) (list python-pytest))
(home-page "https://github.com/pypa/distlib") (home-page "https://github.com/pypa/distlib")
(synopsis "Distribution utilities") (synopsis "Distribution utilities")
(description "Distlib is a library which implements low-level functions that (description "Distlib is a library which implements low-level functions that