gnu: python-exceptiongroup: Update to 1.3.0.

* gnu/packages/python-build.scm (python-exceptiongroup): Update to 1.3.0.
  [build-system]: Use pyproject.
  [arguments] <build-backend>: Use 'setuptools.bulid_meta' propagated by
  flit_scm.
  <phases>: Use default 'build, 'install and 'check; add 'set-version.
  [propagated-inputs]: Add python-typing-extensions.
  [native-inputs]: Remove python-pypa-build.

Change-Id: I400165688236086ad85d961698e14d8ed8dd486f
This commit is contained in:
Sharlatan Hellseher 2025-07-15 22:12:55 +01:00
parent c979909a3b
commit e2002bad66
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

@ -794,40 +794,30 @@ reflected in the package visible to Python, without needing a reinstall.")
(define-public python-exceptiongroup (define-public python-exceptiongroup
(package (package
(name "python-exceptiongroup") (name "python-exceptiongroup")
(version "1.1.1") (version "1.3.0")
(source (origin (source
(method git-fetch) (origin
(uri (git-reference (method git-fetch)
(url "https://github.com/agronholm/exceptiongroup") (uri (git-reference
(commit version))) (url "https://github.com/agronholm/exceptiongroup")
(file-name (git-file-name name version)) (commit version)))
(sha256 (file-name (git-file-name name version))
(base32 (sha256
"0wcvzwgjs0xmggs6dh92jxdqi988gafzh10hrzvw10kasy0xakfj")))) (base32 "1kygngc6j7hm68w8q327jvym2z4gpyh93g2af6g419qaqqv7axkg"))))
(build-system python-build-system) (build-system pyproject-build-system)
(arguments (arguments
(list (list
#:tests? #f ;TODO: Circular dependency on pytest #:tests? #f ;to keep dependencies to a minimum
#:build-backend "setuptools.build_meta"
#:phases #:phases
#~(modify-phases %standard-phases #~(modify-phases %standard-phases
;; XXX: PEP 517 manual build/install procedures copied from (add-before 'build 'set-version
;; python-isort.
(replace 'build
(lambda _ (lambda _
(setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version) (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version))))))
;; ZIP does not support timestamps before 1980. (native-inputs
(setenv "SOURCE_DATE_EPOCH" "315532800") (list python-flit-scm))
(invoke "python" "-m" "build" "--wheel" "--no-isolation" "."))) (propagated-inputs
(replace 'install (list python-typing-extensions))
(lambda* (#:key outputs #:allow-other-keys)
(let ((whl (car (find-files "dist" "\\.whl$"))))
(invoke "pip" "--no-cache-dir" "--no-input"
"install" "--no-deps" "--prefix" #$output whl))))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(invoke "pytest" "-vv" "tests")))))))
(native-inputs (list python-flit-scm python-pypa-build))
(home-page "https://github.com/agronholm/exceptiongroup") (home-page "https://github.com/agronholm/exceptiongroup")
(synopsis "PEP 654 backport from Python 3.11") (synopsis "PEP 654 backport from Python 3.11")
(description "This is a backport of the @code{BaseExceptionGroup} and (description "This is a backport of the @code{BaseExceptionGroup} and