projects/guix·blob mpd-fix-groups · refs

929 lines · 33.8 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015, 2024, 2025 Ricardo Wurmus <[email protected]>
3;;; Copyright © 2015, 2020, 2023, 2024 Efraim Flashner <[email protected]>
4;;; Copyright © 2016 Leo Famulari <[email protected]>
5;;; Copyright © 2020, 2023 Marius Bakke <[email protected]>
6;;; Copyright © 2020 Tanguy Le Carrour <[email protected]>
7;;; Copyright © 2018, 2021-2023, 2025 Maxim Cournoyer <[email protected]>
8;;; Copyright © 2019 Vagrant Cascadian <[email protected]>
9;;; Copyright © 2021 Tobias Geerinckx-Rice <[email protected]>
10;;; Copyright © 2020, 2021, 2022, 2023 Ricardo Wurmus <[email protected]>
11;;; Copyright © 2022 Garek Dyszel <[email protected]>
12;;; Copyright © 2022 Greg Hogan <[email protected]>
13;;; Copyright © 2024 David Elsing <[email protected]>
14;;; Copyright © 2024 Zheng Junjie <[email protected]>
15;;; Copyright © 2024 Antero Mejr <[email protected]>
16;;; Copyright © 2025 Nguyễn Gia Phong <[email protected]>
17;;;
18;;; This file is part of GNU Guix.
19;;;
20;;; GNU Guix is free software; you can redistribute it and/or modify it
21;;; under the terms of the GNU General Public License as published by
22;;; the Free Software Foundation; either version 3 of the License, or (at
23;;; your option) any later version.
24;;;
25;;; GNU Guix is distributed in the hope that it will be useful, but
26;;; WITHOUT ANY WARRANTY; without even the implied warranty of
27;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28;;; GNU General Public License for more details.
29;;;
30;;; You should have received a copy of the GNU General Public License
31;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
32
33(define-module (gnu packages python-build)
34 #:use-module (gnu packages)
35 #:use-module ((guix licenses) #:prefix license:)
36 #:use-module (guix build-system python)
37 #:use-module (guix build-system pyproject)
38 #:use-module (guix gexp)
39 #:use-module (guix deprecation)
40 #:use-module (guix download)
41 #:use-module (guix git-download)
42 #:use-module (guix packages))
43
44;;; Commentary:
45;;;
46;;; Python packages to build... Python packages. Since they are bound to be
47;;; relied on by many, their dependencies should be kept minimal, and this
48;;; module should not depend on other modules containing Python packages.
49;;;
50;;; Code:
51
52
53;;; These are dependencies used by the build systems contained herein; they
54;;; feel a bit out of place but are kept here to prevent circular module
55;;; dependencies.
56(define-public python-pathspec
57 (package
58 (name "python-pathspec")
59 (version "0.12.1")
60 (source
61 (origin
62 (method url-fetch)
63 (uri (pypi-uri "pathspec" version))
64 (sha256
65 (base32 "04jpkzic8f58z6paq7f3f7fdnlv9l89khv3sqsqk7ax10caxb0m4"))))
66 (build-system pyproject-build-system)
67 (arguments (list #:test-backend #~'unittest))
68 (native-inputs
69 (list python-flit-core
70 python-setuptools))
71 (home-page "https://github.com/cpburnz/python-pathspec")
72 (synopsis "Utility library for gitignore style pattern matching of file paths")
73 (description
74 "This package provides a utility library for gitignore style pattern
75matching of file paths.")
76 (license license:mpl2.0)))
77
78(define-public python-pluggy
79 (package
80 (name "python-pluggy")
81 (version "1.6.0")
82 (source
83 (origin
84 (method url-fetch)
85 (uri (pypi-uri "pluggy" version))
86 (sha256
87 (base32 "1wr2vnbb7gy9wlz01yvb7rn4iqzd3mwmidk11ywk7395fq5i7k3x"))))
88 (build-system pyproject-build-system)
89 (native-inputs
90 (list python-setuptools
91 python-setuptools-scm
92 python-wheel))
93 (home-page "https://pypi.org/project/pluggy/")
94 (synopsis "Plugin and hook calling mechanism for Python")
95 (description
96 "Pluggy is an extraction of the plugin manager as used by Pytest but
97stripped of Pytest specific details.")
98 (license license:expat)))
99
100(define-public python-toml
101 (package
102 (name "python-toml")
103 (version "0.10.2")
104 (source
105 (origin
106 (method url-fetch)
107 (uri (pypi-uri "toml" version))
108 (sha256
109 (base32 "13z6rff86bzdpl094x0vmfvls779931xj90dlbs9kpfm138s3gdk"))))
110 (build-system pyproject-build-system)
111 (arguments
112 `(#:tests? #f)) ;no tests suite in release
113 (native-inputs
114 (list python-setuptools))
115 (home-page "https://github.com/uiri/toml")
116 (synopsis "Library for TOML")
117 (description
118 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
119Language (TOML) configuration files.")
120 (license license:expat)))
121
122(define-public python-tomli-w
123 (package
124 (name "python-tomli-w")
125 (version "1.2.0")
126 (source
127 (origin
128 (method url-fetch)
129 (uri (pypi-uri "tomli_w" version))
130 (sha256
131 (base32 "08ahw9db7qycd4fzh4j51cgzp1rdl7snm5scrplpphj7ban4zl9d"))))
132 (build-system pyproject-build-system)
133 (arguments (list #:tests? #f)) ;to avoid extra dependencies
134 (native-inputs (list python-flit-core))
135 (home-page "https://github.com/hukkin/tomli-w")
136 (synopsis "Minimal TOML writer")
137 (description "Tomli-W is a Python library for writing TOML. It is a
138write-only counterpart to Tomli, which is a read-only TOML parser.")
139 (license license:expat)))
140
141(define-public python-pytoml
142 (package
143 (name "python-pytoml")
144 (version "0.1.21")
145 (source
146 (origin
147 (method url-fetch)
148 (uri (pypi-uri "pytoml" version))
149 (sha256
150 (base32 "1rv1byiw82k7mj6aprcrqi2vdabs801y97xhfnrz7kxds34ggv4f"))))
151 (build-system pyproject-build-system)
152 (arguments `(#:tests? #f)) ;to avoid pytest dependency
153 (native-inputs
154 (list python-setuptools))
155 (home-page "https://github.com/avakar/pytoml")
156 (synopsis "Parser for TOML")
157 (description "This package provides a Python parser for TOML-0.4.0.")
158 (license license:expat)))
159
160(define-public python-tomli
161 (package
162 (name "python-tomli")
163 (version "2.2.1")
164 (source
165 (origin
166 (method url-fetch)
167 (uri (pypi-uri "tomli" version))
168 (sha256
169 (base32 "1zq58p2bplyf0xpi9fnyn4w6vc1fkw8whkj0yxhcwdf8g7ff2ifd"))))
170 (build-system pyproject-build-system)
171 (arguments
172 `(#:tests? #f)) ;disabled to avoid extra dependencies
173 (native-inputs (list python-flit-core-bootstrap))
174 (home-page "https://github.com/hukkin/tomli")
175 (synopsis "Small and fast TOML parser")
176 (description "Tomli is a minimal TOML parser that is fully compatible with
177@url{https://toml.io/en/v1.0.0,TOML v1.0.0}. It is about 2.4 times as fast as
178@code{python-toml}.")
179 (license license:expat)))
180
181(define-public python-trove-classifiers
182 (package
183 (name "python-trove-classifiers")
184 (version "2025.5.9.12")
185 (source
186 (origin
187 (method url-fetch)
188 (uri (pypi-uri "trove_classifiers" version))
189 (sha256
190 (base32 "1dawkrcc353rz1h4mazw25vkbhics5lpqrwc8qad6b3flykwi9vw"))))
191 (build-system pyproject-build-system)
192 (arguments
193 (list #:build-backend "setuptools.build_meta"
194 #:tests? #f)) ;keep dependencies to a minimum
195 (native-inputs (list python-setuptools python-wheel))
196 (home-page "https://github.com/pypa/trove-classifiers")
197 (synopsis "Canonical source for classifiers on PyPI")
198 (description "This package is the canonical source for classifiers use on
199PyPI (pypi.org).")
200 (license license:asl2.0)))
201
202(define-public python-typing-extensions
203 (package
204 (name "python-typing-extensions")
205 (version "4.15.0")
206 (source
207 (origin
208 (method url-fetch)
209 (uri (pypi-uri "typing_extensions" version))
210 (sha256
211 (base32 "0rhlhs28jndgp9fghdhidn6g7xiwx8vvihxbxhlgl4ncfg8lishc"))))
212 (build-system pyproject-build-system)
213 ;; Disable the test suite to keep the dependencies to a minimum. Also,
214 ;; the test suite requires Python's test module, not available in Guix.
215 (arguments (list #:tests? #f))
216 (native-inputs (list python-flit-core))
217 (home-page "https://github.com/python/typing_extensions")
218 (synopsis "Experimental type hints for Python")
219 (description
220 "The typing_extensions module contains additional @code{typing} hints not
221yet present in the of the @code{typing} standard library.
222Included are implementations of:
223@enumerate
224@item ClassVar
225@item ContextManager
226@item Counter
227@item DefaultDict
228@item Deque
229@item NewType
230@item NoReturn
231@item overload
232@item Protocol
233@item runtime
234@item Text
235@item Type
236@item TYPE_CHECKING
237@item AsyncGenerator
238@end enumerate\n")
239 (license license:psfl)))
240
241(define-deprecated/public-alias python-typing-extensions-next
242 python-typing-extensions) ;may be removed after 2025-12-01
243
244
245;;;
246;;; Python builder packages.
247;;;
248(define-public python-pip
249 (package
250 (name "python-pip")
251 (version "25.1.1")
252 (source
253 (origin
254 (method url-fetch)
255 (uri (pypi-uri "pip" version))
256 (sha256
257 (base32
258 "0xwhrng91a48zb5qmb6vagbjr6kzvbc8b08nq9a5139h3m0mvr1x"))
259 (snippet
260 #~(begin
261 (delete-file "src/pip/_vendor/certifi/cacert.pem")
262 (delete-file "src/pip/_vendor/certifi/core.py")
263 (with-output-to-file "src/pip/_vendor/certifi/core.py"
264 (lambda _
265 (display "\"\"\"
266certifi.py
267~~~~~~~~~~
268This file is a Guix-specific version of core.py.
269
270This module returns the installation location of SSL_CERT_FILE or
271/etc/ssl/certs/ca-certificates.crt, or its contents.
272\"\"\"
273import os
274
275_CA_CERTS = None
276
277try:
278 _CA_CERTS = os.environ [\"SSL_CERT_FILE\"]
279except:
280 _CA_CERTS = os.path.join(\"/etc\", \"ssl\", \"certs\", \"ca-certificates.crt\")
281
282def where() -> str:
283 return _CA_CERTS
284
285def contents() -> str:
286 with open(where(), \"r\", encoding=\"ascii\") as data:
287 return data.read()")))))))
288 (build-system pyproject-build-system)
289 (arguments
290 '(#:tests? #f)) ; there are no tests in the pypi archive.
291 (native-inputs
292 (list python-setuptools))
293 (home-page "https://pip.pypa.io/")
294 (synopsis "Package manager for Python software")
295 (description
296 "Pip is a package manager for Python software, that finds packages on the
297Python Package Index (PyPI).")
298 (license license:expat)))
299
300(define-public python-setuptools
301 (package
302 (name "python-setuptools")
303 (version "80.9.0")
304 (source
305 (origin
306 (method url-fetch)
307 (uri (pypi-uri "setuptools" version))
308 (sha256
309 (base32 "175iixi2h2jz8y2bpwziak360hvv43jfhipwzbdniryd5r04fszk"))
310 (modules '((guix build utils)))
311 (snippet
312 ;; TODO: setuptools now bundles the following libraries:
313 ;; packaging, pyparsing, six and appdirs. How to unbundle?
314 ;; Remove included binaries which are used to build self-extracting
315 ;; installers for Windows.
316 '(for-each delete-file (find-files "setuptools"
317 "^(cli|gui).*\\.exe$")))))
318 (build-system pyproject-build-system)
319 ;; FIXME: Tests require pytest, which itself relies on setuptools.
320 ;; One could bootstrap with an internal untested setuptools.
321 (arguments (list #:tests? #f))
322 (home-page "https://pypi.org/project/setuptools/")
323 (synopsis "Library designed to facilitate packaging Python projects")
324 (description "Setuptools is a fully-featured, stable library designed to
325facilitate packaging Python projects, where packaging includes:
326@itemize
327@item Python package and module definitions
328@item distribution package metadata
329@item test hooks
330@item project installation
331@item platform-specific details.
332@end itemize")
333 (license (list license:psfl ;setuptools itself
334 license:expat ;six, appdirs, pyparsing
335 license:asl2.0 ;packaging is dual ASL2/BSD-2
336 license:bsd-2))))
337
338(define-public python-setuptools-67
339 (package
340 (inherit python-setuptools)
341 (version "67.6.1")
342 (source
343 (origin
344 (method url-fetch)
345 (uri (pypi-uri "setuptools" version))
346 (sha256
347 (base32 "16myxkpa89r045il88zcygdy1zbi2mvvpz5b4a70p9jhklmfjz95"))
348 (modules '((guix build utils)))
349 (snippet
350 '(for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$")))))
351 (native-inputs
352 (list python-wheel-0.40))))
353
354(define-deprecated/public-alias python-setuptools-next
355 python-setuptools) ;may be removed after 2025-12-01
356
357(define-public python-wheel
358 (package
359 (name "python-wheel")
360 (version "0.46.1")
361 (source
362 (origin
363 (method url-fetch)
364 (uri (pypi-uri "wheel" version))
365 (sha256
366 (base32 "0f3abrpkf3spv0lk5mhv8m2ch0j074a3rivn7hfxzxx0bpxpwizx"))))
367 (build-system pyproject-build-system)
368 (arguments
369 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
370 ;; fails to find the newly-built bdist_wheel library, even though it is
371 ;; available on PYTHONPATH. What search path is consulted by setup.py?
372 '(#:tests? #f))
373 (native-inputs
374 (list python-flit-core))
375 (home-page "https://github.com/pypa/wheel")
376 (synopsis "Format for built Python packages")
377 (description
378 "A wheel is a ZIP-format archive with a specially formatted filename and
379the @code{.whl} extension. It is designed to contain all the files for a PEP
380376 compatible install in a way that is very close to the on-disk format. Many
381packages will be properly installed with only the @code{Unpack} step and the
382unpacked archive preserves enough information to @code{Spread} (copy data and
383scripts to their final locations) at any later time. Wheel files can be
384installed with a newer @code{pip} or with wheel's own command line utility.")
385 (license license:expat)))
386
387(define-public python-wheel-0.40
388 (package
389 (inherit python-wheel)
390 (version "0.40.0")
391 (source
392 (origin
393 (method url-fetch)
394 (uri (pypi-uri "wheel" version))
395 (sha256
396 (base32 "0ww8fgkvwv35ypj4cnngczdwp6agr4qifvk2inb32azfzbrrc4fd"))))))
397
398;;; TODO: Deprecate with https://github.com/pypa/pyproject-hooks.
399;;;
400;;; From PyPI web page: The core of this package has been renamed to
401;;; pyproject-hooks (https://pyproject-hooks.readthedocs.io). Please use that
402;;; package or build (https://pypa-build.readthedocs.io/en/stable/) in place
403;;; of pep517.
404(define-public python-pep517-bootstrap
405 (hidden-package
406 (package
407 (name "python-pep517-bootstrap")
408 (version "0.13.1")
409 (source
410 (origin
411 (method url-fetch)
412 (uri (pypi-uri "pep517" version))
413 (sha256
414 (base32 "05xk0x7b5n7zmcqrznm4lnbakgdjpin19mp5zyzb92wksgzs4bqv"))))
415 (build-system pyproject-build-system)
416 (arguments
417 `(#:tests? #f)) ;to avoid circular dependencies
418 (native-inputs (list python-flit-core))
419 (home-page "https://github.com/pypa/pep517")
420 (synopsis "Wrappers to build Python packages using PEP 517 hooks")
421 (description
422 "Wrappers to build Python packages using PEP 517 hooks.")
423 (license license:expat))))
424
425(define-public python-pyparsing
426 (package
427 (name "python-pyparsing")
428 (version "3.2.3")
429 (source
430 (origin
431 (method url-fetch)
432 (uri (pypi-uri "pyparsing" version))
433 (sha256
434 (base32 "1giqgjknzbbh34qf8ij5rsrqlxfysjx39xi85vvl5ddkp0d3zhdr"))))
435 (build-system pyproject-build-system)
436 (outputs '("out" "doc"))
437 (arguments
438 `(#:tests? #f ;no test target
439 #:phases
440 (modify-phases %standard-phases
441 (add-after 'install 'install-doc
442 (lambda* (#:key outputs #:allow-other-keys)
443 (let* ((doc (string-append (assoc-ref outputs "doc")
444 "/share/doc/" ,name "-" ,version))
445 (html-doc (string-append doc "/html"))
446 (examples (string-append doc "/examples")))
447 (mkdir-p html-doc)
448 (mkdir-p examples)
449 (for-each
450 (lambda (dir tgt)
451 (map (lambda (file)
452 (install-file file tgt))
453 (find-files dir ".*")))
454 (list "docs" "htmldoc" "examples")
455 (list doc html-doc examples))))))))
456 (native-inputs (list python-flit-core))
457 (home-page "https://github.com/pyparsing/pyparsing")
458 (synopsis "Python parsing class library")
459 (description
460 "The pyparsing module is an alternative approach to creating and
461executing simple grammars, vs. the traditional lex/yacc approach, or the use
462of regular expressions. The pyparsing module provides a library of classes
463that client code uses to construct the grammar directly in Python code.")
464 (license license:expat)))
465
466(define-public python-packaging-bootstrap
467 (package
468 (name "python-packaging-bootstrap")
469 (version "25.0")
470 (source
471 (origin
472 (method url-fetch)
473 (uri (pypi-uri "packaging" version))
474 (sha256
475 (base32 "0kzwn2ar4ndm90qrvgyjcbkqz3klrg0ziwm1yrhbyxynk0n8fhyl"))))
476 (build-system pyproject-build-system)
477 (arguments `(#:tests? #f)) ;disabled to avoid extra dependencies
478 (native-inputs
479 (list python-flit-core))
480 (home-page "https://github.com/pypa/packaging")
481 (synopsis "Core utilities for Python packages")
482 (description "Packaging is a Python module for dealing with Python packages.
483It offers an interface for working with package versions, names, and dependency
484information.")
485 ;; From 'LICENSE': This software is made available under the terms of
486 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
487 ;; Contributions to this software is made under the terms of *both* these
488 ;; licenses.
489 (license (list license:asl2.0 license:bsd-2))))
490
491;;; The name 'python-pypa-build' is chosen rather than 'python-build' to avoid
492;;; a name clash with python-build from (guix build-system python).
493(define-public python-pypa-build
494 (package
495 (name "python-pypa-build")
496 ;; Newer version needs more inputs, consider to move to python-xyz.
497 (version "0.9.0")
498 (source
499 (origin
500 (method url-fetch)
501 (uri (pypi-uri "build" version))
502 (sha256
503 (base32 "0g5w28ban6k9qywqwdqiqms3crg75rsvfphl4f4qkg8wi57741qs"))))
504 (build-system pyproject-build-system)
505 (arguments `(#:tests? #f)) ;disabled to avoid extra dependencies
506 (native-inputs
507 (list python-setuptools))
508 (propagated-inputs
509 (list python-packaging-bootstrap
510 python-pep517-bootstrap
511 python-toml))
512 (home-page "https://pypa-build.readthedocs.io/en/latest/")
513 (synopsis "Simple Python PEP 517 package builder")
514 (description "The @command{build} command invokes the PEP 517 hooks to
515build a distribution package. It is a simple build tool and does not perform
516any dependency management. It aims to keep dependencies to a minimum, in
517order to make bootstrapping easier.")
518 (license license:expat)))
519
520;; There are quite a few amount of Python installers in the wild we need the
521;; one from PyPa team.
522(define-public python-pypa-installer
523 (package
524 (name "python-pypa-installer")
525 (version "0.7.0")
526 (source
527 (origin
528 (method url-fetch)
529 (uri (pypi-uri "installer" version))
530 (sha256
531 (base32 "0cdnqh3a3amw8k4s1pzfjh0hpvzw4pczgl702s1b16r82qqkwvd2"))))
532 (build-system pyproject-build-system)
533 (arguments
534 (list
535 #:tests? #f)) ; Depends on pytest, which we cannot import into this module.
536 (native-inputs
537 (list python-flit-core))
538 (home-page "https://installer.readthedocs.io/")
539 (synopsis "low-level library for installing from a Python wheel distribution")
540 (description
541 "This package provides a library for installing Python wheels.")
542 (license license:expat)))
543
544(define-public python-poetry-core
545 (package
546 (name "python-poetry-core")
547 (version "2.1.3")
548 (source
549 (origin
550 (method url-fetch)
551 (uri (pypi-uri "poetry_core" version))
552 (sha256
553 (base32 "194nwaig8zkbj2ig4zwf1k7cl4vqlmvs8mmdkb425mky8was08h5"))))
554 (build-system pyproject-build-system)
555 (arguments
556 `(#:tests? #f)) ;disabled to avoid extra dependencies
557 (home-page "https://github.com/python-poetry/poetry-core")
558 (synopsis "Poetry PEP 517 build back-end")
559 (description
560 "The @code{poetry-core} module provides a PEP 517 build back-end
561implementation developed for Poetry. This project is intended to be
562a light weight, fully compliant, self-contained package allowing PEP 517
563compatible build front-ends to build Poetry managed projects.")
564 (license license:expat)))
565
566(define-deprecated/public-alias python-poetry-core-next
567 python-poetry-core) ;may be removed after 2025-12-01
568
569;;; This package exists to bootstrap python-tomli.
570(define-public python-flit-core-bootstrap
571 (package
572 (name "python-flit-core-bootstrap")
573 (version "3.12.0")
574 (source
575 (origin
576 (method url-fetch)
577 (uri (pypi-uri "flit" version))
578 (sha256
579 (base32 "0h1pxi2hgr95321bgl45l86693zl14l3shj0idsyg4k9v56z700w"))))
580 (build-system pyproject-build-system)
581 (arguments
582 (list
583 ;; flit-core has a test suite, but it requires Pytest. Disable it so
584 ;; as to not pull pytest as an input.
585 #:tests? #f
586 #:phases
587 #~(modify-phases %standard-phases
588 (add-after 'unpack 'fix-license
589 ;; flit_core bundles the 'tomli' TOML parser, to avoid a
590 ;; bootstrapping problem. See
591 ;; <https://github.com/pypa/packaging-problems/issues/342>.
592 (lambda _
593 (delete-file-recursively "flit_core/flit_core/vendor")
594 (substitute* "flit_core/pyproject.toml"
595 (("license-files.*") "license-files = [\"LICENSE*\"]\n"))))
596 (replace 'build
597 ;; flit-core requires itself to build. Luckily, a
598 ;; bootstrapping script exists, which does so using just
599 ;; the checkout sources and Python.
600 (lambda _
601 (chdir "flit_core")
602 (invoke "python" "build_dists.py")))
603 (delete 'sanity-check))))
604 (propagated-inputs
605 (list python-toml))
606 (home-page "https://github.com/pypa/flit")
607 (synopsis "Core package of the Flit Python build system")
608 (description "This package provides @code{flit-core}, a PEP 517 build
609backend for packages using Flit. The only public interface is the API
610specified by PEP 517, @code{flit_core.buildapi}.")
611 (license license:bsd-3)))
612
613(define-public python-flit-core
614 (package/inherit python-flit-core-bootstrap
615 (name "python-flit-core")
616 (propagated-inputs
617 (modify-inputs (package-propagated-inputs python-flit-core-bootstrap)
618 (delete "python-toml")
619 (prepend python-tomli)))))
620
621(define-deprecated/public-alias python-flit-core-next
622 python-flit-core) ;may be removed after 2025-12-01
623
624(define-public python-flit-scm
625 (package
626 (name "python-flit-scm")
627 (version "1.7.0")
628 (source
629 (origin
630 (method url-fetch)
631 (uri (pypi-uri "flit_scm" version))
632 (sha256
633 (base32 "1ckbkykfr7f7wzjzgh0gm7h6v3pqzx2l28rw6dsvl6zk4kxxc6wn"))))
634 (build-system pyproject-build-system)
635 (arguments
636 (list
637 #:tests? #f ;no tests in PyPI archive or Git checkout
638 #:phases
639 #~(modify-phases %standard-phases
640 (add-after 'unpack 'fix-backend
641 ;; flit_scm imports flit_core's buildapi and tries to make it
642 ;; available as "flit_scm:buildapi", see comment in
643 ;; <flit_scm/__init__.py>; but it fails during build phase with
644 ;; error: ModuleNotFoundError: No module named
645 ;; 'flit_scm:buildapi'.
646 ;;
647 ;; Use flit_core.buildapi directly to build flit_scm.
648 (lambda _
649 (substitute* "pyproject.toml"
650 (("flit_scm:buildapi") "flit_core.buildapi")))))))
651 (propagated-inputs
652 (list python-flit-core
653 python-setuptools-scm
654 python-tomli))
655 (home-page "https://gitlab.com/WillDaSilva/flit_scm")
656 (synopsis "PEP 518 build backend combining flit_core and setuptools_scm")
657 (description "This package provides a PEP 518 build backend that uses
658@code{setuptools_scm} to generate a version file from your version control
659system, then @code{flit_core} to build the package.")
660 (license license:expat)))
661
662(define-public python-setuptools-scm
663 (package
664 (name "python-setuptools-scm")
665 (version "8.3.1")
666 (source
667 (origin
668 (method url-fetch)
669 (uri (pypi-uri "setuptools_scm" version))
670 (sha256
671 (base32 "0qra4jysbdwlrwsb5iz8kai1xxbsz6adzbrbscvx1b2xny95wm9x"))))
672 (build-system pyproject-build-system)
673 (arguments
674 (list
675 #:tests? #f ;avoid extra dependencies such as pytest
676 ;; pyproject-build-system will error handle forms such as
677 ;; "module:object", so we set it.
678 #:build-backend "setuptools.build_meta"))
679 (propagated-inputs
680 (list python-packaging-bootstrap
681 python-setuptools))
682 (home-page "https://github.com/pypa/setuptools_scm/")
683 (synopsis "Manage Python package versions in SCM metadata")
684 (description
685 "Setuptools_scm handles managing your Python package versions in
686@dfn{software configuration management} (SCM) metadata instead of declaring
687them as the version argument or in a SCM managed file.")
688 (license license:expat)))
689
690(define-deprecated/public-alias python-setuptools-scm-next
691 python-setuptools-scm) ;may be removed after 2025-12-01
692
693(define-public python-editables
694 (package
695 (name "python-editables")
696 (version "0.5")
697 (source (origin
698 (method git-fetch)
699 (uri (git-reference
700 (url "https://github.com/pfmoore/editables")
701 (commit version)))
702 (file-name (git-file-name name version))
703 (sha256
704 (base32
705 "1bp959fz987jvrnkilhyr41fw4g00g9jfyiwmfvy96hv1yl68w8b"))))
706 (build-system pyproject-build-system)
707 (arguments (list #:tests? #f)) ;avoid extra dependencies such as pytest
708 (native-inputs
709 (list python-flit-core))
710 (home-page "https://github.com/pfmoore/editables")
711 (synopsis "Editable installations")
712 (description "This library supports the building of wheels which, when
713installed, will expose packages in a local directory on @code{sys.path} in
714``editable mode''. In other words, changes to the package source will be
715reflected in the package visible to Python, without needing a reinstall.")
716 (license license:expat)))
717
718;; This package may be removed when we have Python 3.11 on board.
719(define-public python-exceptiongroup
720 (package
721 (name "python-exceptiongroup")
722 (version "1.3.0")
723 (source
724 (origin
725 (method git-fetch)
726 (uri (git-reference
727 (url "https://github.com/agronholm/exceptiongroup")
728 (commit version)))
729 (file-name (git-file-name name version))
730 (sha256
731 (base32 "1kygngc6j7hm68w8q327jvym2z4gpyh93g2af6g419qaqqv7axkg"))))
732 (build-system pyproject-build-system)
733 (arguments
734 (list
735 #:tests? #f ;to keep dependencies to a minimum
736 #:build-backend "setuptools.build_meta"
737 #:phases
738 #~(modify-phases %standard-phases
739 (add-before 'build 'set-version
740 (lambda _
741 (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version))))))
742 (native-inputs
743 (list python-flit-scm))
744 (propagated-inputs
745 (list python-typing-extensions))
746 (home-page "https://github.com/agronholm/exceptiongroup")
747 (synopsis "PEP 654 backport from Python 3.11")
748 (description "This is a backport of the @code{BaseExceptionGroup} and
749@code{ExceptionGroup} classes from Python 3.11.")
750 (license license:expat)))
751
752(define-public python-hatchling
753 (package
754 (name "python-hatchling")
755 (version "1.27.0")
756 (source
757 (origin
758 (method url-fetch)
759 (uri (pypi-uri "hatchling" version))
760 (sha256
761 (base32 "1mhzjhg7ky8npcrnbwwq30w8s73mm73m5z0j260v7aqrk1njj74p"))))
762 (build-system pyproject-build-system)
763 (arguments
764 (list #:tests? #f)) ;to keep dependencies to a minimum
765 (propagated-inputs
766 (list python-packaging-bootstrap
767 python-pathspec
768 python-pluggy
769 python-tomli
770 python-trove-classifiers))
771 (home-page "https://hatch.pypa.io/latest/")
772 (synopsis "Modern, extensible Python build backend")
773 (description "Hatch is a modern, extensible Python project manager. It
774has features such as:
775@itemize
776@item Standardized build system with reproducible builds by default
777@item Robust environment management with support for custom scripts
778@item Easy publishing to PyPI or other indexes
779@item Version management
780@item Configurable project generation with sane defaults
781@item Responsive CLI, ~2-3x faster than equivalent tools.
782@end itemize")
783 (license license:expat)))
784
785(define-public python-hatchling-for-hatch
786 ;; For [email protected], remove when no longer required.
787 (hidden-package
788 (package
789 (inherit python-hatchling)
790 (version "1.21.1")
791 (source
792 (origin
793 (method url-fetch)
794 (uri (pypi-uri "hatchling" version))
795 (sha256
796 (base32 "1g40g68vzfakddd9f0psp9jkfqy3v3la4zs5g127ski2792l195v"))))
797 (propagated-inputs
798 (list python-editables
799 python-packaging-bootstrap
800 python-pathspec
801 python-pluggy
802 python-trove-classifiers)))))
803
804(define-public python-hatch-docstring-description
805 (package
806 (name "python-hatch-docstring-description")
807 (version "1.1.1")
808 (source
809 (origin
810 (method url-fetch)
811 (uri (pypi-uri "hatch_docstring_description" version))
812 (sha256
813 (base32 "1qwa8m4yswn0bkc5xzq30xsaca578axl5ig2r6mkcdxsfg196pdi"))))
814 (build-system pyproject-build-system)
815 (arguments (list #:tests? #f)) ;avoid extra test dependencies
816 (native-inputs
817 (list python-hatch-vcs
818 python-hatchling))
819 (propagated-inputs
820 (list python-hatchling))
821 (home-page "https://github.com/flying-sheep/hatch-docstring-description")
822 (synopsis "Derive PyPI package description from Python package docstring ")
823 (description
824 "This package provides a Hatchling plugin to read the description from the
825package docstring.")
826 (license license:gpl3+)))
827
828(define-public python-hatch-fancy-pypi-readme
829 (package
830 (name "python-hatch-fancy-pypi-readme")
831 (version "25.1.0")
832 (source
833 (origin
834 (method url-fetch)
835 (uri (pypi-uri "hatch_fancy_pypi_readme" version))
836 (sha256
837 (base32 "0i803kq80qx0k1lj3z69zw40ynqxml4p1qsc851izmchzwyysn4w"))))
838 (build-system pyproject-build-system)
839 (arguments (list #:tests? #f)) ;avoid extra test dependencies
840 (propagated-inputs (list python-hatchling python-tomli))
841 (home-page "https://github.com/hynek/hatch-fancy-pypi-readme")
842 (synopsis "Fancy PyPI READMEs with Hatch")
843 (description "This hatch plugin allows defining a project description in
844terms of concatenated fragments that are based on static strings, files and
845parts of files defined using cut-off points or regular expressions.")
846 (license license:expat)))
847
848(define-public python-hatch-requirements-txt
849 (package
850 (name "python-hatch-requirements-txt")
851 (version "0.4.1")
852 (source
853 (origin
854 (method url-fetch)
855 (uri (pypi-uri "hatch_requirements_txt" version))
856 (sha256
857 (base32 "083xakilrmy0ymh34s9wm8x8s7s8vn7ij33xz9avn1gxb1bnws1c"))))
858 (build-system pyproject-build-system)
859 (arguments (list #:tests? #f)) ;avoid extra test dependencies
860 (propagated-inputs (list python-hatchling python-packaging-bootstrap))
861 (home-page "https://github.com/repo-helper/hatch-requirements-txt")
862 (synopsis "Hatchling plugin to read requirements.txt")
863 (description
864 "This package implements a functionality to read project dependencies
865from requirements.txt.")
866 (license license:expat)))
867
868(define-public python-hatch-vcs
869 (package
870 (name "python-hatch-vcs")
871 (version "0.5.0")
872 (source
873 (origin
874 (method url-fetch)
875 (uri (pypi-uri "hatch_vcs" version))
876 (sha256
877 (base32 "1yczh2aqrf9p3gs1dayswz5pp9z2yhmlld0c14ah4d20d49gm583"))))
878 (arguments (list #:tests? #f)) ;avoid extra test dependencies
879 (build-system pyproject-build-system)
880 (propagated-inputs (list python-hatchling python-setuptools-scm))
881 (home-page "https://github.com/ofek/hatch-vcs")
882 (synopsis "Hatch plugin for versioning with your preferred VCS")
883 (description "This package is a plugin for Hatch that uses your preferred
884version control system (like Git) to determine project versions.")
885 (license license:expat)))
886
887(define-public python-installer
888 (package
889 (name "python-installer")
890 (version "0.7.0")
891 (source
892 (origin
893 (method url-fetch)
894 (uri (pypi-uri "installer" version))
895 (sha256
896 (base32 "0cdnqh3a3amw8k4s1pzfjh0hpvzw4pczgl702s1b16r82qqkwvd2"))))
897 (build-system pyproject-build-system)
898 (arguments (list #:tests? #f)) ;avoid extra test dependencies
899 (native-inputs
900 (list python-flit-core))
901 (home-page "https://installer.rtfd.io/")
902 (synopsis "Installer library for Python wheels")
903 (description
904 "This package provides a low-level library for installing a Python
905package from a wheel distribution. It provides basic functionality and
906abstractions for handling wheels and installing packages from wheels.")
907 (license license:expat)))
908
909(define-public python-pdm-backend
910 (package
911 (name "python-pdm-backend")
912 (version "2.4.5")
913 (source
914 (origin
915 (method url-fetch)
916 (uri (pypi-uri "pdm_backend" version))
917 (sha256
918 (base32 "0nzyfa4jb0cpfhh0jfqsk4xz8rbyfyxqrh2ps3axm2ih8321kh2n"))))
919 (build-system pyproject-build-system)
920 (arguments
921 (list
922 #:tests? #f)) ; Depends on pytest, which we cannot import into this module.
923 (home-page "https://pdm-backend.fming.dev/")
924 (synopsis "PEP 517 build backend for PDM")
925 (description
926 "PDM-Backend is a build backend that supports the latest packaging
927standards, which includes PEP 517, PEP 621 and PEP 660.")
928 (license license:expat)))
929