projects/guix·blob nckx-patch-1 · refs

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