projects/guix·blob wip-postfix · refs

745 lines · 28.4 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015 Ricardo Wurmus <[email protected]>
3;;; Copyright © 2015, 2020 Efraim Flashner <[email protected]>
4;;; Copyright © 2016 Leo Famulari <[email protected]>
5;;; Copyright © 2020, 2023 Marius Bakke <[email protected]>
6;;; Copyright © 2020 Tanguy Le Carrour <[email protected]>
7;;; Copyright © 2018, 2021, 2022, 2023 Maxim Cournoyer <[email protected]>
8;;; Copyright © 2019 Vagrant Cascadian <[email protected]>
9;;; Copyright © 2021 Tobias Geerinckx-Rice <[email protected]>
10;;; Copyright © 2020, 2021, 2022, 2023 Ricardo Wurmus <[email protected]>
11;;; Copyright © 2022 Garek Dyszel <[email protected]>
12;;; Copyright © 2022 Greg Hogan <[email protected]>
13
14;;;
15;;; This file is part of GNU Guix.
16;;;
17;;; GNU Guix is free software; you can redistribute it and/or modify it
18;;; under the terms of the GNU General Public License as published by
19;;; the Free Software Foundation; either version 3 of the License, or (at
20;;; your option) any later version.
21;;;
22;;; GNU Guix is distributed in the hope that it will be useful, but
23;;; WITHOUT ANY WARRANTY; without even the implied warranty of
24;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25;;; GNU General Public License for more details.
26;;;
27;;; You should have received a copy of the GNU General Public License
28;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
29
30(define-module (gnu packages python-build)
31 #:use-module (gnu packages)
32 #:use-module ((guix licenses) #:prefix license:)
33 #:use-module (guix build-system python)
34 #:use-module (guix build-system pyproject)
35 #:use-module (guix gexp)
36 #:use-module (guix download)
37 #:use-module (guix git-download)
38 #:use-module (guix packages))
39
40;;; Commentary:
41;;;
42;;; Python packages to build... Python packages. Since they are bound to be
43;;; relied on by many, their dependencies should be kept minimal, and this
44;;; module should not depend on other modules containing Python packages.
45;;;
46;;; Code:
47
48
49;;; These are dependencies used by the build systems contained herein; they
50;;; feel a bit out of place but are kept here to prevent circular module
51;;; dependencies.
52(define-public python-pathspec
53 (package
54 (name "python-pathspec")
55 (version "0.11.1")
56 (source
57 (origin
58 (method url-fetch)
59 (uri (pypi-uri "pathspec" version))
60 (sha256
61 (base32
62 "11qnlcanr1mqcpqpq1hmnwrs26csbsa2bafc7biq09x91y0dx617"))))
63 (build-system python-build-system)
64 (home-page "https://github.com/cpburnz/python-pathspec")
65 (synopsis "Utility library for gitignore style pattern matching of file paths")
66 (description
67 "This package provides a utility library for gitignore style pattern
68matching of file paths.")
69 (license license:mpl2.0)))
70
71(define-public python-pluggy
72 (package
73 (name "python-pluggy")
74 (version "1.0.0")
75 (source
76 (origin
77 (method url-fetch)
78 (uri (pypi-uri "pluggy" version))
79 (sha256
80 (base32
81 "0n8iadlas2z1b4h0fc73b043c7iwfvx9rgvqm1azjmffmhxkf922"))))
82 (build-system python-build-system)
83 (native-inputs (list python-setuptools-scm))
84 (synopsis "Plugin and hook calling mechanism for Python")
85 (description "Pluggy is an extraction of the plugin manager as used by
86Pytest but stripped of Pytest specific details.")
87 (home-page "https://pypi.org/project/pluggy/")
88 (license license:expat)))
89
90(define-public python-toml
91 (package
92 (name "python-toml")
93 (version "0.10.2")
94 (source
95 (origin
96 (method url-fetch)
97 (uri (pypi-uri "toml" version))
98 (sha256
99 (base32 "13z6rff86bzdpl094x0vmfvls779931xj90dlbs9kpfm138s3gdk"))))
100 (build-system python-build-system)
101 (arguments
102 `(#:tests? #f)) ;no tests suite in release
103 (home-page "https://github.com/uiri/toml")
104 (synopsis "Library for TOML")
105 (description
106 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
107Language (TOML) configuration files.")
108 (license license:expat)))
109
110(define-public python-tomli-w
111 (package
112 (name "python-tomli-w")
113 (version "1.0.0")
114 (source
115 (origin
116 (method url-fetch)
117 (uri (pypi-uri "tomli_w" version))
118 (sha256
119 (base32 "1fg13bfq5qy1ym4x77815nhxh1xpfs0drhn9r9464cz00m1l6qzl"))))
120 (build-system pyproject-build-system)
121 (arguments (list #:tests? #f)) ;to avoid extra dependencies
122 (native-inputs (list python-pypa-build python-flit-core))
123 (home-page "https://github.com/hukkin/tomli-w")
124 (synopsis "Minimal TOML writer")
125 (description "Tomli-W is a Python library for writing TOML. It is a
126write-only counterpart to Tomli, which is a read-only TOML parser.")
127 (license license:expat)))
128
129(define-public python-pytoml
130 (package
131 (name "python-pytoml")
132 (version "0.1.21")
133 (source
134 (origin
135 (method url-fetch)
136 (uri (pypi-uri "pytoml" version))
137 (sha256
138 (base32
139 "1rv1byiw82k7mj6aprcrqi2vdabs801y97xhfnrz7kxds34ggv4f"))))
140 (build-system python-build-system)
141 (home-page "https://github.com/avakar/pytoml")
142 (synopsis "Parser for TOML")
143 (description "This package provides a Python parser for TOML-0.4.0.")
144 (license license:expat)))
145
146(define-public python-six-bootstrap
147 (package
148 (name "python-six-bootstrap")
149 (version "1.16.0")
150 (source
151 (origin
152 (method url-fetch)
153 (uri (pypi-uri "six" version))
154 (sha256
155 (base32
156 "09n9qih9rpj95q3r4a40li7hk6swma11syvgwdc68qm1fxsc6q8y"))))
157 (build-system python-build-system)
158 (arguments `(#:tests? #f)) ;to avoid pytest dependency
159 (home-page "https://pypi.org/project/six/")
160 (synopsis "Python 2 and 3 compatibility utilities")
161 (description
162 "Six is a Python 2 and 3 compatibility library. It provides utility
163functions for smoothing over the differences between the Python versions with
164the goal of writing Python code that is compatible on both Python versions.
165Six supports every Python version since 2.5. It is contained in only one
166Python file, so it can be easily copied into your project.")
167 (license license:x11)))
168
169(define-public python-tomli
170 (package
171 (name "python-tomli")
172 (version "2.0.1")
173 (source
174 (origin
175 (method url-fetch)
176 (uri (pypi-uri "tomli" version))
177 (sha256
178 (base32 "0kwazq3i18rphcr8gak4fgzdcj5w5bbn4k4j2l6ma32gj496qlny"))))
179 (build-system pyproject-build-system)
180 (arguments
181 `(#:tests? #f ;disabled to avoid extra dependencies
182 #:phases
183 (modify-phases %standard-phases
184 (add-before 'build 'add-self-to-path
185 (lambda _
186 ;; The build system of tomli requires... tomli.
187 (setenv "PYTHONPATH" "src"))))))
188 (native-inputs (list python-flit-core-bootstrap python-six-bootstrap))
189 (home-page "https://github.com/hukkin/tomli")
190 (synopsis "Small and fast TOML parser")
191 (description "Tomli is a minimal TOML parser that is fully compatible with
192@url{https://toml.io/en/v1.0.0,TOML v1.0.0}. It is about 2.4 times as fast as
193@code{python-toml}.")
194 (license license:expat)))
195
196(define-public python-trove-classifiers
197 (package
198 (name "python-trove-classifiers")
199 (version "2023.3.9")
200 (source (origin
201 (method url-fetch)
202 (uri (pypi-uri "trove-classifiers" version))
203 (sha256
204 (base32
205 "00xvldq94dy0zxz40idbbx40smrkfvq75r26ywszxg6lq7wg4hpf"))))
206 (build-system pyproject-build-system)
207 (arguments (list #:build-backend "setuptools.build_meta"
208 #:tests? #f)) ;keep dependencies to a minimum
209 (native-inputs (list python-wheel))
210 (home-page "https://github.com/pypa/trove-classifiers")
211 (synopsis "Canonical source for classifiers on PyPI")
212 (description "This package is the canonical source for classifiers use on
213PyPI (pypi.org).")
214 (license license:asl2.0)))
215
216(define-public python-typing-extensions
217 (package
218 (name "python-typing-extensions")
219 (version "4.5.0")
220 (source (origin
221 (method url-fetch)
222 (uri (pypi-uri "typing_extensions" version))
223 (sha256
224 (base32
225 "1jx7ki3sji60v7h2805b2phq9ynsvshj5xiygdh9kmirj6kz9daw"))))
226 (build-system pyproject-build-system)
227 ;; Disable the test suite to keep the dependencies to a minimum. Also,
228 ;; the test suite requires Python's test module, not available in Guix.
229 (arguments (list #:tests? #f))
230 (native-inputs (list python-flit-core))
231 (home-page "https://github.com/python/typing_extensions")
232 (synopsis "Experimental type hints for Python")
233 (description
234 "The typing_extensions module contains additional @code{typing} hints not
235yet present in the of the @code{typing} standard library.
236Included are implementations of:
237@enumerate
238@item ClassVar
239@item ContextManager
240@item Counter
241@item DefaultDict
242@item Deque
243@item NewType
244@item NoReturn
245@item overload
246@item Protocol
247@item runtime
248@item Text
249@item Type
250@item TYPE_CHECKING
251@item AsyncGenerator
252@end enumerate\n")
253 (license license:psfl)))
254
255
256;;;
257;;; Python builder packages.
258;;;
259(define-public python-pip
260 (package
261 (name "python-pip")
262 (version "23.1")
263 (source
264 (origin
265 (method url-fetch)
266 (uri (pypi-uri "pip" version))
267 (sha256
268 (base32
269 "0jnk639v9h7ghslm4jnlic6rj3v29nygflx1hgxxndg5gs4kk1a0"))))
270 (build-system python-build-system)
271 (arguments
272 '(#:tests? #f)) ; there are no tests in the pypi archive.
273 (home-page "https://pip.pypa.io/")
274 (synopsis "Package manager for Python software")
275 (description
276 "Pip is a package manager for Python software, that finds packages on the
277Python Package Index (PyPI).")
278 (license license:expat)))
279
280(define-public python-setuptools
281 (package
282 (name "python-setuptools")
283 (version "67.6.1")
284 (source
285 (origin
286 (method url-fetch)
287 (uri (pypi-uri "setuptools" version))
288 (sha256
289 (base32
290 "16myxkpa89r045il88zcygdy1zbi2mvvpz5b4a70p9jhklmfjz95"))
291 (modules '((guix build utils)))
292 (snippet
293 ;; TODO: setuptools now bundles the following libraries:
294 ;; packaging, pyparsing, six and appdirs. How to unbundle?
295 ;; Remove included binaries which are used to build self-extracting
296 ;; installers for Windows.
297 '(for-each delete-file (find-files "setuptools"
298 "^(cli|gui).*\\.exe$")))))
299 (build-system python-build-system)
300 ;; FIXME: Tests require pytest, which itself relies on setuptools.
301 ;; One could bootstrap with an internal untested setuptools.
302 (arguments (list #:tests? #f))
303 (home-page "https://pypi.org/project/setuptools/")
304 (synopsis "Library designed to facilitate packaging Python projects")
305 (description "Setuptools is a fully-featured, stable library designed to
306facilitate packaging Python projects, where packaging includes:
307@itemize
308@item Python package and module definitions
309@item distribution package metadata
310@item test hooks
311@item project installation
312@item platform-specific details.
313@end itemize")
314 (license (list license:psfl ;setuptools itself
315 license:expat ;six, appdirs, pyparsing
316 license:asl2.0 ;packaging is dual ASL2/BSD-2
317 license:bsd-2))))
318
319;; This is the last version with use_2to3 support.
320(define-public python-setuptools-57
321 (package
322 (inherit python-setuptools)
323 (version "57.5.0")
324 (source (origin
325 (inherit (package-source python-setuptools))
326 (uri (pypi-uri "setuptools" version))
327 (sha256
328 (base32
329 "091sp8lrin7qllrhhx7y0iiv5gdb1d3l8a1ip5knk77ma1njdlyr"))))))
330
331(define-public python-wheel
332 (package
333 (name "python-wheel")
334 (version "0.40.0")
335 (source
336 (origin
337 (method url-fetch)
338 (uri (pypi-uri "wheel" version))
339 (sha256
340 (base32
341 "0ww8fgkvwv35ypj4cnngczdwp6agr4qifvk2inb32azfzbrrc4fd"))))
342 (build-system python-build-system)
343 (arguments
344 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
345 ;; fails to find the newly-built bdist_wheel library, even though it is
346 ;; available on PYTHONPATH. What search path is consulted by setup.py?
347 '(#:tests? #f))
348 (home-page "https://github.com/pypa/wheel")
349 (synopsis "Format for built Python packages")
350 (description
351 "A wheel is a ZIP-format archive with a specially formatted filename and
352the @code{.whl} extension. It is designed to contain all the files for a PEP
353376 compatible install in a way that is very close to the on-disk format. Many
354packages will be properly installed with only the @code{Unpack} step and the
355unpacked archive preserves enough information to @code{Spread} (copy data and
356scripts to their final locations) at any later time. Wheel files can be
357installed with a newer @code{pip} or with wheel's own command line utility.")
358 (license license:expat)))
359
360;;; TODO: Deprecate with https://github.com/pypa/pyproject-hooks.
361(define-public python-pep517-bootstrap
362 (hidden-package
363 (package
364 (name "python-pep517-bootstrap")
365 (version "0.9.1")
366 (source
367 (origin
368 (method url-fetch)
369 (uri (pypi-uri "pep517" version))
370 (sha256
371 (base32
372 "0zqidxah03qpnp6zkg3zd1kmd5f79hhdsfmlc0cldaniy80qddxf"))))
373 (build-system python-build-system)
374 (arguments
375 `(#:tests? #f)) ;to avoid circular dependencies
376 (propagated-inputs
377 (list python-toml python-wheel))
378 (home-page "https://github.com/pypa/pep517")
379 (synopsis "Wrappers to build Python packages using PEP 517 hooks")
380 (description
381 "Wrappers to build Python packages using PEP 517 hooks.")
382 (license license:expat))))
383
384(define-public python-pyparsing
385 (package
386 (name "python-pyparsing")
387 (version "3.0.6")
388 (source
389 (origin
390 (method url-fetch)
391 (uri (pypi-uri "pyparsing" version))
392 (sha256
393 (base32 "109b9r802wb472hgmxclljprh5cid0w3p6mk9alba7pg2c0frgfr"))))
394 (build-system python-build-system)
395 (outputs '("out" "doc"))
396 (arguments
397 `(#:tests? #f ;no test target
398 #:phases
399 (modify-phases %standard-phases
400 (add-after 'install 'install-doc
401 (lambda* (#:key outputs #:allow-other-keys)
402 (let* ((doc (string-append (assoc-ref outputs "doc")
403 "/share/doc/" ,name "-" ,version))
404 (html-doc (string-append doc "/html"))
405 (examples (string-append doc "/examples")))
406 (mkdir-p html-doc)
407 (mkdir-p examples)
408 (for-each
409 (lambda (dir tgt)
410 (map (lambda (file)
411 (install-file file tgt))
412 (find-files dir ".*")))
413 (list "docs" "htmldoc" "examples")
414 (list doc html-doc examples))))))))
415 (home-page "https://github.com/pyparsing/pyparsing")
416 (synopsis "Python parsing class library")
417 (description
418 "The pyparsing module is an alternative approach to creating and
419executing simple grammars, vs. the traditional lex/yacc approach, or the use
420of regular expressions. The pyparsing module provides a library of classes
421that client code uses to construct the grammar directly in Python code.")
422 (license license:expat)))
423
424;;; This is the last release compatible with Python 2.
425(define-public python-pyparsing-2.4.7
426 (package
427 (inherit python-pyparsing)
428 (version "2.4.7")
429 (source
430 (origin
431 (method url-fetch)
432 (uri (pypi-uri "pyparsing" version))
433 (sha256
434 (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))))
435
436(define-public python-packaging-bootstrap
437 (package
438 (name "python-packaging-bootstrap")
439 (version "21.3")
440 (source
441 (origin
442 (method url-fetch)
443 (uri (pypi-uri "packaging" version))
444 (sha256
445 (base32
446 "1sygirdrqgv4f1ckh9nhpcw1yfidrh3qjl86wq8vk6nq4wlw8iyx"))))
447 (build-system python-build-system)
448 (arguments `(#:tests? #f)) ;disabled to avoid extra dependencies
449 (propagated-inputs
450 (list python-pyparsing python-six-bootstrap))
451 (home-page "https://github.com/pypa/packaging")
452 (synopsis "Core utilities for Python packages")
453 (description "Packaging is a Python module for dealing with Python packages.
454It offers an interface for working with package versions, names, and dependency
455information.")
456 ;; From 'LICENSE': This software is made available under the terms of
457 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
458 ;; Contributions to this software is made under the terms of *both* these
459 ;; licenses.
460 (license (list license:asl2.0 license:bsd-2))))
461
462;;; The name 'python-pypa-build' is chosen rather than 'python-build' to avoid
463;;; a name clash with python-build from (guix build-system python).
464(define-public python-pypa-build
465 (package
466 (name "python-pypa-build")
467 (version "0.7.0")
468 (source (origin
469 (method url-fetch)
470 (uri (pypi-uri "build" version))
471 (sha256
472 (base32
473 "17xqija27x4my1yrnk6q2vwln60r39g2dhby9zg2l99qjgbdrahs"))))
474 (build-system python-build-system)
475 (arguments
476 `(#:tests? #f ;to tests in the PyPI release
477 #:phases (modify-phases %standard-phases
478 (add-after 'unpack 'use-toml-instead-of-tomli
479 ;; Using toml instead of tomli eases bootstrapping.
480 (lambda _
481 (substitute* "setup.cfg"
482 (("tomli>=.*")
483 "toml\n")))))))
484 (propagated-inputs
485 `(("python-packaging" ,python-packaging-bootstrap)
486 ("python-pep517", python-pep517-bootstrap)
487 ("python-toml" ,python-toml)))
488 (home-page "https://pypa-build.readthedocs.io/en/latest/")
489 (synopsis "Simple Python PEP 517 package builder")
490 (description "The @command{build} command invokes the PEP 517 hooks to
491build a distribution package. It is a simple build tool and does not perform
492any dependency management. It aims to keep dependencies to a minimum, in
493order to make bootstrapping easier.")
494 (license license:expat)))
495
496(define-public python-poetry-core
497 (package
498 (name "python-poetry-core")
499 (version "1.5.2")
500 (source
501 (origin
502 (method url-fetch)
503 (uri (pypi-uri "poetry_core" version))
504 (sha256
505 (base32 "053c8dw632p7jkhjb51k0wcx6hdw4r3lk97mds76df653qxnqmf6"))))
506 (build-system pyproject-build-system)
507 (arguments
508 `(#:tests? #f ;disabled to avoid extra dependencies
509 #:phases
510 (modify-phases %standard-phases
511 (add-before 'build 'add-self-to-path
512 (lambda _
513 ;; The build system requires itself.
514 (setenv "PYTHONPATH" "src"))))))
515 (home-page "https://github.com/python-poetry/poetry-core")
516 (synopsis "Poetry PEP 517 build back-end")
517 (description
518 "The @code{poetry-core} module provides a PEP 517 build back-end
519implementation developed for Poetry. This project is intended to be
520a light weight, fully compliant, self-contained package allowing PEP 517
521compatible build front-ends to build Poetry managed projects.")
522 (license license:expat)))
523
524;;; This package exists to bootstrap python-tomli.
525(define-public python-flit-core-bootstrap
526 (package
527 (name "python-flit-core-bootstrap")
528 (version "3.8.0")
529 (source
530 (origin
531 (method url-fetch)
532 (uri (pypi-uri "flit" version))
533 (sha256
534 (base32 "0dz9sp2zlhkmk6sm5gapbbb30f7xq3n3jn5zxx5pkp25ppsaiwnh"))))
535 (build-system python-build-system)
536 (propagated-inputs
537 (list python-toml))
538 (arguments
539 ;; flit-core has a test suite, but it requires Pytest. Disable it so
540 ;; as to not pull pytest as an input.
541 `(#:tests? #f
542 #:phases
543 (modify-phases %standard-phases
544 (replace 'build
545 ;; flit-core requires itself to build. Luckily, a
546 ;; bootstrapping script exists, which does so using just
547 ;; the checkout sources and Python.
548 (lambda _
549 (invoke "python" "flit_core/build_dists.py")))
550 (replace 'install
551 (lambda* (#:key inputs outputs #:allow-other-keys)
552 (let ((out (assoc-ref outputs "out"))
553 (whl (car (find-files "." "\\.whl$"))))
554 (invoke "pip" "--no-cache-dir" "--no-input"
555 "install" "--no-deps" "--prefix" out whl))))
556 ;; The sanity-check phase fails because flit depends on tomli at
557 ;; run-time, but this core variant avoids it to avoid a cycle.
558 (delete 'sanity-check))))
559 (home-page "https://github.com/pypa/flit")
560 (synopsis "Core package of the Flit Python build system")
561 (description "This package provides @code{flit-core}, a PEP 517 build
562backend for packages using Flit. The only public interface is the API
563specified by PEP 517, @code{flit_core.buildapi}.")
564 (license license:bsd-3)))
565
566(define-public python-flit-core
567 (package/inherit python-flit-core-bootstrap
568 (name "python-flit-core")
569 (propagated-inputs
570 (modify-inputs (package-propagated-inputs python-flit-core-bootstrap)
571 (replace "python-toml" python-tomli)))))
572
573(define-public python-flit-scm
574 (package
575 (name "python-flit-scm")
576 (version "1.7.0")
577 (source (origin
578 (method url-fetch)
579 (uri (pypi-uri "flit_scm" version))
580 (sha256
581 (base32
582 "1ckbkykfr7f7wzjzgh0gm7h6v3pqzx2l28rw6dsvl6zk4kxxc6wn"))))
583 (build-system pyproject-build-system)
584 (arguments (list #:tests? #f ;to avoid extra dependencies
585 ;; flit-scm wants to use flit-core, which it renames to
586 ;; 'buildapi', but that isn't found even when adding the
587 ;; current directory to PYTHONPATH. Use setuptools'
588 ;; builder instead.
589 #:build-backend "setuptools.build_meta"))
590 (propagated-inputs (list python-flit-core python-setuptools-scm python-tomli))
591 (home-page "https://gitlab.com/WillDaSilva/flit_scm")
592 (synopsis "PEP 518 build backend combining flit_core and setuptools_scm")
593 (description "This package provides a PEP 518 build backend that uses
594@code{setuptools_scm} to generate a version file from your version control
595system, then @code{flit_core} to build the package.")
596 (license license:expat)))
597
598(define-public python-setuptools-scm
599 (package
600 (name "python-setuptools-scm")
601 (version "7.1.0")
602 (source (origin
603 (method url-fetch)
604 (uri (pypi-uri "setuptools_scm" version))
605 (sha256
606 (base32 "09wg4zg30ir1c2cvwqipaz3hwaxz503fgw5zdvaxgakilx2q6l3c"))))
607 (build-system python-build-system)
608 (arguments (list #:tests? #f)) ;avoid extra dependencies such as pytest
609 (propagated-inputs (list python-packaging-bootstrap python-tomli
610 python-typing-extensions))
611 (home-page "https://github.com/pypa/setuptools_scm/")
612 (synopsis "Manage Python package versions in SCM metadata")
613 (description
614 "Setuptools_scm handles managing your Python package versions in
615@dfn{software configuration management} (SCM) metadata instead of declaring
616them as the version argument or in a SCM managed file.")
617 (license license:expat)))
618
619(define-public python-editables
620 (package
621 (name "python-editables")
622 (version "0.3")
623 (source (origin
624 (method git-fetch)
625 (uri (git-reference
626 (url "https://github.com/pfmoore/editables")
627 (commit version)))
628 (file-name (git-file-name name version))
629 (sha256
630 (base32
631 "1gbfkgzmrmbd4ycshm09fr2wd4f1n9gq7s567jgkavhfkn7s2pn1"))))
632 (build-system python-build-system)
633 (home-page "https://github.com/pfmoore/editables")
634 (synopsis "Editable installations")
635 (description "This library supports the building of wheels which, when
636installed, will expose packages in a local directory on @code{sys.path} in
637``editable mode''. In other words, changes to the package source will be
638reflected in the package visible to Python, without needing a reinstall.")
639 (license license:expat)))
640
641(define-public python-hatchling
642 (package
643 (name "python-hatchling")
644 (version "1.14.0")
645 (source (origin
646 (method url-fetch)
647 (uri (pypi-uri "hatchling" version))
648 (sha256
649 (base32
650 "1nn5cyc9fgrbawz38drfkl2s588k2gn3yqdm2cldbx9zy0fsjbj6"))))
651 (build-system pyproject-build-system)
652 (arguments
653 (list #:tests? #f ;to keep dependencies to a minimum
654 #:phases #~(modify-phases %standard-phases
655 (add-before 'build 'add-src-to-path
656 ;; Hatchling uses itself to build itself.
657 (lambda _
658 (setenv "PYTHONPATH" "src"))))))
659 (propagated-inputs (list python-editables
660 python-packaging-bootstrap
661 python-pathspec
662 python-pluggy
663 python-tomli
664 python-trove-classifiers))
665 (home-page "https://hatch.pypa.io/latest/")
666 (synopsis "Modern, extensible Python build backend")
667 (description "Hatch is a modern, extensible Python project manager. It
668has features such as:
669@itemize
670@item Standardized build system with reproducible builds by default
671@item Robust environment management with support for custom scripts
672@item Easy publishing to PyPI or other indexes
673@item Version management
674@item Configurable project generation with sane defaults
675@item Responsive CLI, ~2-3x faster than equivalent tools.
676@end itemize")
677 (license license:expat)))
678
679(define-public python-hatch-fancy-pypi-readme
680 (package
681 (name "python-hatch-fancy-pypi-readme")
682 (version "22.8.0")
683 (source (origin
684 (method url-fetch)
685 (uri (pypi-uri "hatch_fancy_pypi_readme" version))
686 (sha256
687 (base32
688 "0sn2wsfbpsbf2mqhjvw62h1cfy5mz3d7iqyqvs5c20cnl0n2i4fs"))))
689 (build-system pyproject-build-system)
690 (arguments (list #:tests? #f)) ;avoid extra test dependencies
691 (propagated-inputs (list python-hatchling python-tomli
692 python-typing-extensions))
693 (home-page "https://github.com/hynek/hatch-fancy-pypi-readme")
694 (synopsis "Fancy PyPI READMEs with Hatch")
695 (description "This hatch plugin allows defining a project description in
696terms of concatenated fragments that are based on static strings, files and
697parts of files defined using cut-off points or regular expressions.")
698 (license license:expat)))
699
700(define-public python-hatch-vcs
701 (package
702 (name "python-hatch-vcs")
703 (version "0.3.0")
704 (source (origin
705 (method url-fetch)
706 (uri (pypi-uri "hatch_vcs" version))
707 (sha256
708 (base32
709 "1viz2mdfxfqpsd5f30410q6smj90qfxihvy9idzwd0p4ziy11iff"))))
710 (arguments (list #:tests? #f)) ;avoid extra test dependencies
711 (build-system pyproject-build-system)
712 (propagated-inputs (list python-hatchling python-setuptools-scm))
713 (home-page "https://github.com/ofek/hatch-vcs")
714 (synopsis "Hatch plugin for versioning with your preferred VCS")
715 (description "This package is a plugin for Hatch that uses your preferred
716version control system (like Git) to determine project versions.")
717 (license license:expat)))
718
719(define-public python-pdm-backend
720 (package
721 (name "python-pdm-backend")
722 (version "2.0.6")
723 (source (origin
724 (method url-fetch)
725 (uri (pypi-uri "pdm_backend" version))
726 (sha256
727 (base32
728 "06bq846yy33alxbljgcf4lx9g2mx4b2sv04i59rrn9rxapcg2651"))))
729 (build-system pyproject-build-system)
730 (arguments
731 (list
732 #:tests? #f ; Depends on pytest, which we cannot import into this module.
733 #:phases
734 #~(modify-phases %standard-phases
735 (add-after 'unpack 'set-pythonpath
736 (lambda _
737 (setenv "PYTHONPATH" (string-append (getcwd) "/src")))))))
738 (home-page "https://pdm-backend.fming.dev/")
739 (synopsis
740 "PEP 517 build backend for PDM")
741 (description
742 "PDM-Backend is a build backend that supports the latest packaging
743standards, which includes PEP 517, PEP 621 and PEP 660.")
744 (license license:expat)))
745