projects/guix·blob tex-team · refs

1814 lines · 67.3 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015 Cyril Roelandt <[email protected]>
3;;; Copyright © 2015, 2024, 2025 Ricardo Wurmus <[email protected]>
4;;; Copyright © 2015, 2020, 2023, 2024 Efraim Flashner <[email protected]>
5;;; Copyright © 2016 Hartmut Goebel <[email protected]>
6;;; Copyright © 2016 Leo Famulari <[email protected]>
7;;; Copyright © 2017 Danny Milosavljevic <[email protected]>
8;;; Copyright © 2017 Muriithi Frederick Muriuki <[email protected]>
9;;; Copyright © 2017, 2020, 2021 Tobias Geerinckx-Rice <[email protected]>
10;;; Copyright © 2020, 2023 Marius Bakke <[email protected]>
11;;; Copyright © 2020 Tanguy Le Carrour <[email protected]>
12;;; Copyright © 2021 Clément Lassieur <[email protected]>
13;;; Copyright © 2018, 2021-2023, 2025 Maxim Cournoyer <[email protected]>
14;;; Copyright © 2019 Vagrant Cascadian <[email protected]>
15;;; Copyright © 2020, 2021, 2022, 2023 Ricardo Wurmus <[email protected]>
16;;; Copyright © 2022 Garek Dyszel <[email protected]>
17;;; Copyright © 2022 Greg Hogan <[email protected]>
18;;; Copyright © 2024 Christopher Baines <[email protected]>
19;;; Copyright © 2024 David Elsing <[email protected]>
20;;; Copyright © 2024 Zheng Junjie <[email protected]>
21;;; Copyright © 2024 Antero Mejr <[email protected]>
22;;; Copyright © 2024, 2025 Sharlatan Hellseher <[email protected]>
23;;; Copyright © 2025 Nicolas Graves <[email protected]>
24;;; Copyright © 2025 Nguyễn Gia Phong <[email protected]>
25;;;
26;;; This file is part of GNU Guix.
27;;;
28;;; GNU Guix is free software; you can redistribute it and/or modify it
29;;; under the terms of the GNU General Public License as published by
30;;; the Free Software Foundation; either version 3 of the License, or (at
31;;; your option) any later version.
32;;;
33;;; GNU Guix is distributed in the hope that it will be useful, but
34;;; WITHOUT ANY WARRANTY; without even the implied warranty of
35;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36;;; GNU General Public License for more details.
37;;;
38;;; You should have received a copy of the GNU General Public License
39;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
40
41(define-module (gnu packages python-build)
42 #:use-module (gnu packages)
43 #:use-module (gnu packages bash)
44 #:use-module ((guix licenses) #:prefix license:)
45 #:use-module (guix build-system gnu)
46 #:use-module (guix build-system pyproject)
47 #:use-module (guix gexp)
48 #:use-module (guix deprecation)
49 #:use-module (guix download)
50 #:use-module (guix git-download)
51 #:use-module (guix packages))
52
53;;; Commentary:
54;;;
55;;; Python packages to build... Python packages. Since they are bound to be
56;;; relied on by many, their dependencies should be kept minimal, and this
57;;; module should not depend on other modules containing Python packages.
58;;;
59;;; Code:
60
61
62;;; These are dependencies used by the build systems contained herein; they
63;;; feel a bit out of place but are kept here to prevent circular module
64;;; dependencies.
65(define-public python-autocommand
66 (package
67 (name "python-autocommand")
68 (version "2.2.2")
69 (source
70 (origin
71 (method url-fetch)
72 (uri (pypi-uri "autocommand" version))
73 (sha256
74 (base32 "0d2zjms5xm236k46la5pnl7i7hs3a12jlp12cw8lk5jm7i1fk3c7"))))
75 (build-system pyproject-build-system)
76 (native-inputs
77 (list python-pytest-bootstrap
78 python-setuptools-bootstrap))
79 (home-page "https://github.com/Lucretiel/autocommand")
80 (synopsis "Python library to build a command-line from a function")
81 (description "@code{autocommand} is library to automatically generate and
82run simple @code{argparse} parsers from function signatures.")
83 (license license:lgpl3+)))
84
85(define-public python-backports-tarfile
86 (package
87 (name "python-backports-tarfile")
88 (version "1.2.0")
89 (source
90 (origin
91 (method url-fetch)
92 (uri (pypi-uri "backports_tarfile" version))
93 (sha256
94 (base32 "14d9xibla5aahjqf9y0nmpk5vs4qds5rfy628j0invkld3104pnp"))))
95 (build-system pyproject-build-system)
96 (arguments
97 (list #:tests? #f)) ;XXX: Cycles with python-jaraco-context
98 (native-inputs
99 (list python-setuptools-bootstrap
100 python-setuptools-scm-bootstrap))
101 (home-page "https://github.com/jaraco/backports.tarfile")
102 (synopsis "Backport of CPython tarfile module")
103 (description "This package provides a backport of CPython tarfile module.")
104 (license license:expat)))
105
106(define-public python-colorama
107 (package
108 (name "python-colorama")
109 (version "0.4.6")
110 (source
111 (origin
112 (method url-fetch)
113 (uri (pypi-uri "colorama" version))
114 (sha256
115 (base32 "0i3fpq0w5mbfdpy3z9p5raw4fg17jxr6jwh5l8qhavpdnxf5ys88"))))
116 (build-system pyproject-build-system)
117 (native-inputs
118 (list python-hatchling
119 python-pytest-bootstrap))
120 (home-page "https://pypi.org/project/colorama/")
121 (synopsis "Colored terminal text rendering for Python")
122 (description
123 "Colorama is a Python library for rendering colored terminal text.")
124 (license license:bsd-3)))
125
126(define-public python-distlib
127 (package
128 (name "python-distlib")
129 (version "0.4.3")
130 (source
131 (origin
132 (method git-fetch)
133 (uri (git-reference
134 (url "https://github.com/pypa/distlib")
135 (commit version)))
136 (file-name (git-file-name name version))
137 (sha256
138 (base32 "116qm6gr1frgdwq5agyyggi346a3cjdsni3rh2z7kxaf83aq70pk"))))
139 (build-system pyproject-build-system)
140 (arguments
141 (list
142 #:test-backend #~'custom
143 #:test-flags #~(list "tests/test_all.py")
144 #:phases
145 #~(modify-phases %standard-phases
146 (add-after 'unpack 'fix-tests-on-unprivileged-daemon
147 (lambda _
148 (substitute* "tests/test_util.py"
149 ;; /etc may be writable under unprivileged daemon (sandbox).
150 (("self\\.assertFalse\\(self.*is_writable\\('/etc'\\)\\)" all)
151 (string-append "pass # " all)))))
152 (add-before 'build 'no-/bin/sh
153 (lambda* (#:key inputs #:allow-other-keys)
154 (let ((/bin/sh (search-input-file inputs "bin/sh")))
155 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
156 (("/bin/sh") /bin/sh)))))
157 (add-before 'check 'prepare-test-environment
158 (lambda _
159 (setenv "HOME" "/tmp")
160 ;; NOTE: Any value works, the variable just has to be present.
161 (setenv "SKIP_ONLINE" "1"))))))
162 (native-inputs
163 (list python-setuptools-bootstrap))
164 (inputs
165 (list bash-minimal))
166 (home-page "https://github.com/pypa/distlib")
167 (synopsis "Distribution utilities")
168 (description "Distlib is a library which implements low-level functions that
169relate to packaging and distribution of Python software. It is intended to be
170used as the basis for third-party packaging tools.")
171 (license license:psfl)))
172
173(define-public python-more-itertools
174 (package
175 (name "python-more-itertools")
176 (version "10.6.0")
177 (source
178 (origin
179 (method url-fetch)
180 (uri (pypi-uri "more-itertools" version))
181 (sha256
182 (base32
183 "0fzfnfga0jdx217kff57lx3pam76162i0dd0nsgwqccw038zmmrc"))
184 (snippet
185 ;; distutils.errors.DistutilsOptionError: No configuration found for
186 ;; dynamic 'description'. Some dynamic fields need to be specified via
187 ;; `tool.setuptools.dynamic`others must be specified via the equivalent
188 ;; attribute in `setup.py`.
189 '(delete-file "setup.py"))))
190 (build-system pyproject-build-system)
191 (arguments
192 (list
193 #:phases
194 #~(modify-phases %standard-phases
195 (replace 'check
196 (lambda* (#:key tests? #:allow-other-keys)
197 (when tests?
198 (invoke "python" "-m" "unittest")))))))
199 (native-inputs
200 (list python-flit-core))
201 (home-page "https://github.com/erikrose/more-itertools")
202 (synopsis "More routines for operating on iterables, beyond itertools")
203 (description "Python's built-in @code{itertools} module implements a
204number of iterator building blocks inspired by constructs from APL, Haskell,
205and SML. @code{more-itertools} includes additional building blocks for
206working with iterables.")
207 (license license:expat)))
208
209(define-public python-path
210 (package
211 (name "python-path")
212 (version "17.1.0")
213 (source
214 (origin
215 (method url-fetch)
216 (uri (pypi-uri "path" version))
217 (sha256
218 (base32 "1scqbwgcbisx8mb28hw789a7np953851wg6z0bbzdm519znha7nl"))))
219 (build-system pyproject-build-system)
220 (arguments
221 (list
222 #:tests? (not (%current-target-system))
223 #:test-flags
224 #~(list "-k"
225 (string-append
226 ;; Do not test the myproject.toml build as it tries
227 ;; to pull dependencies from the Internet.
228 "not project "
229 ;; This tests assumes a root user exists.
230 "and not test_get_owner"))))
231 (native-inputs
232 (list python-more-itertools
233 python-packaging-bootstrap
234 python-pygments-bootstrap
235 python-pytest-bootstrap
236 python-setuptools-bootstrap
237 python-setuptools-scm-bootstrap))
238 (home-page "https://github.com/jaraco/path")
239 (synopsis "Object-oriented file system path manipulation library")
240 (description "@code{path} (formerly @code{path.py}) implements path
241objects as first-class entities, allowing common operations on files to be
242invoked on those path objects directly.")
243 (license license:expat)))
244
245(define-public python-pathspec
246 (package
247 (name "python-pathspec")
248 (version "1.1.1")
249 (source
250 (origin
251 (method git-fetch)
252 (uri (git-reference
253 (url "https://github.com/cpburnz/python-pathspec")
254 (commit (string-append "v" version))))
255 (file-name (git-file-name name version))
256 (sha256
257 (base32 "0mhbc0i67m9j2lis37z1a1gnmamirvgcdnb2zpxdxba4j61w5c6k"))))
258 (build-system pyproject-build-system)
259 (arguments (list #:test-backend #~'unittest))
260 (native-inputs
261 (list python-flit-core
262 python-packaging-bootstrap))
263 (home-page "https://github.com/cpburnz/python-pathspec")
264 (synopsis "Utility library for gitignore style pattern matching of file paths")
265 (description
266 "This package provides a utility library for gitignore style pattern
267matching of file paths.")
268 (license license:mpl2.0)))
269
270(define-public python-platformdirs-bootstrap
271 ;; Try to update simultaneously with the standard version in
272 ;; (gnu packages python-build).
273 (package
274 (name "python-platformdirs-bootstrap")
275 (version "4.3.6")
276 (source
277 (origin
278 (method url-fetch)
279 (uri (pypi-uri "platformdirs" version))
280 (sha256
281 (base32 "01xrwajkmxv3jp6n14y8jndkrhb48p9kxknkmwch8nw8pjnb4zrm"))))
282 (build-system pyproject-build-system)
283 (arguments (list #:tests? #f)) ; avoid introducing more dependencies.
284 (native-inputs
285 (list python-hatchling
286 python-hatch-vcs
287 python-pytest-bootstrap))
288 (home-page "https://github.com/platformdirs/platformdirs")
289 (synopsis "Determine the appropriate platform-specific directories")
290 (description "When writing applications, finding the right location to
291store user data and configuration varies per platform. Even for
292single-platform apps, there may by plenty of nuances in figuring out the right
293location. This small Python module determines the appropriate
294platform-specific directories, e.g. the ``user data dir''.")
295 (license license:expat)))
296
297(define-public python-pluggy
298 (package
299 (name "python-pluggy")
300 (version "1.6.0")
301 (source
302 (origin
303 (method git-fetch)
304 (uri (git-reference
305 (url "https://github.com/pytest-dev/pluggy")
306 (commit version)))
307 (file-name (git-file-name name version))
308 (sha256
309 (base32 "01q2cmzdfi8sgyl1indbpl75142csizz9s8cryk2a0cjkcy26i56"))))
310 (build-system pyproject-build-system)
311 (arguments
312 (list #:tests? #f)) ;to break cycle with pytest
313 (native-inputs
314 (list python-setuptools-bootstrap
315 python-setuptools-scm))
316 (home-page "https://pluggy.readthedocs.io/en/latest/")
317 (synopsis "Plugin and hook calling mechanism for Python")
318 (description
319 "Pluggy is an extraction of the plugin manager as used by Pytest but
320stripped of Pytest specific details.")
321 (license license:expat)))
322
323(define-public python-testpath
324 (package
325 (name "python-testpath")
326 (version "0.6.0")
327 (source
328 (origin
329 (method git-fetch)
330 (uri (git-reference
331 (url "https://github.com/jupyter/testpath")
332 (commit version)))
333 (file-name (git-file-name name version))
334 (sha256
335 (base32
336 "0pib1xsvjwwyyhv0sqzxvgg814k83dmv1ppwfkkq9llkhr8k7s9y"))))
337 (build-system pyproject-build-system)
338 (native-inputs
339 (list python-flit-core
340 python-pytest-bootstrap))
341 (home-page "https://github.com/jupyter/testpath")
342 (synopsis "Test utilities for code working with files and commands")
343 (description
344 "Testpath is a collection of utilities for Python code working with files
345and commands. It contains functions to check things on the file system, and
346tools for mocking system commands and recording calls to those.")
347 (license license:expat)))
348
349(define-public python-toml
350 (package
351 (name "python-toml")
352 (version "0.10.2")
353 (source
354 (origin
355 (method url-fetch)
356 (uri (pypi-uri "toml" version))
357 (sha256
358 (base32 "13z6rff86bzdpl094x0vmfvls779931xj90dlbs9kpfm138s3gdk"))))
359 (build-system pyproject-build-system)
360 (arguments
361 `(#:tests? #f)) ;no tests suite in release
362 (native-inputs
363 (list python-setuptools-bootstrap))
364 (home-page "https://github.com/uiri/toml")
365 (synopsis "Library for TOML")
366 (description
367 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
368Language (TOML) configuration files.")
369 (license license:expat)))
370
371(define-public python-tomli-w
372 (package
373 (name "python-tomli-w")
374 (version "1.2.0")
375 (source
376 (origin
377 (method url-fetch)
378 (uri (pypi-uri "tomli_w" version))
379 (sha256
380 (base32 "08ahw9db7qycd4fzh4j51cgzp1rdl7snm5scrplpphj7ban4zl9d"))))
381 (build-system pyproject-build-system)
382 (arguments (list #:tests? #f)) ;to avoid extra dependencies
383 (native-inputs (list python-flit-core))
384 (home-page "https://github.com/hukkin/tomli-w")
385 (synopsis "Minimal TOML writer")
386 (description "Tomli-W is a Python library for writing TOML. It is a
387write-only counterpart to Tomli, which is a read-only TOML parser.")
388 (license license:expat)))
389
390(define-public python-pygments
391 (package
392 (name "python-pygments")
393 (version "2.19.2")
394 (source
395 (origin
396 (method url-fetch)
397 (uri (pypi-uri "pygments" version))
398 (sha256
399 (base32
400 "11xqsnnh0iip4vh2lfbh5xa46dy47d9vqw39ad98jzzcgi3v4v33"))))
401 (build-system pyproject-build-system)
402 (arguments
403 (list
404 ;; tests: 4570 passed, 16 skipped, 597 deselected
405 #:test-flags
406 ;; Ignore tests requiring "wcag_contrast_ratio"
407 #~(list "--ignore=tests/contrast/test_contrasts.py"
408 ;; Tests fail with not matched diff.
409 "--ignore=tests/examplefiles/awk/test.awk"
410 "--ignore=tests/examplefiles/bash/example.sh"
411 "--ignore=tests/examplefiles/make/Makefile"
412 "--ignore=tests/examplefiles/phix/example.exw"
413 "--ignore=tests/examplefiles/sed/all_sorts_of_syntax.sed"
414 "--ignore=tests/examplefiles/sed/count_words.sed"
415 "--ignore=tests/examplefiles/sed/increment_number.sed"
416 "--ignore=tests/examplefiles/sed/reverse.sed"
417 "--ignore=tests/examplefiles/slurm/example.sl"
418 ;; Assertion error to find example file by following symlink:
419 ;; assert p.is_file(), f"Example file {p} not found"
420 "--deselect=tests/test_basic_api.py::test_lexer_classes")))
421 (native-inputs
422 (list python-hatchling python-pytest-bootstrap))
423 (home-page "https://pygments.org/")
424 (synopsis "Syntax highlighting")
425 (description
426 "Pygments is a syntax highlighting package written in Python.")
427 (license license:bsd-2)))
428
429(define-public python-pygments-bootstrap
430 (package/inherit python-pygments
431 (name "python-pygments-bootstrap")
432 (native-inputs
433 (list python-hatchling))
434 (arguments `(#:tests? #f))))
435
436(define-public python-pytest-bootstrap
437 (package
438 (name "python-pytest-bootstrap")
439 (version "9.0.2")
440 (source
441 (origin
442 (method url-fetch)
443 (uri (pypi-uri "pytest" version))
444 (sha256
445 (base32 "04fz1vbhb2l6k8lmrk8wqhkxhprlnkq21z6rs48rdn1bm58nc63m"))))
446 (build-system pyproject-build-system)
447 (arguments (list #:tests? #f))
448 (native-inputs
449 (list python-setuptools-bootstrap
450 python-setuptools-scm-bootstrap))
451 (propagated-inputs
452 (list python-iniconfig
453 python-packaging-bootstrap
454 python-pluggy
455 python-pygments-bootstrap)) ;it is in installation dependencies
456 (home-page "https://docs.pytest.org/en/latest/")
457 (synopsis "Python testing library")
458 (description
459 "Pytest is a testing tool that provides auto-discovery of test modules
460and functions, detailed info on failing assert statements, modular fixtures,
461and many external plugins.")
462 (license license:expat)))
463
464(define-public python-pytoml
465 (package
466 (name "python-pytoml")
467 (version "0.1.21")
468 (source
469 (origin
470 (method url-fetch)
471 (uri (pypi-uri "pytoml" version))
472 (sha256
473 (base32 "1rv1byiw82k7mj6aprcrqi2vdabs801y97xhfnrz7kxds34ggv4f"))))
474 (build-system pyproject-build-system)
475 (arguments `(#:tests? #f)) ;to avoid pytest dependency
476 (native-inputs
477 (list python-setuptools))
478 (home-page "https://github.com/avakar/pytoml")
479 (synopsis "Parser for TOML")
480 (description "This package provides a Python parser for TOML-0.4.0.")
481 (license license:expat)))
482
483(define-public python-tomli
484 (package
485 (name "python-tomli")
486 (version "2.2.1")
487 (source
488 (origin
489 (method url-fetch)
490 (uri (pypi-uri "tomli" version))
491 (sha256
492 (base32 "1zq58p2bplyf0xpi9fnyn4w6vc1fkw8whkj0yxhcwdf8g7ff2ifd"))))
493 (build-system pyproject-build-system)
494 (arguments
495 `(#:tests? #f)) ;disabled to avoid extra dependencies
496 (native-inputs (list python-flit-core-bootstrap))
497 (home-page "https://github.com/hukkin/tomli")
498 (synopsis "Small and fast TOML parser")
499 (description "Tomli is a minimal TOML parser that is fully compatible with
500@url{https://toml.io/en/v1.0.0,TOML v1.0.0}. It is about 2.4 times as fast as
501@code{python-toml}.")
502 (license license:expat)))
503
504(define-public python-trove-classifiers
505 (package
506 (name "python-trove-classifiers")
507 (version "2025.5.9.12")
508 (source
509 (origin
510 (method url-fetch)
511 (uri (pypi-uri "trove_classifiers" version))
512 (sha256
513 (base32 "1dawkrcc353rz1h4mazw25vkbhics5lpqrwc8qad6b3flykwi9vw"))))
514 (build-system pyproject-build-system)
515 (arguments
516 (list #:build-backend "setuptools.build_meta"
517 #:tests? #f)) ;keep dependencies to a minimum
518 (native-inputs (list python-setuptools-bootstrap))
519 (home-page "https://github.com/pypa/trove-classifiers")
520 (synopsis "Canonical source for classifiers on PyPI")
521 (description "This package is the canonical source for classifiers use on
522PyPI (pypi.org).")
523 (license license:asl2.0)))
524
525(define-public python-typeguard
526 (package
527 (name "python-typeguard")
528 (version "4.4.4")
529 (source
530 (origin
531 (method url-fetch)
532 (uri (pypi-uri "typeguard" version))
533 (sha256
534 (base32 "0x2zkskia5lb1838ys0bhpp9v6y80jkhchzdz874spbhzggx4zrs"))))
535 (build-system pyproject-build-system)
536 (arguments
537 (list
538 #:test-flags #~(list "--ignore-glob=tests/mypy/*.py")))
539 (native-inputs
540 (list python-pytest-bootstrap
541 python-setuptools-bootstrap
542 python-setuptools-scm-bootstrap))
543 (propagated-inputs
544 (list python-typing-extensions))
545 (home-page "https://github.com/agronholm/typeguard")
546 (synopsis "Run-time type checker for Python")
547 (description
548 "@code{typeguard} provides run-time type checking for functions defined
549with PEP 484 argument (and return) type annotations.")
550 (license license:expat)))
551
552(define-public python-typing-extensions
553 (package
554 (name "python-typing-extensions")
555 (version "4.15.0")
556 (source
557 (origin
558 (method url-fetch)
559 (uri (pypi-uri "typing_extensions" version))
560 (sha256
561 (base32 "0rhlhs28jndgp9fghdhidn6g7xiwx8vvihxbxhlgl4ncfg8lishc"))))
562 (build-system pyproject-build-system)
563 ;; Disable the test suite to keep the dependencies to a minimum. Also,
564 ;; the test suite requires Python's test module, not available in Guix.
565 (arguments (list #:tests? #f))
566 (native-inputs (list python-flit-core))
567 (home-page "https://github.com/python/typing_extensions")
568 (synopsis "Experimental type hints for Python")
569 (description
570 "The typing_extensions module contains additional @code{typing} hints not
571yet present in the of the @code{typing} standard library.
572Included are implementations of:
573@enumerate
574@item ClassVar
575@item ContextManager
576@item Counter
577@item DefaultDict
578@item Deque
579@item NewType
580@item NoReturn
581@item overload
582@item Protocol
583@item runtime
584@item Text
585@item Type
586@item TYPE_CHECKING
587@item AsyncGenerator
588@end enumerate\n")
589 (license license:psfl)))
590
591
592;;;
593;;; Python builder packages.
594;;;
595(define-public python-pbr
596 (package
597 (name "python-pbr")
598 (version "7.0.1")
599 (source
600 (origin
601 (method url-fetch)
602 (uri (pypi-uri "pbr" version))
603 (sha256
604 (base32 "0mvy1z1dyl28w0brns1vdhc98hzbn5b3fsw1xj41amdqs88wpjry"))))
605 (build-system pyproject-build-system)
606 (arguments
607 `(#:tests? #f)) ;; Most tests seem to use the Internet.
608 ;; Message from upstream:
609 ;;
610 ;; DO NOT add any other dependencies as PBR is meant to be minimalist to
611 ;; avoid problems with bootstrapping build environments.
612 ;;
613 ;; See: <https://opendev.org/openstack/pbr/src/tag/7.0.1/requirements.txt>.
614 (propagated-inputs
615 (list python-setuptools))
616 (home-page "https://docs.openstack.org/pbr/latest/")
617 (synopsis "Enhance the default behavior of Python’s setuptools")
618 (description
619 "Python Build Reasonableness (PBR) is a library that injects some useful
620and sensible default behaviors into your setuptools run. It will set
621versions, process requirements files and generate AUTHORS and ChangeLog file
622from git information.")
623 (license license:asl2.0)))
624
625(define-public python-pip
626 (package
627 (name "python-pip")
628 (version "25.1.1")
629 (source
630 (origin
631 (method url-fetch)
632 (uri (pypi-uri "pip" version))
633 (sha256
634 (base32
635 "0xwhrng91a48zb5qmb6vagbjr6kzvbc8b08nq9a5139h3m0mvr1x"))
636 (snippet
637 #~(begin
638 (delete-file "src/pip/_vendor/certifi/cacert.pem")
639 (delete-file "src/pip/_vendor/certifi/core.py")
640 (with-output-to-file "src/pip/_vendor/certifi/core.py"
641 (lambda _
642 (display "\"\"\"
643certifi.py
644~~~~~~~~~~
645This file is a Guix-specific version of core.py.
646
647This module returns the installation location of SSL_CERT_FILE or
648/etc/ssl/certs/ca-certificates.crt, or its contents.
649\"\"\"
650import os
651
652_CA_CERTS = None
653
654try:
655 _CA_CERTS = os.environ [\"SSL_CERT_FILE\"]
656except:
657 _CA_CERTS = os.path.join(\"/etc\", \"ssl\", \"certs\", \"ca-certificates.crt\")
658
659def where() -> str:
660 return _CA_CERTS
661
662def contents() -> str:
663 with open(where(), \"r\", encoding=\"ascii\") as data:
664 return data.read()")))))))
665 (build-system pyproject-build-system)
666 (arguments
667 '(#:tests? #f)) ; there are no tests in the pypi archive.
668 (native-inputs
669 (list python-setuptools-bootstrap))
670 (home-page "https://pip.pypa.io/")
671 (synopsis "Package manager for Python software")
672 (description
673 "Pip is a package manager for Python software, that finds packages on the
674Python Package Index (PyPI).")
675 (license license:expat)))
676
677(define-public python-setuptools
678 (package
679 (name "python-setuptools")
680 ;; When updating python-setuptools, also check in the bundled sources
681 ;; the versions of some native-inputs if some new tests fail.
682 (version "80.9.0")
683 (source
684 (origin
685 (method url-fetch)
686 (uri (pypi-uri "setuptools" version))
687 (sha256
688 (base32 "175iixi2h2jz8y2bpwziak360hvv43jfhipwzbdniryd5r04fszk"))
689 (modules '((guix build utils)))
690 (snippet
691 #~(begin
692 ;; Remove included binaries which are used to build self-extracting
693 ;; installers for Windows.
694 (for-each delete-file (find-files "setuptools"
695 "^(cli|gui).*\\.exe$"))))))
696 (build-system pyproject-build-system)
697 (arguments
698 (list
699 #:test-flags
700 #~(list
701 ;; Avoid additional dependencies
702 "--ignore=setuptools/tests/config/test_apply_pyprojecttoml.py"
703 "--ignore=setuptools/tests/config/test_pyprojecttoml.py"
704 "--ignore=setuptools/tests/test_namespaces.py" ;nss-certs-for-test
705 "--ignore=tools"
706 ;; These tests try to access the network.
707 "-m" "not uses_network"
708 "-k" (string-join
709 (list "not test_dist_fetch_build_egg" ; network
710 ;; Those scripts are unbundled in the snippet above.
711 "test_wheel_includes_cli_scripts"
712 ;; Despite PRE_BUILT_SETUPTOOLS_WHEEL below,
713 ;; this test uses our unbundled setuptools and fails
714 ;; to find jaraco.functools.
715 "test_no_missing_dependencies"
716 ;; XXX: We have pytest in the path, probably
717 ;; because of the setenv "PYTHONPATH" below.
718 "test_ignore_errors"
719 ;; XXX: Unclear why this one fails.
720 "test_basic")
721 " and not "))
722 #:phases
723 #~(modify-phases %standard-phases
724 ;; Build a first wheel bundled for tests.
725 (add-before 'build 'build-bundled-wheel-for-tests
726 (assoc-ref %standard-phases 'build))
727 (add-after 'build-bundled-wheel-for-tests 'cleanup
728 (lambda _
729 (let ((wheel (string-append "setuptools-" #$version
730 "-py3-none-any.whl")))
731 (for-each
732 (lambda (file)
733 (rename-file file wheel))
734 (find-files "dist" "\\.whl$")))
735 (for-each delete-file-recursively
736 '("build" "dist" "setuptools/_vendor")))) ; unbundle
737 (add-before 'check 'configure-tests
738 (lambda* (#:key outputs #:allow-other-keys)
739 (setenv "HOME" (getcwd))
740 ;; FIXME python-pytest still relies a bit on PYTHONPATH.
741 (setenv "PYTHONPATH" (getenv "GUIX_PYTHONPATH"))
742 ;; Inject our pre-built bundled wheel for tests.
743 (setenv "PRE_BUILT_SETUPTOOLS_WHEEL"
744 (string-append (getcwd) "/setuptools-"
745 #$version "-py3-none-any.whl"))))
746 ;; Platformdirs is a bit tedious to properly bootstrap and
747 ;; propagate, and is used in a single place that will be dropped
748 ;; soon, we might as well drop it now.
749 (add-before 'compile-bytecode 'drop-platformdirs-requirement
750 (lambda* (#:key inputs outputs #:allow-other-keys)
751 (with-directory-excursion (site-packages inputs outputs)
752 (substitute* "pkg_resources/__init__.py"
753 (("^from platformdirs import.*")
754 "")
755 (("_user_cache_dir\\(appname='Python-Eggs'\\)")
756 "f\"{os.environ.get('XDG_CACHE_HOME')}/Python-Eggs\""))
757 (substitute* (string-append "setuptools-" #$version
758 ".dist-info/METADATA")
759 (("Requires-Dist: platformdirs.*") "")))))
760 (add-after 'check 'cleanup-installed-tests
761 (lambda* (#:key inputs outputs #:allow-other-keys)
762 (let ((site (site-packages inputs outputs)))
763 (with-directory-excursion site
764 (for-each
765 delete-file-recursively
766 (find-files "."
767 (lambda (file stat)
768 (and (string= (basename file) "tests")
769 (eq? 'directory
770 (stat:type stat))))
771 #:directories? #t)))
772 (substitute* (find-files site "RECORD")
773 ((".*/tests/.*") ""))))))))
774 (propagated-inputs
775 ;; See either bundled inputs or METADATA extra == "core"
776 (list python-jaraco-functools
777 python-jaraco-text
778 python-more-itertools
779 python-packaging
780 python-wheel))
781 (native-inputs
782 (list python-autocommand
783 python-backports-tarfile
784 python-filelock-bootstrap
785 python-inflect
786 python-jaraco-collections
787 python-jaraco-context
788 python-jaraco-envs-bootstrap
789 python-jaraco-functools
790 python-jaraco-path
791 python-jaraco-test
792 python-jaraco-text
793 python-more-itertools
794 python-packaging
795 python-path
796 python-platformdirs-bootstrap
797 python-pip
798 python-pypa-build
799 python-pytest-bootstrap
800 python-tomli
801 python-typing-extensions
802 python-typeguard
803 python-wheel))
804 (home-page "https://pypi.org/project/setuptools/")
805 (synopsis "Library designed to facilitate packaging Python projects")
806 (description "Setuptools is a fully-featured, stable library designed to
807facilitate packaging Python projects, where packaging includes:
808@itemize
809@item Python package and module definitions
810@item distribution package metadata
811@item test hooks
812@item project installation
813@item platform-specific details.
814@end itemize")
815 (license (list license:psfl ;setuptools itself
816 license:expat ;six, appdirs, pyparsing
817 license:asl2.0 ;packaging is dual ASL2/BSD-2
818 license:bsd-2))))
819
820(define-public python-setuptools-bootstrap
821 (package/inherit python-setuptools
822 (name "python-setuptools-bootstrap")
823 ;; version and source are purposefully not inherited, to allow
824 ;; updating python-setuptools in the python-team scope, whereas
825 ;; python-setuptools-bootstrap is in the core-packages-team scope.
826 (version "80.9.0")
827 (source
828 (origin
829 (method url-fetch)
830 (uri (pypi-uri "setuptools" version))
831 (sha256
832 (base32 "175iixi2h2jz8y2bpwziak360hvv43jfhipwzbdniryd5r04fszk"))
833 (modules '((guix build utils)))
834 (snippet
835 ;; TODO: setuptools now bundles the following libraries:
836 ;; packaging, pyparsing, six and appdirs. How to unbundle?
837 ;; Remove included binaries which are used to build self-extracting
838 ;; installers for Windows.
839 '(for-each delete-file (find-files "setuptools"
840 "^(cli|gui).*\\.exe$")))))
841 (build-system gnu-build-system)
842 (arguments
843 (list
844 #:tests? #f ;disabled to avoid extra dependencies
845 ;; Custom build steps to prevent using pyproject-build-system which
846 ;; allows to edit the latter without a world rebuild (for the meson
847 ;; package in particular).
848 #:phases
849 #~(modify-phases %standard-phases
850 (delete 'bootstrap)
851 (delete 'configure)
852 (replace 'build
853 (lambda _
854 (invoke "python" "./setup.py" "build")))
855 (replace 'install
856 (lambda _
857 (invoke "python" "./setup.py" "install"
858 (string-append "--prefix=" #$output) "--no-compile")
859 (invoke "python" "-m" "compileall"
860 "--invalidation-mode=unchecked-hash" #$output)))
861 ;; XXX: Despite using the same setup.py, it seems that the
862 ;; bootstrap version is not able to install the distutils hack.
863 (add-after 'install 'fix-installation
864 (lambda* (#:key outputs #:allow-other-keys)
865 (with-directory-excursion
866 (car (find-files #$output "site-packages"
867 #:directories? #t))
868 (call-with-output-file "distutils-precedence.pth"
869 (lambda (port)
870 (display
871 (string-join
872 '("import os"
873 "var = 'SETUPTOOLS_USE_DISTUTILS'"
874 "enabled = os.environ.get(var, 'local') == 'local'"
875 "enabled and __import__('_distutils_hack').add_shim();")
876 "; ")
877 port)))))))))
878 (native-inputs (list))
879 ;; Avoid introducing an additional module-dependency.
880 (inputs (list (module-ref (resolve-interface '(gnu packages python))
881 'python-wrapper)))
882 (propagated-inputs (list))))
883
884(define-public python-wheel
885 (package
886 (name "python-wheel")
887 (version "0.46.1")
888 (source
889 (origin
890 (method url-fetch)
891 (uri (pypi-uri "wheel" version))
892 (sha256
893 (base32 "0f3abrpkf3spv0lk5mhv8m2ch0j074a3rivn7hfxzxx0bpxpwizx"))))
894 (build-system pyproject-build-system)
895 (arguments
896 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
897 ;; fails to find the newly-built bdist_wheel library, even though it is
898 ;; available on PYTHONPATH. What search path is consulted by setup.py?
899 '(#:tests? #f))
900 (native-inputs
901 (list python-flit-core))
902 (home-page "https://github.com/pypa/wheel")
903 (synopsis "Format for built Python packages")
904 (description
905 "A wheel is a ZIP-format archive with a specially formatted filename and
906the @code{.whl} extension. It is designed to contain all the files for a PEP
907376 compatible install in a way that is very close to the on-disk format. Many
908packages will be properly installed with only the @code{Unpack} step and the
909unpacked archive preserves enough information to @code{Spread} (copy data and
910scripts to their final locations) at any later time. Wheel files can be
911installed with a newer @code{pip} or with wheel's own command line utility.")
912 (license license:expat)))
913
914(define-public python-wheel-0.40
915 (package
916 (inherit python-wheel)
917 (version "0.40.0")
918 (source
919 (origin
920 (method url-fetch)
921 (uri (pypi-uri "wheel" version))
922 (sha256
923 (base32 "0ww8fgkvwv35ypj4cnngczdwp6agr4qifvk2inb32azfzbrrc4fd"))))))
924
925(define-public python-pyparsing
926 (package
927 (name "python-pyparsing")
928 (version "3.2.3")
929 (source
930 (origin
931 (method url-fetch)
932 (uri (pypi-uri "pyparsing" version))
933 (sha256
934 (base32 "1giqgjknzbbh34qf8ij5rsrqlxfysjx39xi85vvl5ddkp0d3zhdr"))))
935 (build-system pyproject-build-system)
936 (outputs '("out" "doc"))
937 (arguments
938 `(#:tests? #f ;no test target
939 #:phases
940 (modify-phases %standard-phases
941 (add-after 'install 'install-doc
942 (lambda* (#:key outputs #:allow-other-keys)
943 (let* ((doc (string-append (assoc-ref outputs "doc")
944 "/share/doc/" ,name "-" ,version))
945 (html-doc (string-append doc "/html"))
946 (examples (string-append doc "/examples")))
947 (mkdir-p html-doc)
948 (mkdir-p examples)
949 (for-each
950 (lambda (dir tgt)
951 (map (lambda (file)
952 (install-file file tgt))
953 (find-files dir ".*")))
954 (list "docs" "htmldoc" "examples")
955 (list doc html-doc examples))))))))
956 (native-inputs (list python-flit-core))
957 (home-page "https://github.com/pyparsing/pyparsing")
958 (synopsis "Python parsing class library")
959 (description
960 "The pyparsing module is an alternative approach to creating and
961executing simple grammars, vs. the traditional lex/yacc approach, or the use
962of regular expressions. The pyparsing module provides a library of classes
963that client code uses to construct the grammar directly in Python code.")
964 (license license:expat)))
965
966(define-public python-packaging
967 (package
968 (name "python-packaging")
969 (version "26.2")
970 (source
971 (origin
972 (method git-fetch)
973 (uri (git-reference
974 (url "https://github.com/pypa/packaging")
975 (commit version)))
976 (file-name (git-file-name name version))
977 (sha256
978 (base32 "0wyfra7qd1ksnnpbvz3srf1cshbrg1lfzfyb541vndryb25jyhzy"))))
979 (build-system pyproject-build-system)
980 (arguments
981 (list
982 ;; tests: 61450 passed
983 #:test-flags
984 ;; Tests depending on hypothesis and tomli_w.
985 #~(list "--ignore=tests/property/test_specifier_comparison.py"
986 "--ignore=tests/property/test_specifier_extended.py"
987 "--ignore=tests/property/test_specifier_implied.py"
988 "--ignore=tests/property/test_specifier_matching.py"
989 "--ignore=tests/property/test_version_format.py"
990 "--ignore=tests/property/test_version_normalization.py"
991 "--ignore=tests/property/test_version_ordering.py"
992 "--ignore=tests/property/test_version_releases.py"
993 "--ignore=tests/test_pylock.py")))
994 (native-inputs
995 (list python-flit-core
996 python-pretend
997 python-pytest-bootstrap))
998 (home-page "https://github.com/pypa/packaging")
999 (synopsis "Core utilities for Python packages")
1000 (description "Packaging is a Python module for dealing with Python packages.
1001 It offers an interface for working with package versions, names, and dependency
1002 information.")
1003 ;; From 'LICENSE': This software is made available under the terms of
1004 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
1005 ;; Contributions to this software is made under the terms of *both* these
1006 ;; licenses.
1007 (license (list license:asl2.0 license:bsd-2))))
1008
1009(define-public python-packaging-bootstrap
1010 (package/inherit python-packaging
1011 (name "python-packaging-bootstrap")
1012 (arguments
1013 ;; XXX: disabled to avoid extra dependencies
1014 (list
1015 #:tests? #f))
1016 (native-inputs (list python-flit-core))
1017 (propagated-inputs '())))
1018
1019(define-public python-pretend
1020 (package
1021 (name "python-pretend")
1022 (version "1.0.9")
1023 (source
1024 (origin
1025 (method git-fetch)
1026 (uri (git-reference
1027 (url "https://github.com/alex/pretend")
1028 (commit (string-append "v" version))))
1029 (file-name (git-file-name name version))
1030 (sha256
1031 (base32 "156l685r9mg7i4xyrk9ql3sxk088irxlg8x7md5i0d05hdw1z8rs"))))
1032 (build-system pyproject-build-system)
1033 (native-inputs
1034 (list python-pytest-bootstrap
1035 python-setuptools-bootstrap))
1036 (home-page "https://github.com/alex/pretend")
1037 (synopsis "Library for stubbing in Python")
1038 (description
1039 "Pretend is a library to make stubbing with Python easier. Stubbing is a
1040technique for writing tests. You may hear the term mixed up with mocks,fakes,
1041or doubles. Basically, a stub is an object that returns pre-canned responses,
1042rather than doing any computation.")
1043 (license license:bsd-3)))
1044
1045(define-public python-pyproject-hooks
1046 (package
1047 (name "python-pyproject-hooks")
1048 (version "1.2.0")
1049 (source
1050 (origin
1051 (method url-fetch)
1052 (uri (pypi-uri "pyproject_hooks" version))
1053 (sha256
1054 (base32 "1y511nblr0lslz1d5s46844f5raryjnp3n1dci499bhgqkarp18y"))))
1055 (build-system pyproject-build-system)
1056 (native-inputs
1057 (list python-flit-core
1058 python-pytest-bootstrap
1059 python-testpath))
1060 (home-page "https://github.com/pypa/pyproject-hooks")
1061 (synopsis "Low-level library for calling @file{pyproject.toml} backends")
1062 (description
1063 "@code{pyproject-hooks} is a low-level library for calling build backends
1064in @file{pyproject.toml}-based projects. It provides basic functionality to
1065write tooling that generates distribution files from Python projects.")
1066 (license license:expat)))
1067
1068;;; The name 'python-pypa-build' is chosen rather than 'python-build' to avoid
1069;;; a name clash with python-build from (guix build-system python).
1070(define-public python-pypa-build
1071 (package
1072 (name "python-pypa-build")
1073 ;; Newer version needs more inputs, consider to move to python-xyz.
1074 (version "1.3.0")
1075 (source
1076 (origin
1077 (method url-fetch)
1078 (uri (pypi-uri "build" version))
1079 (sha256
1080 (base32 "15xk0w71x8v1c8by049rdwh74mhkl3rj3v9sym8fkgbhl87dv3k9"))))
1081 (build-system pyproject-build-system)
1082 (arguments `(#:tests? #f)) ;disabled to avoid extra dependencies
1083 (native-inputs
1084 (list python-flit-core))
1085 (propagated-inputs
1086 (list python-colorama
1087 python-packaging
1088 python-pyproject-hooks
1089 python-tomli))
1090 (home-page "https://pypa-build.readthedocs.io/en/latest/")
1091 (synopsis "Simple Python PEP 517 package builder")
1092 (description "The @command{build} command invokes the PEP 517 hooks to
1093build a distribution package. It is a simple build tool and does not perform
1094any dependency management. It aims to keep dependencies to a minimum, in
1095order to make bootstrapping easier.")
1096 (license license:expat)))
1097
1098(define-public python-poetry-core
1099 (package
1100 (name "python-poetry-core")
1101 (version "2.3.2")
1102 (source
1103 (origin
1104 (method git-fetch)
1105 (uri (git-reference
1106 (url "https://github.com/python-poetry/poetry-core")
1107 (commit version)))
1108 (file-name (git-file-name name version))
1109 (sha256
1110 (base32 "07n64i2wal2d6ca74vkl7x8wsks6bi0njii8pv8rmfragc48kzj6"))))
1111 (build-system pyproject-build-system)
1112 (arguments
1113 (list #:tests? #f)) ;disabled to avoid extra dependencies
1114 (home-page "https://github.com/python-poetry/poetry-core")
1115 (synopsis "Poetry PEP 517 build back-end")
1116 (description
1117 "The @code{poetry-core} module provides a PEP 517 build back-end
1118implementation developed for Poetry. This project is intended to be
1119a light weight, fully compliant, self-contained package allowing PEP 517
1120compatible build front-ends to build Poetry managed projects.")
1121 (license license:expat)))
1122
1123(define-public python-filelock-bootstrap
1124 ;; Try to update simultaneously with the standard version in
1125 ;; (gnu packages python-build).
1126 (package
1127 (name "python-filelock-bootstrap")
1128 (version "3.16.1")
1129 (source
1130 (origin
1131 (method url-fetch)
1132 (uri (pypi-uri "filelock" version))
1133 (sha256
1134 (base32
1135 "0d8ljvmsfgriiqf5dqii91gfcpj7cpjrh8fnsvifaiyvspygnjf2"))))
1136 (build-system pyproject-build-system)
1137 (arguments (list #:tests? #f)) ; avoid extra dependencies.
1138 (native-inputs
1139 (list python-hatch-vcs-bootstrap
1140 python-hatchling
1141 python-setuptools-scm-bootstrap))
1142 (home-page "https://github.com/tox-dev/py-filelock")
1143 (synopsis "Platform independent file lock")
1144 (description "@code{filelock} contains a single module implementing
1145a platform independent file lock in Python, which provides a simple way of
1146inter-process communication.")
1147 (license license:unlicense)))
1148
1149;;; This package exists to bootstrap python-tomli.
1150(define-public python-flit-core-bootstrap
1151 (package
1152 (name "python-flit-core-bootstrap")
1153 (version "3.12.0")
1154 (source
1155 (origin
1156 (method url-fetch)
1157 (uri (pypi-uri "flit" version))
1158 (sha256
1159 (base32 "0h1pxi2hgr95321bgl45l86693zl14l3shj0idsyg4k9v56z700w"))))
1160 (build-system pyproject-build-system)
1161 (arguments
1162 (list
1163 ;; flit-core has a test suite, but it requires Pytest. Disable it so
1164 ;; as to not pull pytest as an input.
1165 #:tests? #f
1166 #:phases
1167 #~(modify-phases %standard-phases
1168 (add-after 'unpack 'fix-license
1169 ;; flit_core bundles the 'tomli' TOML parser, to avoid a
1170 ;; bootstrapping problem. See
1171 ;; <https://github.com/pypa/packaging-problems/issues/342>.
1172 (lambda _
1173 (delete-file-recursively "flit_core/flit_core/vendor")
1174 (substitute* "flit_core/pyproject.toml"
1175 (("license-files.*") "license-files = [\"LICENSE*\"]\n"))))
1176 (replace 'build
1177 ;; flit-core requires itself to build. Luckily, a
1178 ;; bootstrapping script exists, which does so using just
1179 ;; the checkout sources and Python.
1180 (lambda _
1181 (chdir "flit_core")
1182 (invoke "python" "build_dists.py")))
1183 (delete 'sanity-check))))
1184 (propagated-inputs
1185 (list python-toml))
1186 (home-page "https://github.com/pypa/flit")
1187 (synopsis "Core package of the Flit Python build system")
1188 (description "This package provides @code{flit-core}, a PEP 517 build
1189backend for packages using Flit. The only public interface is the API
1190specified by PEP 517, @code{flit_core.buildapi}.")
1191 (license license:bsd-3)))
1192
1193(define-public python-flit-core
1194 (package/inherit python-flit-core-bootstrap
1195 (name "python-flit-core")
1196 (propagated-inputs
1197 (modify-inputs propagated-inputs
1198 (delete "python-toml")
1199 (prepend python-tomli)))))
1200
1201(define-public python-setuptools-scm
1202 (package
1203 (name "python-setuptools-scm")
1204 (version "8.3.1")
1205 (source
1206 (origin
1207 (method url-fetch)
1208 (uri (pypi-uri "setuptools_scm" version))
1209 (sha256
1210 (base32 "0qra4jysbdwlrwsb5iz8kai1xxbsz6adzbrbscvx1b2xny95wm9x"))))
1211 (build-system pyproject-build-system)
1212 (arguments
1213 (list
1214 #:tests? #f ;avoid extra dependencies such as pytest
1215 ;; pyproject-build-system will error handle forms such as
1216 ;; "module:object", so we set it.
1217 #:build-backend "setuptools.build_meta"))
1218 (propagated-inputs
1219 (list python-packaging-bootstrap
1220 python-setuptools-bootstrap))
1221 (home-page "https://github.com/pypa/setuptools_scm/")
1222 (synopsis "Manage Python package versions in SCM metadata")
1223 (description
1224 "Setuptools_scm handles managing your Python package versions in
1225@dfn{software configuration management} (SCM) metadata instead of declaring
1226them as the version argument or in a SCM managed file.")
1227 (license license:expat)))
1228
1229(define-public python-setuptools-scm-bootstrap
1230 (package/inherit python-setuptools-scm
1231 (name "python-setuptools-scm-bootstrap")
1232 (build-system pyproject-build-system)
1233 (arguments
1234 (list
1235 #:tests? #f ;avoid extra dependencies such as pytest
1236 ;; pyproject-build-system will error handle forms such as
1237 ;; "module:object", so we set it.
1238 #:build-backend "setuptools.build_meta"))
1239 (native-inputs
1240 (list python-packaging-bootstrap))
1241 (propagated-inputs
1242 (list python-setuptools-bootstrap))))
1243
1244(define-public python-setuptools-scm-next
1245 (package
1246 (inherit python-setuptools-scm)
1247 (name "python-setuptools-scm")
1248 (version "9.2.2")
1249 (source
1250 (origin
1251 (method url-fetch)
1252 (uri (pypi-uri "setuptools_scm" version))
1253 (sha256
1254 (base32 "0mzgyyg1cgigkmlfm0iy44f2092zn8xc093ygn4a11jncss4lrqw"))))))
1255
1256(define-public python-six
1257 (package
1258 (name "python-six")
1259 (version "1.17.0")
1260 (source
1261 (origin
1262 (method url-fetch)
1263 (uri (pypi-uri "six" version))
1264 (sha256
1265 (base32 "109ajcsfhrz33lbwbb337w34crc3lb9rjnxrcpnbczlf8rfk6w7z"))))
1266 (build-system pyproject-build-system)
1267 (native-inputs
1268 (list python-pytest-bootstrap
1269 python-setuptools-bootstrap))
1270 (home-page "https://pypi.org/project/six/")
1271 (synopsis "Python 2 and 3 compatibility utilities")
1272 (description
1273 "Six is a Python 2 and 3 compatibility library. It provides utility
1274functions for smoothing over the differences between the Python versions with
1275the goal of writing Python code that is compatible on both Python versions.
1276Six supports every Python version since 2.5. It is contained in only one
1277Python file, so it can be easily copied into your project.")
1278 (license license:x11)))
1279
1280(define-public python-editables
1281 (package
1282 (name "python-editables")
1283 (version "0.5")
1284 (source (origin
1285 (method git-fetch)
1286 (uri (git-reference
1287 (url "https://github.com/pfmoore/editables")
1288 (commit version)))
1289 (file-name (git-file-name name version))
1290 (sha256
1291 (base32
1292 "1bp959fz987jvrnkilhyr41fw4g00g9jfyiwmfvy96hv1yl68w8b"))))
1293 (build-system pyproject-build-system)
1294 (arguments (list #:tests? #f)) ;avoid extra dependencies such as pytest
1295 (native-inputs
1296 (list python-flit-core))
1297 (home-page "https://github.com/pfmoore/editables")
1298 (synopsis "Editable installations")
1299 (description "This library supports the building of wheels which, when
1300installed, will expose packages in a local directory on @code{sys.path} in
1301``editable mode''. In other words, changes to the package source will be
1302reflected in the package visible to Python, without needing a reinstall.")
1303 (license license:expat)))
1304
1305(define-public python-hatchling
1306 (package
1307 (name "python-hatchling")
1308 (version "1.27.0")
1309 (source
1310 (origin
1311 (method url-fetch)
1312 (uri (pypi-uri "hatchling" version))
1313 (sha256
1314 (base32 "1mhzjhg7ky8npcrnbwwq30w8s73mm73m5z0j260v7aqrk1njj74p"))))
1315 (build-system pyproject-build-system)
1316 (arguments
1317 (list #:tests? #f)) ;to keep dependencies to a minimum
1318 (propagated-inputs
1319 (list python-packaging-bootstrap
1320 python-pathspec
1321 python-pluggy
1322 python-tomli
1323 python-trove-classifiers))
1324 (home-page "https://hatch.pypa.io/latest/")
1325 (synopsis "Modern, extensible Python build backend")
1326 (description "Hatch is a modern, extensible Python project manager. It
1327has features such as:
1328@itemize
1329@item Standardized build system with reproducible builds by default
1330@item Robust environment management with support for custom scripts
1331@item Easy publishing to PyPI or other indexes
1332@item Version management
1333@item Configurable project generation with sane defaults
1334@item Responsive CLI, ~2-3x faster than equivalent tools.
1335@end itemize")
1336 (license license:expat)))
1337
1338(define-public python-hatchling-bootstrap
1339 (package/inherit python-hatchling
1340 (name "python-hatchling-bootstrap")
1341 (propagated-inputs
1342 (modify-inputs propagated-inputs
1343 (replace "python-packaging" python-packaging-bootstrap)))))
1344
1345(define-public python-hatch-docstring-description
1346 (package
1347 (name "python-hatch-docstring-description")
1348 (version "1.1.1")
1349 (source
1350 (origin
1351 (method url-fetch)
1352 (uri (pypi-uri "hatch_docstring_description" version))
1353 (sha256
1354 (base32 "1qwa8m4yswn0bkc5xzq30xsaca578axl5ig2r6mkcdxsfg196pdi"))))
1355 (build-system pyproject-build-system)
1356 (arguments (list #:tests? #f)) ;avoid extra test dependencies
1357 (native-inputs
1358 (list python-hatch-vcs
1359 python-hatchling))
1360 (propagated-inputs
1361 (list python-hatchling))
1362 (home-page "https://github.com/flying-sheep/hatch-docstring-description")
1363 (synopsis "Derive PyPI package description from Python package docstring ")
1364 (description
1365 "This package provides a Hatchling plugin to read the description from the
1366package docstring.")
1367 (license license:gpl3+)))
1368
1369(define-public python-hatch-fancy-pypi-readme
1370 (package
1371 (name "python-hatch-fancy-pypi-readme")
1372 (version "25.1.0")
1373 (source
1374 (origin
1375 (method url-fetch)
1376 (uri (pypi-uri "hatch_fancy_pypi_readme" version))
1377 (sha256
1378 (base32 "0i803kq80qx0k1lj3z69zw40ynqxml4p1qsc851izmchzwyysn4w"))))
1379 (build-system pyproject-build-system)
1380 (arguments (list #:tests? #f)) ;avoid extra test dependencies
1381 (propagated-inputs (list python-hatchling python-tomli))
1382 (home-page "https://github.com/hynek/hatch-fancy-pypi-readme")
1383 (synopsis "Fancy PyPI READMEs with Hatch")
1384 (description "This hatch plugin allows defining a project description in
1385terms of concatenated fragments that are based on static strings, files and
1386parts of files defined using cut-off points or regular expressions.")
1387 (license license:expat)))
1388
1389(define-public python-hatch-requirements-txt
1390 (package
1391 (name "python-hatch-requirements-txt")
1392 (version "0.4.1")
1393 (source
1394 (origin
1395 (method url-fetch)
1396 (uri (pypi-uri "hatch_requirements_txt" version))
1397 (sha256
1398 (base32 "083xakilrmy0ymh34s9wm8x8s7s8vn7ij33xz9avn1gxb1bnws1c"))))
1399 (build-system pyproject-build-system)
1400 (arguments (list #:tests? #f)) ;avoid extra test dependencies
1401 (propagated-inputs (list python-hatchling python-packaging-bootstrap))
1402 (home-page "https://github.com/repo-helper/hatch-requirements-txt")
1403 (synopsis "Hatchling plugin to read requirements.txt")
1404 (description
1405 "This package implements a functionality to read project dependencies
1406from requirements.txt.")
1407 (license license:expat)))
1408
1409(define-public python-hatch-vcs
1410 (package
1411 (name "python-hatch-vcs")
1412 (version "0.5.0")
1413 (source
1414 (origin
1415 (method url-fetch)
1416 (uri (pypi-uri "hatch_vcs" version))
1417 (sha256
1418 (base32 "1yczh2aqrf9p3gs1dayswz5pp9z2yhmlld0c14ah4d20d49gm583"))))
1419 (arguments (list #:tests? #f)) ;avoid extra test dependencies
1420 (build-system pyproject-build-system)
1421 (propagated-inputs (list python-hatchling python-setuptools-scm))
1422 (home-page "https://github.com/ofek/hatch-vcs")
1423 (synopsis "Hatch plugin for versioning with your preferred VCS")
1424 (description "This package is a plugin for Hatch that uses your preferred
1425version control system (like Git) to determine project versions.")
1426 (license license:expat)))
1427
1428(define-public python-hatch-vcs-bootstrap
1429 (package/inherit python-hatch-vcs
1430 (name "python-hatch-vcs-bootstrap")
1431 (native-inputs
1432 (list python-packaging-bootstrap))
1433 (propagated-inputs
1434 (list python-hatchling-bootstrap
1435 python-setuptools-scm-bootstrap))))
1436
1437(define-public python-inflect
1438 (package
1439 (name "python-inflect")
1440 (version "7.5.0")
1441 (source (origin
1442 (method url-fetch)
1443 (uri (pypi-uri "inflect" version))
1444 (sha256
1445 (base32
1446 "07spmlkmskwhxc0j5j4ms3w0f6pyv3h8iqwcbahdabklqc0riwgs"))))
1447 (build-system pyproject-build-system)
1448 (native-inputs
1449 (list python-pygments
1450 python-pytest-bootstrap
1451 python-setuptools-bootstrap
1452 python-setuptools-scm-bootstrap))
1453 (propagated-inputs
1454 (list python-more-itertools
1455 python-typeguard
1456 python-typing-extensions))
1457 (home-page "https://github.com/jaraco/inflect")
1458 (synopsis "Correctly generate plurals, singular nouns, ordinals, indefinite articles")
1459 (description
1460 "This Python module lets you correctly generate plurals, singular nouns,
1461ordinals, indefinite articles; it also can convert numbers to words.")
1462 (license license:expat)))
1463
1464(define-public python-iniconfig
1465 (package
1466 (name "python-iniconfig")
1467 (version "2.1.0")
1468 (source
1469 (origin
1470 (method url-fetch)
1471 (uri (pypi-uri "iniconfig" version))
1472 (sha256
1473 (base32 "1iz1fg3n6pv4q8jzv1q0izl5001diwqggizrg3p3ywrn1gix5frs"))))
1474 (build-system pyproject-build-system)
1475 (arguments (list #:tests? #f)) ;no tests in PyPI, tests introduce cycle with pytest
1476 (native-inputs
1477 (list python-hatch-vcs-bootstrap
1478 python-hatchling-bootstrap))
1479 (home-page "https://github.com/RonnyPfannschmidt/iniconfig")
1480 (synopsis "Simple INI-file parser")
1481 (description "The @code{iniconfig} package provides a small and simple
1482 INI-file parser module having a unique set of features ; @code{iniconfig}
1483 @itemize
1484 @item maintains the order of sections and entries ;
1485 @item supports multi-line values with or without line-continuations ;
1486 @item supports \"#\" comments everywhere ;
1487 @item raises errors with proper line-numbers ;
1488 @item raises an error when two sections have the same name.
1489 @end itemize")
1490 (license license:expat)))
1491
1492(define-public python-installer
1493 (package
1494 (name "python-installer")
1495 (version "0.7.0")
1496 (source
1497 (origin
1498 (method url-fetch)
1499 (uri (pypi-uri "installer" version))
1500 (sha256
1501 (base32 "0cdnqh3a3amw8k4s1pzfjh0hpvzw4pczgl702s1b16r82qqkwvd2"))))
1502 (build-system pyproject-build-system)
1503 (arguments (list #:tests? #f)) ;avoid extra test dependencies
1504 (native-inputs
1505 (list python-flit-core))
1506 (home-page "https://installer.rtfd.io/")
1507 (synopsis "Installer library for Python wheels")
1508 (description
1509 "This package provides a low-level library for installing a Python
1510package from a wheel distribution. It provides basic functionality and
1511abstractions for handling wheels and installing packages from wheels.")
1512 (license license:expat)))
1513
1514;; Both packages have been merged into a single one.
1515(define-deprecated-package python-pypa-installer
1516 python-installer)
1517
1518(define-public python-jaraco-classes
1519 (package
1520 (name "python-jaraco-classes")
1521 (version "3.4.0")
1522 (source
1523 (origin
1524 (method url-fetch)
1525 (uri (pypi-uri "jaraco.classes" version))
1526 (sha256
1527 (base32 "1k9s7wxhsy15730qab8bry7kpgl4yk3wch45ikfw0f823nsj9827"))))
1528 (build-system pyproject-build-system)
1529 (arguments
1530 (list ; Do not test the myproject.toml build as it pulls dependencies.
1531 #:test-flags '(list "-k" "not project")))
1532 (native-inputs
1533 (list python-pytest-bootstrap
1534 python-setuptools-bootstrap))
1535 (propagated-inputs
1536 (list python-more-itertools))
1537 (home-page "https://github.com/jaraco/jaraco.classes")
1538 (synopsis "Utility functions for Python class constructs")
1539 (description "This Python library contains utility functions for Python
1540class constructs.")
1541 (license license:expat)))
1542
1543(define-public python-jaraco-collections
1544 (package
1545 (name "python-jaraco-collections")
1546 (version "5.2.1")
1547 (source
1548 (origin
1549 (method url-fetch)
1550 (uri (pypi-uri "jaraco_collections" version))
1551 (sha256
1552 (base32 "1v8qza70spm4d822bm7wq3j2cyd33nqg2i87n99spw6np9q1kf6s"))))
1553 (build-system pyproject-build-system)
1554 ;; Do not test pyproject.toml with python-pytest-checkdocs as it tries to
1555 ;; download dependencies.
1556 (arguments
1557 '(#:test-flags '("-k" "not project")))
1558 (native-inputs
1559 (list python-pytest-bootstrap
1560 python-setuptools-bootstrap
1561 python-setuptools-scm-bootstrap))
1562 (propagated-inputs
1563 (list python-jaraco-text))
1564 (home-page "https://github.com/jaraco/jaraco.collections")
1565 (synopsis "Provides various collection objects")
1566 (description
1567 "This package provides models and classes to supplement the
1568standard library @code{collections} module. Examples include
1569@itemize
1570@item
1571RangeMap: A mapping that accepts a range of values for keys.
1572@item
1573Projection: A subset over an existing mapping.
1574@item
1575KeyTransformingDict: Generalized mapping with keys transformed by a function.
1576@item
1577FoldedCaseKeyedDict: A dict whose string keys are case-insensitive.
1578@item
1579BijectiveMap: A map where keys map to values and values back to their keys.
1580@item
1581ItemsAsAttributes: A mapping mix-in exposing items as attributes.
1582@item
1583IdentityOverrideMap: A map whose keys map by default to themselves unless overridden.
1584@item
1585FrozenDict: A hashable, immutable map.
1586@item
1587Enumeration: An object whose keys are enumerated.
1588@item
1589Everything: A container that contains all things.
1590@item
1591Least, Greatest: Objects that are always less than or greater than any other.
1592@item
1593pop_all: Return all items from the mutable sequence and remove them from that sequence.
1594@item
1595DictStack: A stack of dicts, great for sharing scopes.
1596@item
1597WeightedLookup: A specialized RangeMap for selecting an item by weights.
1598@end itemize")
1599 (license license:expat)))
1600
1601(define-public python-jaraco-context
1602 (package
1603 (name "python-jaraco-context")
1604 (version "6.0.1")
1605 (source
1606 (origin
1607 (method url-fetch)
1608 (uri (pypi-uri "jaraco_context" version))
1609 (sha256
1610 (base32 "1cyija3n4481r1ykxdx342m07lrfyg4ygbn0in9i82yganjlxblv"))))
1611 (build-system pyproject-build-system)
1612 (arguments
1613 (list #:tests? #f)) ;no tests in PyPI archive and Git checkout
1614 (native-inputs
1615 (list python-setuptools-bootstrap
1616 python-setuptools-scm-bootstrap))
1617 (propagated-inputs
1618 (list python-backports-tarfile))
1619 (home-page "https://github.com/jaraco/jaraco.context")
1620 (synopsis "Context managers Python library")
1621 (description
1622 "This Python library provides context managers-related procedures.")
1623 (license license:expat)))
1624
1625(define-public python-jaraco-envs-bootstrap
1626 (package
1627 (name "python-jaraco-envs-bootstrap")
1628 (version "2.6.0")
1629 (source
1630 (origin
1631 (method url-fetch)
1632 (uri (pypi-uri "jaraco.envs" version))
1633 (sha256
1634 (base32 "1xb00gfhhhvh44wqq5yqb5bxi79nd97vzvh1xrbb43b40v29b4c0"))))
1635 (build-system pyproject-build-system)
1636 (arguments
1637 (list ; avoid extra dependencies.
1638 #:tests? #f
1639 #:phases
1640 #~(modify-phases %standard-phases
1641 (delete 'sanity-check))))
1642 (propagated-inputs
1643 (list python-path
1644 python-virtualenv-bootstrap))
1645 (native-inputs
1646 (list python-setuptools-bootstrap
1647 python-setuptools-scm-bootstrap))
1648 (home-page "https://github.com/jaraco/jaraco.envs")
1649 (synopsis "Classes for orchestrating Python (virtual) environments")
1650 (description
1651 "This package provides classes for orchestrating Python (virtual)
1652environments.")
1653 (license license:expat)))
1654
1655(define-public python-jaraco-functools
1656 (package
1657 (name "python-jaraco-functools")
1658 (version "4.2.1")
1659 (source
1660 (origin
1661 (method url-fetch)
1662 (uri (pypi-uri "jaraco_functools" version))
1663 (sha256
1664 (base32 "0lvk12qbl5zd1ikr6xzflj1jcs3vwgmwgy2k63x5dkmbrjzllqxy"))))
1665 (build-system pyproject-build-system)
1666 (arguments
1667 (list #:tests? (not (%current-target-system))
1668 ;; Do not test the myproject.toml build as it pulls dependencies.
1669 ;; Do not run a test that tries to emulate a broken proprietary
1670 ;; CI set-up, fails to do so correctly, and then throws an error.
1671 #:test-flags
1672 '(list "-k" "not project and not test_function_throttled")))
1673 (native-inputs
1674 (list python-jaraco-classes
1675 python-pytest-bootstrap
1676 python-setuptools-bootstrap
1677 python-setuptools-scm-bootstrap))
1678 (propagated-inputs (list python-more-itertools))
1679 (home-page "https://github.com/jaraco/jaraco.functools")
1680 (synopsis "Python library extending Python's @code{functools}")
1681 (description "This library extends the standard @code{functools} Python
1682module with a few extra procedures.")
1683 (license license:expat)))
1684
1685(define-public python-jaraco-path
1686 (package
1687 (name "python-jaraco-path")
1688 (version "3.7.2")
1689 (source
1690 (origin
1691 (method git-fetch)
1692 (uri (git-reference
1693 (url "https://github.com/jaraco/jaraco.path")
1694 (commit (string-append "v" version))))
1695 (file-name (git-file-name name version))
1696 (sha256
1697 (base32 "12bj9za1yp0yn0ppya6a4kwgmh7hvmw64x7ivp4y0sbv20r0vfdq"))))
1698 (build-system pyproject-build-system)
1699 (native-inputs
1700 (list python-pytest-bootstrap
1701 python-setuptools-bootstrap
1702 python-setuptools-scm-bootstrap))
1703 (home-page "https://github.com/jaraco/jaraco.path")
1704 (synopsis "Miscellaneous path functions")
1705 (description
1706 "This package provides miscellaneous path functions for Python.")
1707 (license license:expat)))
1708
1709(define-public python-jaraco-test
1710 (package
1711 (name "python-jaraco-test")
1712 (version "5.5.1")
1713 (source
1714 (origin
1715 (method url-fetch)
1716 (uri (pypi-uri "jaraco_test" version))
1717 (sha256
1718 (base32 "0xfkly5w4i4npi4pq1g32y8q8iijkq4pfcfs8wcjhfn4amj6212c"))))
1719 (build-system pyproject-build-system)
1720 (arguments
1721 (list #:test-flags '(list "-k" "http")))
1722 (native-inputs
1723 (list python-pytest-bootstrap
1724 python-setuptools-bootstrap))
1725 (propagated-inputs
1726 (list python-jaraco-collections
1727 python-jaraco-context
1728 python-jaraco-functools))
1729 (home-page "https://github.com/jaraco/jaraco.test")
1730 (synopsis "Testing support by jaraco")
1731 (description "This package provides testing support by jaraco.")
1732 (license license:expat)))
1733
1734(define-public python-jaraco-text
1735 (package
1736 (name "python-jaraco-text")
1737 (version "4.0.0")
1738 (source
1739 (origin
1740 (method url-fetch)
1741 (uri (pypi-uri "jaraco_text" version))
1742 (sha256
1743 (base32 "1c0dy5jvhigcyryi2h8n1m87dnhyxr7w01n9shwzkdlslv7gwwav"))))
1744 (build-system pyproject-build-system)
1745 ;; Do not test pyproject.toml with python-pytest-checkdocs as it tries to
1746 ;; download dependencies.
1747 (arguments
1748 '(#:test-flags '("-k" "not project")))
1749 (native-inputs
1750 (list python-pytest-bootstrap
1751 python-setuptools-bootstrap
1752 python-setuptools-scm-bootstrap))
1753 (propagated-inputs
1754 (list python-autocommand
1755 python-inflect
1756 python-jaraco-context
1757 python-jaraco-functools
1758 python-more-itertools))
1759 (home-page "https://github.com/jaraco/jaraco.text")
1760 (synopsis "Provides various routines for text manipulation")
1761 (description
1762 "This package provides handy routines for dealing with text,
1763such as wrapping, substitution, trimming, stripping, prefix and suffix
1764removal, line continuation, indentation, comment processing, identifier
1765processing, values parsing, case insensitive comparison, and more.")
1766 (license license:expat)))
1767
1768(define-public python-pdm-backend
1769 (package
1770 (name "python-pdm-backend")
1771 (version "2.4.5")
1772 (source
1773 (origin
1774 (method url-fetch)
1775 (uri (pypi-uri "pdm_backend" version))
1776 (sha256
1777 (base32 "0nzyfa4jb0cpfhh0jfqsk4xz8rbyfyxqrh2ps3axm2ih8321kh2n"))))
1778 (build-system pyproject-build-system)
1779 (arguments
1780 (list
1781 #:tests? #f)) ; Depends on pytest, which we cannot import into this module.
1782 (home-page "https://pdm-backend.fming.dev/")
1783 (synopsis "PEP 517 build backend for PDM")
1784 (description
1785 "PDM-Backend is a build backend that supports the latest packaging
1786standards, which includes PEP 517, PEP 621 and PEP 660.")
1787 (license license:expat)))
1788
1789(define-public python-virtualenv-bootstrap
1790 (package
1791 (name "python-virtualenv-bootstrap")
1792 (version "20.29.1")
1793 (source
1794 (origin
1795 (method url-fetch)
1796 (uri (pypi-uri "virtualenv" version))
1797 (sha256
1798 (base32
1799 "0dfwnn8i1y33kgxhi4xyhsj4yr5vsin7zf9c343bcbyk700rgf5q"))))
1800 (build-system pyproject-build-system)
1801 (arguments (list #:tests? #f)) ; avoid extra dependencies.
1802 (native-inputs
1803 (list python-hatch-vcs-bootstrap
1804 python-hatchling
1805 python-setuptools-bootstrap))
1806 (propagated-inputs
1807 (list python-distlib
1808 python-filelock-bootstrap
1809 python-platformdirs-bootstrap))
1810 (home-page "https://virtualenv.pypa.io/")
1811 (synopsis "Virtual Python environment builder")
1812 (description
1813 "Virtualenv is a tool to create isolated Python environments.")
1814 (license license:expat)))