gnu: python-future: Update to 1.0.0.

* gnu/packages/python-xyz.scm (python-future): Update to 1.0.0.
[build-system]: Switch to pyproject-build-system.
[arguments] <tests?>: Enable them as issues was resolved in 0.17.0.
<test-flags>: Skip some problematic tests.
<phases>: Use default 'check and 'sanity-check.
[native-inputs]: Add python-pytest and python-setuptools.

Change-Id: I2f8c5ab093859022b419ae47264fca7c72aa94fa
This commit is contained in:
Sharlatan Hellseher 2025-09-15 22:26:37 +01:00
parent dbe0faa71f
commit e0df5f5279
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

@ -22394,42 +22394,42 @@ development version of CPython that are not available in older releases.")
(define-public python-future (define-public python-future
(package (package
(name "python-future") (name "python-future")
(version "0.18.2") (version "1.0.0")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (pypi-uri "future" version)) (uri (pypi-uri "future" version))
(sha256 (sha256
(base32 (base32 "01bvq2a5vgxffq8555rvwhxw161m9y54z2j5w7d1x1h7jcq6hadx"))))
"0zakvfj87gy6mn1nba06sdha63rn4njm7bhh0wzyrxhcny8avgmi")))) (build-system pyproject-build-system)
(build-system python-build-system)
;; Many tests connect to the network or are otherwise flawed.
;; https://github.com/PythonCharmers/python-future/issues/210
(arguments (arguments
`(#:tests? #f (list
#:phases #:test-flags
(modify-phases %standard-phases ;; Self tests failed.
(replace 'sanity-check #~(list "--ignore=tests/test_future/test_futurize.py"
(let ((sanity-check (assoc-ref %standard-phases 'sanity-check))) "-k" (string-join
(lambda* (#:key inputs outputs #:allow-other-keys #:rest args) ;; Self tests failed.
(let* ((files (find-files (site-packages inputs outputs) (list "not test_division"
"top_level\\.txt")) "test_functions_unchanged"
(backups (map (lambda (f) (string-append f ".bak")) "test_mixed_annotations"
files))) "test_multiple_param_annotations"
(for-each copy-file files backups) "test_print"
(substitute* files "test_range_slice"
;; Nobody be usin' winreg on Guix ;; Network access is required.
;; Also, don't force users to have tkinter when they don't "test_ftp"
;; need it "test_main"
(("(winreg|tkinter)") "")) "test_moves_urllib_request_http"
(apply sanity-check args) "test_urllib_request_http")
(for-each rename-file backups files)))))))) " and not "))))
(native-inputs
(list python-pytest
python-setuptools))
(home-page "https://python-future.org") (home-page "https://python-future.org")
(synopsis "Single-source support for Python 3 and 2") (synopsis "Single-source support for Python 3 and 2")
(description (description
"@code{python-future} is the missing compatibility layer between Python 2 and "@code{python-future} is the missing compatibility layer between Python 2
Python 3. It allows you to use a single, clean Python 3.x-compatible codebase and Python 3. It allows you to use a single, clean Python 3.x-compatible
to support both Python 2 and Python 3 with minimal overhead.") codebase to support both Python 2 and Python 3 with minimal overhead.")
(license license:expat))) (license license:expat)))
(define-public python-cysignals (define-public python-cysignals