summaryrefslogtreecommitdiff
path: root/gnu/packages/python-build.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/python-build.scm')
-rw-r--r--gnu/packages/python-build.scm593
1 files changed, 304 insertions, 289 deletions
diff --git a/gnu/packages/python-build.scm b/gnu/packages/python-build.scm
index 8e189c05dc..e6fd9049ed 100644
--- a/gnu/packages/python-build.scm
+++ b/gnu/packages/python-build.scm
@@ -4,7 +4,7 @@
;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
;;; Copyright © 2020, 2023 Marius Bakke <marius@gnu.org>
;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
-;;; Copyright © 2018, 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2018, 2021-2023, 2025 Maxim Cournoyer <maxim@guixotic.coop>
;;; Copyright © 2019 Vagrant Cascadian <vagrant@debian.org>
;;; Copyright © 2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2020, 2021, 2022, 2023 Ricardo Wurmus <rekado@elephly.net>
@@ -36,6 +36,7 @@
#:use-module (guix build-system python)
#:use-module (guix build-system pyproject)
#:use-module (guix gexp)
+ #:use-module (guix deprecation)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix packages))
@@ -55,15 +56,18 @@
(define-public python-pathspec
(package
(name "python-pathspec")
- (version "0.11.1")
+ (version "0.12.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pathspec" version))
(sha256
- (base32
- "11qnlcanr1mqcpqpq1hmnwrs26csbsa2bafc7biq09x91y0dx617"))))
- (build-system python-build-system)
+ (base32 "04jpkzic8f58z6paq7f3f7fdnlv9l89khv3sqsqk7ax10caxb0m4"))))
+ (build-system pyproject-build-system)
+ (arguments (list #:test-backend #~'unittest))
+ (native-inputs
+ (list python-flit-core
+ python-setuptools))
(home-page "https://github.com/cpburnz/python-pathspec")
(synopsis "Utility library for gitignore style pattern matching of file paths")
(description
@@ -74,14 +78,14 @@ matching of file paths.")
(define-public python-pluggy
(package
(name "python-pluggy")
- (version "1.5.0")
+ (version "1.6.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pluggy" version))
(sha256
- (base32 "1w8c3mpliqm9biqw75ci8cfj1x5pb6g5zwblqp27ijgxjj7aizrc"))))
- (build-system python-build-system)
+ (base32 "1wr2vnbb7gy9wlz01yvb7rn4iqzd3mwmidk11ywk7395fq5i7k3x"))))
+ (build-system pyproject-build-system)
(native-inputs
(list python-setuptools
python-setuptools-scm
@@ -103,9 +107,11 @@ stripped of Pytest specific details.")
(uri (pypi-uri "toml" version))
(sha256
(base32 "13z6rff86bzdpl094x0vmfvls779931xj90dlbs9kpfm138s3gdk"))))
- (build-system python-build-system)
+ (build-system pyproject-build-system)
(arguments
`(#:tests? #f)) ;no tests suite in release
+ (native-inputs
+ (list python-setuptools))
(home-page "https://github.com/uiri/toml")
(synopsis "Library for TOML")
(description
@@ -116,16 +122,16 @@ Language (TOML) configuration files.")
(define-public python-tomli-w
(package
(name "python-tomli-w")
- (version "1.0.0")
+ (version "1.2.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "tomli_w" version))
(sha256
- (base32 "1fg13bfq5qy1ym4x77815nhxh1xpfs0drhn9r9464cz00m1l6qzl"))))
+ (base32 "08ahw9db7qycd4fzh4j51cgzp1rdl7snm5scrplpphj7ban4zl9d"))))
(build-system pyproject-build-system)
(arguments (list #:tests? #f)) ;to avoid extra dependencies
- (native-inputs (list python-pypa-build python-flit-core))
+ (native-inputs (list python-flit-core))
(home-page "https://github.com/hukkin/tomli-w")
(synopsis "Minimal TOML writer")
(description "Tomli-W is a Python library for writing TOML. It is a
@@ -141,51 +147,30 @@ write-only counterpart to Tomli, which is a read-only TOML parser.")
(method url-fetch)
(uri (pypi-uri "pytoml" version))
(sha256
- (base32
- "1rv1byiw82k7mj6aprcrqi2vdabs801y97xhfnrz7kxds34ggv4f"))))
- (build-system python-build-system)
+ (base32 "1rv1byiw82k7mj6aprcrqi2vdabs801y97xhfnrz7kxds34ggv4f"))))
+ (build-system pyproject-build-system)
+ (arguments `(#:tests? #f)) ;to avoid pytest dependency
+ (native-inputs
+ (list python-setuptools))
(home-page "https://github.com/avakar/pytoml")
(synopsis "Parser for TOML")
(description "This package provides a Python parser for TOML-0.4.0.")
(license license:expat)))
-(define-public python-six-bootstrap
- (package
- (name "python-six-bootstrap")
- (version "1.16.0")
- (source
- (origin
- (method url-fetch)
- (uri (pypi-uri "six" version))
- (sha256
- (base32
- "09n9qih9rpj95q3r4a40li7hk6swma11syvgwdc68qm1fxsc6q8y"))))
- (build-system python-build-system)
- (arguments `(#:tests? #f)) ;to avoid pytest dependency
- (home-page "https://pypi.org/project/six/")
- (synopsis "Python 2 and 3 compatibility utilities")
- (description
- "Six is a Python 2 and 3 compatibility library. It provides utility
-functions for smoothing over the differences between the Python versions with
-the goal of writing Python code that is compatible on both Python versions.
-Six supports every Python version since 2.5. It is contained in only one
-Python file, so it can be easily copied into your project.")
- (license license:x11)))
-
(define-public python-tomli
(package
(name "python-tomli")
- (version "2.1.0")
+ (version "2.2.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "tomli" version))
(sha256
- (base32 "1f4a9nvy8g82bl0k1wdxz9y1j843ai4l4glp0iyy357c5ap6qr1z"))))
+ (base32 "1zq58p2bplyf0xpi9fnyn4w6vc1fkw8whkj0yxhcwdf8g7ff2ifd"))))
(build-system pyproject-build-system)
(arguments
`(#:tests? #f)) ;disabled to avoid extra dependencies
- (native-inputs (list python-flit-core-bootstrap python-six-bootstrap))
+ (native-inputs (list python-flit-core-bootstrap))
(home-page "https://github.com/hukkin/tomli")
(synopsis "Small and fast TOML parser")
(description "Tomli is a minimal TOML parser that is fully compatible with
@@ -196,16 +181,17 @@ Python file, so it can be easily copied into your project.")
(define-public python-trove-classifiers
(package
(name "python-trove-classifiers")
- (version "2024.10.21.16")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "trove_classifiers" version))
- (sha256
- (base32
- "1wzmij9b84pixms7nk2fawhvryj355rsi4rjwsfrspkxsrax1jqp"))))
+ (version "2025.5.9.12")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "trove_classifiers" version))
+ (sha256
+ (base32 "1dawkrcc353rz1h4mazw25vkbhics5lpqrwc8qad6b3flykwi9vw"))))
(build-system pyproject-build-system)
- (arguments (list #:build-backend "setuptools.build_meta"
- #:tests? #f)) ;keep dependencies to a minimum
+ (arguments
+ (list #:build-backend "setuptools.build_meta"
+ #:tests? #f)) ;keep dependencies to a minimum
(native-inputs (list python-setuptools python-wheel))
(home-page "https://github.com/pypa/trove-classifiers")
(synopsis "Canonical source for classifiers on PyPI")
@@ -216,13 +202,13 @@ PyPI (pypi.org).")
(define-public python-typing-extensions
(package
(name "python-typing-extensions")
- (version "4.12.2")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "typing_extensions" version))
- (sha256
- (base32
- "1f7z47hmz48kgixzb3ffw6zml8j1iflf6ml8xr6xsng5qxasszhs"))))
+ (version "4.15.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "typing_extensions" version))
+ (sha256
+ (base32 "0rhlhs28jndgp9fghdhidn6g7xiwx8vvihxbxhlgl4ncfg8lishc"))))
(build-system pyproject-build-system)
;; Disable the test suite to keep the dependencies to a minimum. Also,
;; the test suite requires Python's test module, not available in Guix.
@@ -252,6 +238,9 @@ Included are implementations of:
@end enumerate\n")
(license license:psfl)))
+(define-deprecated/public-alias python-typing-extensions-next
+ python-typing-extensions) ;may be removed after 2025-12-01
+
;;;
;;; Python builder packages.
@@ -259,14 +248,14 @@ Included are implementations of:
(define-public python-pip
(package
(name "python-pip")
- (version "23.1")
+ (version "25.1.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pip" version))
(sha256
(base32
- "0jnk639v9h7ghslm4jnlic6rj3v29nygflx1hgxxndg5gs4kk1a0"))
+ "0xwhrng91a48zb5qmb6vagbjr6kzvbc8b08nq9a5139h3m0mvr1x"))
(snippet
#~(begin
(delete-file "src/pip/_vendor/certifi/cacert.pem")
@@ -296,9 +285,11 @@ def where() -> str:
def contents() -> str:
with open(where(), \"r\", encoding=\"ascii\") as data:
return data.read()")))))))
- (build-system python-build-system)
+ (build-system pyproject-build-system)
(arguments
'(#:tests? #f)) ; there are no tests in the pypi archive.
+ (native-inputs
+ (list python-setuptools))
(home-page "https://pip.pypa.io/")
(synopsis "Package manager for Python software")
(description
@@ -309,14 +300,13 @@ Python Package Index (PyPI).")
(define-public python-setuptools
(package
(name "python-setuptools")
- (version "67.6.1")
+ (version "80.9.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "setuptools" version))
(sha256
- (base32
- "16myxkpa89r045il88zcygdy1zbi2mvvpz5b4a70p9jhklmfjz95"))
+ (base32 "175iixi2h2jz8y2bpwziak360hvv43jfhipwzbdniryd5r04fszk"))
(modules '((guix build utils)))
(snippet
;; TODO: setuptools now bundles the following libraries:
@@ -325,7 +315,7 @@ Python Package Index (PyPI).")
;; installers for Windows.
'(for-each delete-file (find-files "setuptools"
"^(cli|gui).*\\.exe$")))))
- (build-system python-build-system)
+ (build-system pyproject-build-system)
;; FIXME: Tests require pytest, which itself relies on setuptools.
;; One could bootstrap with an internal untested setuptools.
(arguments (list #:tests? #f))
@@ -345,41 +335,43 @@ facilitate packaging Python projects, where packaging includes:
license:asl2.0 ;packaging is dual ASL2/BSD-2
license:bsd-2))))
-(define-public python-setuptools-next
+(define-public python-setuptools-67
(package
(inherit python-setuptools)
- (name "python-setuptools")
- (version "79.0.1")
+ (version "67.6.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "setuptools" version))
(sha256
- (base32 "127svm8cdpvmq37gcrbvdr9fhrhs0nscnzh63gypjc1wyfwfg30j"))
+ (base32 "16myxkpa89r045il88zcygdy1zbi2mvvpz5b4a70p9jhklmfjz95"))
(modules '((guix build utils)))
(snippet
- #~(begin
- (for-each delete-file
- (find-files "setuptools" "^(cli|gui).*\\.exe$"))))))
- (build-system pyproject-build-system)))
+ '(for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$")))))
+ (native-inputs
+ (list python-wheel-0.40))))
+
+(define-deprecated/public-alias python-setuptools-next
+ python-setuptools) ;may be removed after 2025-12-01
(define-public python-wheel
(package
(name "python-wheel")
- (version "0.40.0")
+ (version "0.46.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "wheel" version))
(sha256
- (base32
- "0ww8fgkvwv35ypj4cnngczdwp6agr4qifvk2inb32azfzbrrc4fd"))))
- (build-system python-build-system)
+ (base32 "0f3abrpkf3spv0lk5mhv8m2ch0j074a3rivn7hfxzxx0bpxpwizx"))))
+ (build-system pyproject-build-system)
(arguments
;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
;; fails to find the newly-built bdist_wheel library, even though it is
;; available on PYTHONPATH. What search path is consulted by setup.py?
'(#:tests? #f))
+ (native-inputs
+ (list python-flit-core))
(home-page "https://github.com/pypa/wheel")
(synopsis "Format for built Python packages")
(description
@@ -392,24 +384,38 @@ scripts to their final locations) at any later time. Wheel files can be
installed with a newer @code{pip} or with wheel's own command line utility.")
(license license:expat)))
+(define-public python-wheel-0.40
+ (package
+ (inherit python-wheel)
+ (version "0.40.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "wheel" version))
+ (sha256
+ (base32 "0ww8fgkvwv35ypj4cnngczdwp6agr4qifvk2inb32azfzbrrc4fd"))))))
+
;;; TODO: Deprecate with https://github.com/pypa/pyproject-hooks.
+;;;
+;;; From PyPI web page: The core of this package has been renamed to
+;;; pyproject-hooks (https://pyproject-hooks.readthedocs.io). Please use that
+;;; package or build (https://pypa-build.readthedocs.io/en/stable/) in place
+;;; of pep517.
(define-public python-pep517-bootstrap
(hidden-package
(package
(name "python-pep517-bootstrap")
- (version "0.9.1")
+ (version "0.13.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pep517" version))
(sha256
- (base32
- "0zqidxah03qpnp6zkg3zd1kmd5f79hhdsfmlc0cldaniy80qddxf"))))
- (build-system python-build-system)
+ (base32 "05xk0x7b5n7zmcqrznm4lnbakgdjpin19mp5zyzb92wksgzs4bqv"))))
+ (build-system pyproject-build-system)
(arguments
`(#:tests? #f)) ;to avoid circular dependencies
- (propagated-inputs
- (list python-toml python-wheel))
+ (native-inputs (list python-flit-core))
(home-page "https://github.com/pypa/pep517")
(synopsis "Wrappers to build Python packages using PEP 517 hooks")
(description
@@ -419,13 +425,13 @@ installed with a newer @code{pip} or with wheel's own command line utility.")
(define-public python-pyparsing
(package
(name "python-pyparsing")
- (version "3.2.1")
+ (version "3.2.3")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pyparsing" version))
(sha256
- (base32 "02jz5rv3vx46xvjszda467l269jz9narlrwd0a83mpk6zma0i631"))))
+ (base32 "1giqgjknzbbh34qf8ij5rsrqlxfysjx39xi85vvl5ddkp0d3zhdr"))))
(build-system pyproject-build-system)
(outputs '("out" "doc"))
(arguments
@@ -457,34 +463,18 @@ of regular expressions. The pyparsing module provides a library of classes
that client code uses to construct the grammar directly in Python code.")
(license license:expat)))
-;;; This is the last release compatible with Python 2.
-(define-public python-pyparsing-2.4.7
- (package
- (inherit python-pyparsing)
- (version "2.4.7")
- (source
- (origin
- (method url-fetch)
- (uri (pypi-uri "pyparsing" version))
- (sha256
- (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))
- (native-inputs (list python-setuptools python-wheel))))
-
(define-public python-packaging-bootstrap
(package
(name "python-packaging-bootstrap")
- (version "24.2")
+ (version "25.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "packaging" version))
(sha256
- (base32
- "0zxrq3nn0lmmqp3p2d92v0yqbs29kl87k4vkqmmk8bckbvfaca62"))))
+ (base32 "0kzwn2ar4ndm90qrvgyjcbkqz3klrg0ziwm1yrhbyxynk0n8fhyl"))))
(build-system pyproject-build-system)
(arguments `(#:tests? #f)) ;disabled to avoid extra dependencies
- (propagated-inputs
- (list python-pyparsing python-six-bootstrap))
(native-inputs
(list python-flit-core))
(home-page "https://github.com/pypa/packaging")
@@ -503,27 +493,22 @@ information.")
(define-public python-pypa-build
(package
(name "python-pypa-build")
- (version "0.7.0")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "build" version))
- (sha256
- (base32
- "17xqija27x4my1yrnk6q2vwln60r39g2dhby9zg2l99qjgbdrahs"))))
- (build-system python-build-system)
- (arguments
- `(#:tests? #f ;to tests in the PyPI release
- #:phases (modify-phases %standard-phases
- (add-after 'unpack 'use-toml-instead-of-tomli
- ;; Using toml instead of tomli eases bootstrapping.
- (lambda _
- (substitute* "setup.cfg"
- (("tomli>=.*")
- "toml\n")))))))
+ ;; Newer version needs more inputs, consider to move to python-xyz.
+ (version "0.9.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "build" version))
+ (sha256
+ (base32 "0g5w28ban6k9qywqwdqiqms3crg75rsvfphl4f4qkg8wi57741qs"))))
+ (build-system pyproject-build-system)
+ (arguments `(#:tests? #f)) ;disabled to avoid extra dependencies
+ (native-inputs
+ (list python-setuptools))
(propagated-inputs
- `(("python-packaging" ,python-packaging-bootstrap)
- ("python-pep517", python-pep517-bootstrap)
- ("python-toml" ,python-toml)))
+ (list python-packaging-bootstrap
+ python-pep517-bootstrap
+ python-toml))
(home-page "https://pypa-build.readthedocs.io/en/latest/")
(synopsis "Simple Python PEP 517 package builder")
(description "The @command{build} command invokes the PEP 517 hooks to
@@ -559,13 +544,13 @@ order to make bootstrapping easier.")
(define-public python-poetry-core
(package
(name "python-poetry-core")
- (version "1.9.1")
+ (version "2.1.3")
(source
(origin
(method url-fetch)
(uri (pypi-uri "poetry_core" version))
(sha256
- (base32 "1f31gwhnfyrdymlm0ym6k6c6r0x98zcr2s4xz4blz2zm9chljbbs"))))
+ (base32 "194nwaig8zkbj2ig4zwf1k7cl4vqlmvs8mmdkb425mky8was08h5"))))
(build-system pyproject-build-system)
(arguments
`(#:tests? #f)) ;disabled to avoid extra dependencies
@@ -578,51 +563,46 @@ a light weight, fully compliant, self-contained package allowing PEP 517
compatible build front-ends to build Poetry managed projects.")
(license license:expat)))
-(define-public python-poetry-core-next
- (package/inherit python-poetry-core
- (version "2.1.2")
- (source
- (origin
- (method url-fetch)
- (uri (pypi-uri "poetry_core" version))
- (sha256
- (base32 "015a0802radb2x5wsbywm4fggv4s1srh8zyml5v58xgrxg8bpnzr"))))))
+(define-deprecated/public-alias python-poetry-core-next
+ python-poetry-core) ;may be removed after 2025-12-01
;;; This package exists to bootstrap python-tomli.
(define-public python-flit-core-bootstrap
(package
(name "python-flit-core-bootstrap")
- (version "3.8.0")
+ (version "3.12.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "flit" version))
(sha256
- (base32 "0dz9sp2zlhkmk6sm5gapbbb30f7xq3n3jn5zxx5pkp25ppsaiwnh"))))
- (build-system python-build-system)
+ (base32 "0h1pxi2hgr95321bgl45l86693zl14l3shj0idsyg4k9v56z700w"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ ;; flit-core has a test suite, but it requires Pytest. Disable it so
+ ;; as to not pull pytest as an input.
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-license
+ ;; flit_core bundles the 'tomli' TOML parser, to avoid a
+ ;; bootstrapping problem. See
+ ;; <https://github.com/pypa/packaging-problems/issues/342>.
+ (lambda _
+ (delete-file-recursively "flit_core/flit_core/vendor")
+ (substitute* "flit_core/pyproject.toml"
+ (("license-files.*") "license-files = [\"LICENSE*\"]\n"))))
+ (replace 'build
+ ;; flit-core requires itself to build. Luckily, a
+ ;; bootstrapping script exists, which does so using just
+ ;; the checkout sources and Python.
+ (lambda _
+ (chdir "flit_core")
+ (invoke "python" "build_dists.py")))
+ (delete 'sanity-check))))
(propagated-inputs
(list python-toml))
- (arguments
- ;; flit-core has a test suite, but it requires Pytest. Disable it so
- ;; as to not pull pytest as an input.
- `(#:tests? #f
- #:phases
- (modify-phases %standard-phases
- (replace 'build
- ;; flit-core requires itself to build. Luckily, a
- ;; bootstrapping script exists, which does so using just
- ;; the checkout sources and Python.
- (lambda _
- (invoke "python" "flit_core/build_dists.py")))
- (replace 'install
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (whl (car (find-files "." "\\.whl$"))))
- (invoke "pip" "--no-cache-dir" "--no-input"
- "install" "--no-deps" "--prefix" out whl))))
- ;; The sanity-check phase fails because flit depends on tomli at
- ;; run-time, but this core variant avoids it to avoid a cycle.
- (delete 'sanity-check))))
(home-page "https://github.com/pypa/flit")
(synopsis "Core package of the Flit Python build system")
(description "This package provides @code{flit-core}, a PEP 517 build
@@ -635,38 +615,43 @@ specified by PEP 517, @code{flit_core.buildapi}.")
(name "python-flit-core")
(propagated-inputs
(modify-inputs (package-propagated-inputs python-flit-core-bootstrap)
- (replace "python-toml" python-tomli)))))
+ (delete "python-toml")
+ (prepend python-tomli)))))
-(define-public python-flit-core-next
- (package/inherit python-flit-core
- (name "python-flit-core")
- (version "3.12.0")
- (source
- (origin
- (method url-fetch)
- (uri (pypi-uri "flit" version))
- (sha256
- (base32 "0h1pxi2hgr95321bgl45l86693zl14l3shj0idsyg4k9v56z700w"))))))
+(define-deprecated/public-alias python-flit-core-next
+ python-flit-core) ;may be removed after 2025-12-01
(define-public python-flit-scm
(package
(name "python-flit-scm")
(version "1.7.0")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "flit_scm" version))
- (sha256
- (base32
- "1ckbkykfr7f7wzjzgh0gm7h6v3pqzx2l28rw6dsvl6zk4kxxc6wn"))))
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "flit_scm" version))
+ (sha256
+ (base32 "1ckbkykfr7f7wzjzgh0gm7h6v3pqzx2l28rw6dsvl6zk4kxxc6wn"))))
(build-system pyproject-build-system)
- (arguments (list #:tests? #f ;to avoid extra dependencies
- ;; flit-scm wants to use flit-core, which it renames to
- ;; 'buildapi', but that isn't found even when adding the
- ;; current directory to PYTHONPATH. Use setuptools'
- ;; builder instead.
- #:build-backend "setuptools.build_meta"))
- (propagated-inputs (list python-flit-core python-setuptools-scm python-tomli))
- (native-inputs (list python-setuptools python-wheel))
+ (arguments
+ (list
+ #:tests? #f ;no tests in PyPI archive or Git checkout
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-backend
+ ;; flit_scm imports flit_core's buildapi and tries to make it
+ ;; available as "flit_scm:buildapi", see comment in
+ ;; <flit_scm/__init__.py>; but it fails during build phase with
+ ;; error: ModuleNotFoundError: No module named
+ ;; 'flit_scm:buildapi'.
+ ;;
+ ;; Use flit_core.buildapi directly to build flit_scm.
+ (lambda _
+ (substitute* "pyproject.toml"
+ (("flit_scm:buildapi") "flit_core.buildapi")))))))
+ (propagated-inputs
+ (list python-flit-core
+ python-setuptools-scm
+ python-tomli))
(home-page "https://gitlab.com/WillDaSilva/flit_scm")
(synopsis "PEP 518 build backend combining flit_core and setuptools_scm")
(description "This package provides a PEP 518 build backend that uses
@@ -677,16 +662,23 @@ system, then @code{flit_core} to build the package.")
(define-public python-setuptools-scm
(package
(name "python-setuptools-scm")
- (version "7.1.0")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "setuptools_scm" version))
- (sha256
- (base32 "09wg4zg30ir1c2cvwqipaz3hwaxz503fgw5zdvaxgakilx2q6l3c"))))
- (build-system python-build-system)
- (arguments (list #:tests? #f)) ;avoid extra dependencies such as pytest
- (propagated-inputs (list python-packaging-bootstrap python-tomli
- python-typing-extensions))
+ (version "8.3.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "setuptools_scm" version))
+ (sha256
+ (base32 "0qra4jysbdwlrwsb5iz8kai1xxbsz6adzbrbscvx1b2xny95wm9x"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:tests? #f ;avoid extra dependencies such as pytest
+ ;; pyproject-build-system will error handle forms such as
+ ;; "module:object", so we set it.
+ #:build-backend "setuptools.build_meta"))
+ (propagated-inputs
+ (list python-packaging-bootstrap
+ python-setuptools))
(home-page "https://github.com/pypa/setuptools_scm/")
(synopsis "Manage Python package versions in SCM metadata")
(description
@@ -695,36 +687,8 @@ system, then @code{flit_core} to build the package.")
them as the version argument or in a SCM managed file.")
(license license:expat)))
-(define-public python-setuptools-scm-next
- (package
- (inherit python-setuptools-scm)
- (name "python-setuptools-scm")
- (version "8.1.0")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "setuptools_scm" version))
- (sha256
- (base32 "19y84rzqwb2rd88bjrlafrhfail2bnk6apaig8xskjviayva3pj2"))))
- (build-system pyproject-build-system)
- (arguments (list
- ;; pyproject-build-system will error handle forms such as
- ;; "module:object", so we set it.
- #:build-backend "setuptools.build_meta"
- #:phases
- #~(modify-phases %standard-phases
- (add-before 'build 'setenv
- (lambda _
- ;; pyproject-build-system ignore backend-path,
- ;; and __import__ ignore GUIX_PYTHONPATH, so set
- ;; PYTHONPATH.
- (setenv "PYTHONPATH"
- (string-append
- (getcwd)
- ":"
- (getcwd) "/src:"
- (getenv "GUIX_PYTHONPATH"))))))
- #:tests? #f)) ;avoid extra dependencies such as pytest
- (native-inputs (list python-setuptools python-wheel))))
+(define-deprecated/public-alias python-setuptools-scm-next
+ python-setuptools-scm) ;may be removed after 2025-12-01
(define-public python-editables
(package
@@ -755,40 +719,30 @@ reflected in the package visible to Python, without needing a reinstall.")
(define-public python-exceptiongroup
(package
(name "python-exceptiongroup")
- (version "1.1.1")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/agronholm/exceptiongroup")
- (commit version)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "0wcvzwgjs0xmggs6dh92jxdqi988gafzh10hrzvw10kasy0xakfj"))))
- (build-system python-build-system)
+ (version "1.3.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/agronholm/exceptiongroup")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1kygngc6j7hm68w8q327jvym2z4gpyh93g2af6g419qaqqv7axkg"))))
+ (build-system pyproject-build-system)
(arguments
(list
- #:tests? #f ;TODO: Circular dependency on pytest
+ #:tests? #f ;to keep dependencies to a minimum
+ #:build-backend "setuptools.build_meta"
#:phases
#~(modify-phases %standard-phases
- ;; XXX: PEP 517 manual build/install procedures copied from
- ;; python-isort.
- (replace 'build
+ (add-before 'build 'set-version
(lambda _
- (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version)
- ;; ZIP does not support timestamps before 1980.
- (setenv "SOURCE_DATE_EPOCH" "315532800")
- (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
- (replace 'install
- (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))
+ (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version))))))
+ (native-inputs
+ (list python-flit-scm))
+ (propagated-inputs
+ (list python-typing-extensions))
(home-page "https://github.com/agronholm/exceptiongroup")
(synopsis "PEP 654 backport from Python 3.11")
(description "This is a backport of the @code{BaseExceptionGroup} and
@@ -798,22 +752,22 @@ reflected in the package visible to Python, without needing a reinstall.")
(define-public python-hatchling
(package
(name "python-hatchling")
- (version "1.26.1")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "hatchling" version))
- (sha256
- (base32
- "1s9lq2x5g5f24j34r7q3zp39wyqwjixfkq8vb4gxzmf5ws96b5cd"))))
+ (version "1.27.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "hatchling" version))
+ (sha256
+ (base32 "1mhzjhg7ky8npcrnbwwq30w8s73mm73m5z0j260v7aqrk1njj74p"))))
(build-system pyproject-build-system)
(arguments
(list #:tests? #f)) ;to keep dependencies to a minimum
- (propagated-inputs (list python-editables
- python-packaging-bootstrap
- python-pathspec
- python-pluggy
- python-tomli
- python-trove-classifiers))
+ (propagated-inputs
+ (list python-packaging-bootstrap
+ python-pathspec
+ python-pluggy
+ python-tomli
+ python-trove-classifiers))
(home-page "https://hatch.pypa.io/latest/")
(synopsis "Modern, extensible Python build backend")
(description "Hatch is a modern, extensible Python project manager. It
@@ -828,20 +782,62 @@ has features such as:
@end itemize")
(license license:expat)))
+(define-public python-hatchling-for-hatch
+ ;; For hatch@1.9.7, remove when no longer required.
+ (hidden-package
+ (package
+ (inherit python-hatchling)
+ (version "1.21.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "hatchling" version))
+ (sha256
+ (base32 "1g40g68vzfakddd9f0psp9jkfqy3v3la4zs5g127ski2792l195v"))))
+ (propagated-inputs
+ (list python-editables
+ python-packaging-bootstrap
+ python-pathspec
+ python-pluggy
+ python-trove-classifiers)))))
+
+(define-public python-hatch-docstring-description
+ (package
+ (name "python-hatch-docstring-description")
+ (version "1.1.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "hatch_docstring_description" version))
+ (sha256
+ (base32 "1qwa8m4yswn0bkc5xzq30xsaca578axl5ig2r6mkcdxsfg196pdi"))))
+ (build-system pyproject-build-system)
+ (arguments (list #:tests? #f)) ;avoid extra test dependencies
+ (native-inputs
+ (list python-hatch-vcs
+ python-hatchling))
+ (propagated-inputs
+ (list python-hatchling))
+ (home-page "https://github.com/flying-sheep/hatch-docstring-description")
+ (synopsis "Derive PyPI package description from Python package docstring ")
+ (description
+ "This package provides a Hatchling plugin to read the description from the
+package docstring.")
+ (license license:gpl3+)))
+
(define-public python-hatch-fancy-pypi-readme
(package
(name "python-hatch-fancy-pypi-readme")
- (version "22.8.0")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "hatch_fancy_pypi_readme" version))
- (sha256
- (base32
- "0sn2wsfbpsbf2mqhjvw62h1cfy5mz3d7iqyqvs5c20cnl0n2i4fs"))))
+ (version "25.1.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "hatch_fancy_pypi_readme" version))
+ (sha256
+ (base32 "0i803kq80qx0k1lj3z69zw40ynqxml4p1qsc851izmchzwyysn4w"))))
(build-system pyproject-build-system)
(arguments (list #:tests? #f)) ;avoid extra test dependencies
- (propagated-inputs (list python-hatchling python-tomli
- python-typing-extensions))
+ (propagated-inputs (list python-hatchling python-tomli))
(home-page "https://github.com/hynek/hatch-fancy-pypi-readme")
(synopsis "Fancy PyPI READMEs with Hatch")
(description "This hatch plugin allows defining a project description in
@@ -849,16 +845,36 @@ terms of concatenated fragments that are based on static strings, files and
parts of files defined using cut-off points or regular expressions.")
(license license:expat)))
+(define-public python-hatch-requirements-txt
+ (package
+ (name "python-hatch-requirements-txt")
+ (version "0.4.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "hatch_requirements_txt" version))
+ (sha256
+ (base32 "083xakilrmy0ymh34s9wm8x8s7s8vn7ij33xz9avn1gxb1bnws1c"))))
+ (build-system pyproject-build-system)
+ (arguments (list #:tests? #f)) ;avoid extra test dependencies
+ (propagated-inputs (list python-hatchling python-packaging-bootstrap))
+ (home-page "https://github.com/repo-helper/hatch-requirements-txt")
+ (synopsis "Hatchling plugin to read requirements.txt")
+ (description
+ "This package implements a functionality to read project dependencies
+from requirements.txt.")
+ (license license:expat)))
+
(define-public python-hatch-vcs
(package
(name "python-hatch-vcs")
- (version "0.3.0")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "hatch_vcs" version))
- (sha256
- (base32
- "1viz2mdfxfqpsd5f30410q6smj90qfxihvy9idzwd0p4ziy11iff"))))
+ (version "0.5.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "hatch_vcs" version))
+ (sha256
+ (base32 "1yczh2aqrf9p3gs1dayswz5pp9z2yhmlld0c14ah4d20d49gm583"))))
(arguments (list #:tests? #f)) ;avoid extra test dependencies
(build-system pyproject-build-system)
(propagated-inputs (list python-hatchling python-setuptools-scm))
@@ -893,20 +909,19 @@ abstractions for handling wheels and installing packages from wheels.")
(define-public python-pdm-backend
(package
(name "python-pdm-backend")
- (version "2.4.3")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "pdm_backend" version))
- (sha256
- (base32
- "0a0741c1g5vxhrizyxh40mjxdmbsc4xid5vy4aji23f1g9x09nfv"))))
+ (version "2.4.5")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pdm_backend" version))
+ (sha256
+ (base32 "0nzyfa4jb0cpfhh0jfqsk4xz8rbyfyxqrh2ps3axm2ih8321kh2n"))))
(build-system pyproject-build-system)
(arguments
(list
#:tests? #f)) ; Depends on pytest, which we cannot import into this module.
(home-page "https://pdm-backend.fming.dev/")
- (synopsis
- "PEP 517 build backend for PDM")
+ (synopsis "PEP 517 build backend for PDM")
(description
"PDM-Backend is a build backend that supports the latest packaging
standards, which includes PEP 517, PEP 621 and PEP 660.")