summaryrefslogtreecommitdiff
path: root/gnu/packages/python-build.scm
blob: 1040a25981bf497e3e809c6dc717e47e2a812b26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Cyril Roelandt <tipecaml@gmail.com>
;;; Copyright © 2015, 2024, 2025 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015, 2020, 2023, 2024 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
;;; Copyright © 2017 Danny Milosavljevic <dannym@scratchpost.org>
;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
;;; Copyright © 2017, 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2020, 2023 Marius Bakke <marius@gnu.org>
;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
;;; Copyright © 2021 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2018, 2021-2023, 2025 Maxim Cournoyer <maxim@guixotic.coop>
;;; Copyright © 2019 Vagrant Cascadian <vagrant@debian.org>
;;; Copyright © 2020, 2021, 2022, 2023 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2022 Garek Dyszel <garekdyszel@disroot.org>
;;; Copyright © 2022 Greg Hogan <code@greghogan.com>
;;; Copyright © 2024 Christopher Baines <mail@cbaines.net>
;;; Copyright © 2024 David Elsing <david.elsing@posteo.net>
;;; Copyright © 2024 Zheng Junjie <873216071@qq.com>
;;; Copyright © 2024 Antero Mejr <mail@antr.me>
;;; Copyright © 2024, 2025 Sharlatan Hellseher <sharlatanus@gmail.com>
;;; Copyright © 2025 Nicolas Graves <ngraves@ngraves.fr>
;;; Copyright © 2025 Nguyễn Gia Phong <cnx@loang.net>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu packages python-build)
  #:use-module (gnu packages)
  #:use-module (gnu packages bash)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system python)
  #:use-module (guix build-system pyproject)
  #:use-module (guix gexp)
  #:use-module (guix deprecation)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module (guix packages))

;;; Commentary:
;;;
;;; Python packages to build... Python packages.  Since they are bound to be
;;; relied on by many, their dependencies should be kept minimal, and this
;;; module should not depend on other modules containing Python packages.
;;;
;;; Code:


;;; These are dependencies used by the build systems contained herein; they
;;; feel a bit out of place but are kept here to prevent circular module
;;; dependencies.
(define-public python-autocommand
  (package
    (name "python-autocommand")
    (version "2.2.2")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "autocommand" version))
       (sha256
        (base32 "0d2zjms5xm236k46la5pnl7i7hs3a12jlp12cw8lk5jm7i1fk3c7"))))
    (build-system pyproject-build-system)
    (native-inputs
     (list python-pytest-bootstrap
           python-setuptools-bootstrap))
    (home-page "https://github.com/Lucretiel/autocommand")
    (synopsis "Python library to build a command-line from a function")
    (description "@code{autocommand} is library to automatically generate and
run simple @code{argparse} parsers from function signatures.")
    (license license:lgpl3+)))

(define-public python-backports-tarfile
  (package
    (name "python-backports-tarfile")
    (version "1.2.0")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "backports_tarfile" version))
       (sha256
        (base32 "14d9xibla5aahjqf9y0nmpk5vs4qds5rfy628j0invkld3104pnp"))))
    (build-system pyproject-build-system)
    (arguments
     (list #:tests? #f)) ;XXX: Cycles with python-jaraco-context
    (native-inputs
     (list python-setuptools-bootstrap
           python-setuptools-scm-bootstrap))
    (home-page "https://github.com/jaraco/backports.tarfile")
    (synopsis "Backport of CPython tarfile module")
    (description "This package provides a backport of CPython tarfile module.")
    (license license:expat)))

(define-public python-colorama
  (package
   (name "python-colorama")
   (version "0.4.6")
   (source
    (origin
     (method url-fetch)
     (uri (pypi-uri "colorama" version))
     (sha256
      (base32 "0i3fpq0w5mbfdpy3z9p5raw4fg17jxr6jwh5l8qhavpdnxf5ys88"))))
   (build-system pyproject-build-system)
   (native-inputs
    (list python-hatchling
          python-pytest-bootstrap))
   (home-page "https://pypi.org/project/colorama/")
   (synopsis "Colored terminal text rendering for Python")
   (description
    "Colorama is a Python library for rendering colored terminal text.")
   (license license:bsd-3)))

(define-public python-distlib
  (package
    (name "python-distlib")
    (version "0.3.7")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "distlib" version))
       (sha256
        (base32
         "1a27f5p93j9i1l3324qgahs3g8ai91fmx783jpyyla506i5ybbwx"))))
    (build-system pyproject-build-system)
    (arguments
     (list
      #:phases
      #~(modify-phases %standard-phases
          (add-before 'build 'no-/bin/sh
            (lambda* (#:key inputs #:allow-other-keys)
              (let ((/bin/sh (search-input-file inputs "bin/sh")))
                (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
                  (("/bin/sh") /bin/sh)))))
          (add-before 'check 'prepare-test-environment
            (lambda _
              (setenv "HOME" "/tmp")
              ;; NOTE: Any value works, the variable just has to be present.
              (setenv "SKIP_ONLINE" "1"))))))
    (native-inputs
     (list python-pytest-bootstrap
           python-setuptools-bootstrap))
    (inputs
     (list bash-minimal))
    (home-page "https://github.com/pypa/distlib")
    (synopsis "Distribution utilities")
    (description "Distlib is a library which implements low-level functions that
relate to packaging and distribution of Python software.  It is intended to be
used as the basis for third-party packaging tools.")
    (license license:psfl)))

(define-public python-more-itertools
  (package
    (name "python-more-itertools")
    (version "10.6.0")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "more-itertools" version))
       (sha256
        (base32
         "0fzfnfga0jdx217kff57lx3pam76162i0dd0nsgwqccw038zmmrc"))
       (snippet
        ;; distutils.errors.DistutilsOptionError: No configuration found for
        ;; dynamic 'description'. Some dynamic fields need to be specified via
        ;; `tool.setuptools.dynamic`others must be specified via the equivalent
        ;; attribute in `setup.py`.
        '(delete-file "setup.py"))))
    (build-system pyproject-build-system)
    (arguments
     (list
      #:phases
      #~(modify-phases %standard-phases
          (replace 'check
            (lambda* (#:key tests? #:allow-other-keys)
              (when tests?
                (invoke "python" "-m" "unittest")))))))
    (native-inputs
     (list python-flit-core))
    (home-page "https://github.com/erikrose/more-itertools")
    (synopsis "More routines for operating on iterables, beyond itertools")
    (description "Python's built-in @code{itertools} module implements a
number of iterator building blocks inspired by constructs from APL, Haskell,
and SML.  @code{more-itertools} includes additional building blocks for
working with iterables.")
    (license license:expat)))

(define-public python-path
  (package
    (name "python-path")
    (version "17.1.0")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "path" version))
       (sha256
        (base32 "1scqbwgcbisx8mb28hw789a7np953851wg6z0bbzdm519znha7nl"))))
    (build-system pyproject-build-system)
    (arguments
     (list
      #:tests? (not (%current-target-system))
      #:test-flags
      #~(list "-k"
              (string-append
               ;; Do not test the myproject.toml build as it tries
               ;; to pull dependencies from the Internet.
               "not project "
               ;; This tests assumes a root user exists.
               "and not test_get_owner"))))
    (native-inputs
     (list python-more-itertools
           python-packaging-bootstrap
           python-pygments-bootstrap
           python-pytest-bootstrap
           python-setuptools-bootstrap
           python-setuptools-scm-bootstrap))
    (home-page "https://github.com/jaraco/path")
    (synopsis "Object-oriented file system path manipulation library")
    (description "@code{path} (formerly @code{path.py}) implements path
objects as first-class entities, allowing common operations on files to be
invoked on those path objects directly.")
    (license license:expat)))

(define-public python-pathspec
  (package
    (name "python-pathspec")
    (version "0.12.1")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "pathspec" version))
       (sha256
        (base32 "04jpkzic8f58z6paq7f3f7fdnlv9l89khv3sqsqk7ax10caxb0m4"))))
    (build-system pyproject-build-system)
    (arguments (list #:test-backend #~'unittest))
    (native-inputs
     (list python-flit-core
           python-setuptools-bootstrap))
    (home-page "https://github.com/cpburnz/python-pathspec")
    (synopsis "Utility library for gitignore style pattern matching of file paths")
    (description
     "This package provides a utility library for gitignore style pattern
matching of file paths.")
    (license license:mpl2.0)))

(define-public python-platformdirs-bootstrap
  ;; Try to update simultaneously with the standard version in
  ;; (gnu packages python-build).
  (package
    (name "python-platformdirs-bootstrap")
    (version "4.3.6")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "platformdirs" version))
       (sha256
        (base32 "01xrwajkmxv3jp6n14y8jndkrhb48p9kxknkmwch8nw8pjnb4zrm"))))
    (build-system pyproject-build-system)
    (arguments (list #:tests? #f))      ; avoid introducing more dependencies.
    (native-inputs
     (list python-hatchling
           python-hatch-vcs
           python-pytest-bootstrap))
    (home-page "https://github.com/platformdirs/platformdirs")
    (synopsis "Determine the appropriate platform-specific directories")
    (description "When writing applications, finding the right location to
store user data and configuration varies per platform.  Even for
single-platform apps, there may by plenty of nuances in figuring out the right
location.  This small Python module determines the appropriate
platform-specific directories, e.g. the ``user data dir''.")
    (license license:expat)))

(define-public python-pluggy
  (package
    (name "python-pluggy")
    (version "1.6.0")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "pluggy" version))
       (sha256
        (base32 "1wr2vnbb7gy9wlz01yvb7rn4iqzd3mwmidk11ywk7395fq5i7k3x"))))
    (build-system pyproject-build-system)
    (native-inputs
     (list python-setuptools-bootstrap
           python-setuptools-scm
           python-wheel))
    (home-page "https://pypi.org/project/pluggy/")
    (synopsis "Plugin and hook calling mechanism for Python")
    (description
     "Pluggy is an extraction of the plugin manager as used by Pytest but
stripped of Pytest specific details.")
    (license license:expat)))

(define-public python-testpath
  (package
    (name "python-testpath")
    (version "0.6.0")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
              (url "https://github.com/jupyter/testpath")
              (commit version)))
       (file-name (git-file-name name version))
       (sha256
        (base32
         "0pib1xsvjwwyyhv0sqzxvgg814k83dmv1ppwfkkq9llkhr8k7s9y"))))
    (build-system pyproject-build-system)
    (native-inputs
     (list python-flit-core
           python-pytest-bootstrap))
    (home-page "https://github.com/jupyter/testpath")
    (synopsis "Test utilities for code working with files and commands")
    (description
     "Testpath is a collection of utilities for Python code working with files
and commands.  It contains functions to check things on the file system, and
tools for mocking system commands and recording calls to those.")
    (license license:expat)))

(define-public python-toml
  (package
    (name "python-toml")
    (version "0.10.2")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "toml" version))
       (sha256
        (base32 "13z6rff86bzdpl094x0vmfvls779931xj90dlbs9kpfm138s3gdk"))))
    (build-system pyproject-build-system)
    (arguments
     `(#:tests? #f))                     ;no tests suite in release
    (native-inputs
     (list python-setuptools-bootstrap))
    (home-page "https://github.com/uiri/toml")
    (synopsis "Library for TOML")
    (description
     "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
Language (TOML) configuration files.")
    (license license:expat)))

(define-public python-tomli-w
  (package
    (name "python-tomli-w")
    (version "1.2.0")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "tomli_w" version))
       (sha256
        (base32 "08ahw9db7qycd4fzh4j51cgzp1rdl7snm5scrplpphj7ban4zl9d"))))
    (build-system pyproject-build-system)
    (arguments (list #:tests? #f))      ;to avoid extra dependencies
    (native-inputs (list python-flit-core))
    (home-page "https://github.com/hukkin/tomli-w")
    (synopsis "Minimal TOML writer")
    (description "Tomli-W is a Python library for writing TOML.  It is a
write-only counterpart to Tomli, which is a read-only TOML parser.")
    (license license:expat)))

(define-public python-pygments
  (package
    (name "python-pygments")
    ;; XXX: When updating, drop python-textual 'relax-requirements phase.
    (version "2.19.1")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "pygments" version))
       (sha256
        (base32
         "07qm8mx3y5r8ri6zpn0hp9zx5g02bydhi7pkv54hdp3nhlm6vhb1"))))
    (build-system pyproject-build-system)
    (arguments
     (list
      #:test-flags
      ;; 4568 passed, 16 skipped, 597 deselected
      ;;
      ;; Ignore tests requiring "wcag_contrast_ratio"
      #~(list "--ignore=tests/contrast/test_contrasts.py"
              ;; Tests fail with not matched diff.
              "--ignore=tests/examplefiles/awk/test.awk"
              "--ignore=tests/examplefiles/bash/example.sh"
              "--ignore=tests/examplefiles/make/Makefile"
              "--ignore=tests/examplefiles/phix/example.exw"
              "--ignore=tests/examplefiles/sed/all_sorts_of_syntax.sed"
              "--ignore=tests/examplefiles/sed/count_words.sed"
              "--ignore=tests/examplefiles/sed/increment_number.sed"
              "--ignore=tests/examplefiles/sed/reverse.sed"
              "--ignore=tests/examplefiles/slurm/example.sl"
              ;; Assertion error to find example file by following symlink:
              ;; assert p.is_file(), f"Example file {p} not found"
              "--deselect=tests/test_basic_api.py::test_lexer_classes")))
    (native-inputs
     (list python-hatchling python-pytest-bootstrap))
    (home-page "https://pygments.org/")
    (synopsis "Syntax highlighting")
    (description
     "Pygments is a syntax highlighting package written in Python.")
    (license license:bsd-2)))

(define-public python-pygments-bootstrap
   (package/inherit python-pygments
     (name "python-pygments-bootstrap")
     (native-inputs
      (list python-hatchling))
     (arguments `(#:tests? #f))))

(define-public python-pytest-bootstrap
  (package
    (name "python-pytest-bootstrap")
    (version "9.0.2")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "pytest" version))
       (sha256
        (base32 "04fz1vbhb2l6k8lmrk8wqhkxhprlnkq21z6rs48rdn1bm58nc63m"))))
    (build-system pyproject-build-system)
    (arguments (list #:tests? #f))
    (native-inputs
     (list python-setuptools-bootstrap
           python-setuptools-scm-bootstrap))
    (propagated-inputs
     (list python-iniconfig
           python-packaging-bootstrap
           python-pluggy
           python-pygments-bootstrap))  ;it is in installation dependencies
    (home-page "https://docs.pytest.org/en/latest/")
    (synopsis "Python testing library")
    (description
     "Pytest is a testing tool that provides auto-discovery of test modules
and functions, detailed info on failing assert statements, modular fixtures,
and many external plugins.")
    (license license:expat)))

(define-public python-pytoml
  (package
    (name "python-pytoml")
    (version "0.1.21")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "pytoml" version))
       (sha256
        (base32 "1rv1byiw82k7mj6aprcrqi2vdabs801y97xhfnrz7kxds34ggv4f"))))
    (build-system pyproject-build-system)
    (arguments `(#:tests? #f))          ;to avoid pytest dependency
    (native-inputs
     (list python-setuptools))
    (home-page "https://github.com/avakar/pytoml")
    (synopsis "Parser for TOML")
    (description "This package provides a Python parser for TOML-0.4.0.")
    (license license:expat)))

(define-public python-tomli
  (package
    (name "python-tomli")
    (version "2.2.1")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "tomli" version))
       (sha256
        (base32 "1zq58p2bplyf0xpi9fnyn4w6vc1fkw8whkj0yxhcwdf8g7ff2ifd"))))
    (build-system pyproject-build-system)
    (arguments
     `(#:tests? #f))                      ;disabled to avoid extra dependencies
    (native-inputs (list python-flit-core-bootstrap))
    (home-page "https://github.com/hukkin/tomli")
    (synopsis "Small and fast TOML parser")
    (description "Tomli is a minimal TOML parser that is fully compatible with
@url{https://toml.io/en/v1.0.0,TOML v1.0.0}.  It is about 2.4 times as fast as
@code{python-toml}.")
    (license license:expat)))

(define-public python-trove-classifiers
  (package
    (name "python-trove-classifiers")
    (version "2025.5.9.12")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "trove_classifiers" version))
       (sha256
        (base32 "1dawkrcc353rz1h4mazw25vkbhics5lpqrwc8qad6b3flykwi9vw"))))
    (build-system pyproject-build-system)
    (arguments
     (list #:build-backend "setuptools.build_meta"
           #:tests? #f))      ;keep dependencies to a minimum
    (native-inputs (list python-setuptools-bootstrap))
    (home-page "https://github.com/pypa/trove-classifiers")
    (synopsis "Canonical source for classifiers on PyPI")
    (description "This package is the canonical source for classifiers use on
PyPI (pypi.org).")
    (license license:asl2.0)))

(define-public python-typeguard
  (package
    (name "python-typeguard")
    (version "4.4.4")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "typeguard" version))
       (sha256
        (base32 "0x2zkskia5lb1838ys0bhpp9v6y80jkhchzdz874spbhzggx4zrs"))))
    (build-system pyproject-build-system)
    (arguments
     (list
      #:test-flags #~(list "--ignore-glob=tests/mypy/*.py")))
    (native-inputs
     (list python-pytest-bootstrap
           python-setuptools-bootstrap
           python-setuptools-scm-bootstrap))
    (propagated-inputs
     (list python-typing-extensions))
    (home-page "https://github.com/agronholm/typeguard")
    (synopsis "Run-time type checker for Python")
    (description
     "@code{typeguard} provides run-time type checking for functions defined
with PEP 484 argument (and return) type annotations.")
    (license license:expat)))

(define-public python-typing-extensions
  (package
    (name "python-typing-extensions")
    (version "4.15.0")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "typing_extensions" version))
       (sha256
        (base32 "0rhlhs28jndgp9fghdhidn6g7xiwx8vvihxbxhlgl4ncfg8lishc"))))
    (build-system pyproject-build-system)
    ;; Disable the test suite to keep the dependencies to a minimum.  Also,
    ;; the test suite requires Python's test module, not available in Guix.
    (arguments (list #:tests? #f))
    (native-inputs (list python-flit-core))
    (home-page "https://github.com/python/typing_extensions")
    (synopsis "Experimental type hints for Python")
    (description
     "The typing_extensions module contains additional @code{typing} hints not
yet present in the of the @code{typing} standard library.
Included are implementations of:
@enumerate
@item ClassVar
@item ContextManager
@item Counter
@item DefaultDict
@item Deque
@item NewType
@item NoReturn
@item overload
@item Protocol
@item runtime
@item Text
@item Type
@item TYPE_CHECKING
@item AsyncGenerator
@end enumerate\n")
    (license license:psfl)))


;;;
;;; Python builder packages.
;;;
(define-public python-pbr
  (package
    (name "python-pbr")
    (version "7.0.1")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "pbr" version))
       (sha256
        (base32 "0mvy1z1dyl28w0brns1vdhc98hzbn5b3fsw1xj41amdqs88wpjry"))))
    (build-system pyproject-build-system)
    (arguments
     `(#:tests? #f)) ;; Most tests seem to use the Internet.
    ;; Message from upstream:
    ;;
    ;; DO NOT add any other dependencies as PBR is meant to be minimalist to
    ;; avoid problems with bootstrapping build environments.
    ;;
    ;; See: <https://opendev.org/openstack/pbr/src/tag/7.0.1/requirements.txt>.
    (propagated-inputs
     (list python-setuptools))
    (home-page "https://docs.openstack.org/pbr/latest/")
    (synopsis "Enhance the default behavior of Python’s setuptools")
    (description
     "Python Build Reasonableness (PBR) is a library that injects some useful
and sensible default behaviors into your setuptools run.  It will set
versions, process requirements files and generate AUTHORS and ChangeLog file
from git information.")
    (license license:asl2.0)))

(define-public python-pip
  (package
    (name "python-pip")
    (version "25.1.1")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "pip" version))
       (sha256
        (base32
         "0xwhrng91a48zb5qmb6vagbjr6kzvbc8b08nq9a5139h3m0mvr1x"))
       (snippet
        #~(begin
            (delete-file "src/pip/_vendor/certifi/cacert.pem")
            (delete-file "src/pip/_vendor/certifi/core.py")
            (with-output-to-file "src/pip/_vendor/certifi/core.py"
              (lambda _
                (display "\"\"\"
certifi.py
~~~~~~~~~~
This file is a Guix-specific version of core.py.

This module returns the installation location of SSL_CERT_FILE or
/etc/ssl/certs/ca-certificates.crt, or its contents.
\"\"\"
import os

_CA_CERTS = None

try:
    _CA_CERTS = os.environ [\"SSL_CERT_FILE\"]
except:
    _CA_CERTS = os.path.join(\"/etc\", \"ssl\", \"certs\", \"ca-certificates.crt\")

def where() -> str:
    return _CA_CERTS

def contents() -> str:
    with open(where(), \"r\", encoding=\"ascii\") as data:
        return data.read()")))))))
    (build-system pyproject-build-system)
    (arguments
     '(#:tests? #f))          ; there are no tests in the pypi archive.
    (native-inputs
     (list python-setuptools-bootstrap))
    (home-page "https://pip.pypa.io/")
    (synopsis "Package manager for Python software")
    (description
     "Pip is a package manager for Python software, that finds packages on the
Python Package Index (PyPI).")
    (license license:expat)))

(define-public python-setuptools
  (package
    (name "python-setuptools")
    ;; When updating python-setuptools, also check in the bundled sources
    ;; the versions of some native-inputs if some new tests fail.
    (version "80.9.0")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "setuptools" version))
       (sha256
        (base32 "175iixi2h2jz8y2bpwziak360hvv43jfhipwzbdniryd5r04fszk"))
       (modules '((guix build utils)))
       (snippet
        #~(begin
            ;; Remove included binaries which are used to build self-extracting
            ;; installers for Windows.
            (for-each delete-file (find-files "setuptools"
                                              "^(cli|gui).*\\.exe$"))))))
    (build-system pyproject-build-system)
    (arguments
     (list
      #:test-flags
      #~(list
         ;; Avoid additional dependencies
         "--ignore=setuptools/tests/config/test_apply_pyprojecttoml.py"
         "--ignore=setuptools/tests/config/test_pyprojecttoml.py"
         "--ignore=setuptools/tests/test_namespaces.py" ;nss-certs-for-test
         "--ignore=tools"
         ;; These tests try to access the network.
         "-m" "not uses_network"
         "-k" (string-join
               (list "not test_dist_fetch_build_egg" ; network
                     ;; Those scripts are unbundled in the snippet above.
                     "test_wheel_includes_cli_scripts"
                     ;; Despite PRE_BUILT_SETUPTOOLS_WHEEL below,
                     ;; this test uses our unbundled setuptools and fails
                     ;; to find jaraco.functools.
                     "test_no_missing_dependencies"
                     ;; XXX: We have pytest in the path, probably
                     ;; because of the setenv "PYTHONPATH" below.
                     "test_ignore_errors"
                     ;; XXX: Unclear why this one fails.
                     "test_basic")
               " and not "))
      #:phases
      #~(modify-phases %standard-phases
          ;; Build a first wheel bundled for tests.
          (add-before 'build 'build-bundled-wheel-for-tests
            (assoc-ref %standard-phases 'build))
          (add-after 'build-bundled-wheel-for-tests 'cleanup
            (lambda _
              (let ((wheel (string-append "setuptools-" #$version
                                          "-py3-none-any.whl")))
                (for-each
                 (lambda (file)
                   (rename-file file wheel))
                 (find-files "dist" "\\.whl$")))
              (for-each delete-file-recursively
                        '("build" "dist" "setuptools/_vendor"))))  ; unbundle
          (add-before 'check 'configure-tests
            (lambda* (#:key outputs #:allow-other-keys)
              (setenv "HOME" (getcwd))
              ;; FIXME python-pytest still relies a bit on PYTHONPATH.
              (setenv "PYTHONPATH" (getenv "GUIX_PYTHONPATH"))
              ;; Inject our pre-built bundled wheel for tests.
              (setenv "PRE_BUILT_SETUPTOOLS_WHEEL"
                      (string-append (getcwd) "/setuptools-"
                                     #$version "-py3-none-any.whl"))))
          ;; Platformdirs is a bit tedious to properly bootstrap and
          ;; propagate, and is used in a single place that will be dropped
          ;; soon, we might as well drop it now.
          (add-before 'compile-bytecode 'drop-platformdirs-requirement
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (with-directory-excursion (site-packages inputs outputs)
                (substitute* "pkg_resources/__init__.py"
                  (("^from platformdirs import.*")
                   "")
                  (("_user_cache_dir\\(appname='Python-Eggs'\\)")
                   "f\"{os.environ.get('XDG_CACHE_HOME')}/Python-Eggs\""))
                (substitute* (string-append "setuptools-" #$version
                                            ".dist-info/METADATA")
                  (("Requires-Dist: platformdirs.*") "")))))
          (add-after 'check 'cleanup-installed-tests
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let ((site (site-packages inputs outputs)))
                (with-directory-excursion site
                  (for-each
                   delete-file-recursively
                   (find-files "."
                               (lambda (file stat)
                                 (and (string= (basename file) "tests")
                                      (eq? 'directory
                                           (stat:type stat))))
                               #:directories? #t)))
                (substitute* (find-files site "RECORD")
                  ((".*/tests/.*") ""))))))))
    (propagated-inputs
     ;; See either bundled inputs or METADATA extra == "core"
     (list python-jaraco-functools
           python-jaraco-text
           python-more-itertools
           python-packaging
           python-wheel))
    (native-inputs
     (list python-autocommand
           python-backports-tarfile
           python-filelock-bootstrap
           python-inflect
           python-jaraco-collections
           python-jaraco-context
           python-jaraco-envs-bootstrap
           python-jaraco-functools
           python-jaraco-path
           python-jaraco-test
           python-jaraco-text
           python-more-itertools
           python-packaging
           python-path
           python-platformdirs-bootstrap
           python-pip
           python-pypa-build
           python-pytest-bootstrap
           python-tomli
           python-typing-extensions
           python-typeguard
           python-wheel))
    (home-page "https://pypi.org/project/setuptools/")
    (synopsis "Library designed to facilitate packaging Python projects")
    (description "Setuptools is a fully-featured, stable library designed to
facilitate packaging Python projects, where packaging includes:
@itemize
@item Python package and module definitions
@item distribution package metadata
@item test hooks
@item project installation
@item platform-specific details.
@end itemize")
    (license (list license:psfl         ;setuptools itself
                   license:expat        ;six, appdirs, pyparsing
                   license:asl2.0       ;packaging is dual ASL2/BSD-2
                   license:bsd-2))))

(define-public python-setuptools-bootstrap
  (package/inherit python-setuptools
    (name "python-setuptools-bootstrap")
    ;; version and source are purposefully not inherited, to allow
    ;; updating python-setuptools in the python-team scope, whereas
    ;; python-setuptools-bootstrap is in the core-packages-team scope.
    (version "80.9.0")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "setuptools" version))
       (sha256
        (base32 "175iixi2h2jz8y2bpwziak360hvv43jfhipwzbdniryd5r04fszk"))
       (modules '((guix build utils)))
       (snippet
        ;; TODO: setuptools now bundles the following libraries:
        ;; packaging, pyparsing, six and appdirs.  How to unbundle?
        ;; Remove included binaries which are used to build self-extracting
        ;; installers for Windows.
        '(for-each delete-file (find-files "setuptools"
                                           "^(cli|gui).*\\.exe$")))))
    (build-system gnu-build-system)
    (arguments
     (list
      #:tests? #f                       ;disabled to avoid extra dependencies
      ;; Essentially a lighter copy of the former python-build-system.
      ;; Using it rather than pyproject-build-system allows to edit the latter
      ;; without a world rebuild (for the meson package in particular).
      #:phases
      #~(modify-phases %standard-phases
          (delete 'bootstrap)
          (delete 'configure)
          (replace 'build
            (lambda _
              (invoke "python" "./setup.py" "build")))
          (replace 'install
            (lambda _
              (invoke "python" "./setup.py" "install"
                      (string-append "--prefix=" #$output) "--no-compile")
              (invoke "python" "-m" "compileall"
                      "--invalidation-mode=unchecked-hash" #$output)))
          ;; XXX: Despite using the same setup.py, it seems that the
          ;; bootstrap version is not able to install the distutils hack.
          (add-after 'install 'fix-installation
            (lambda* (#:key outputs #:allow-other-keys)
              (with-directory-excursion
                  (car (find-files #$output "site-packages"
                                   #:directories? #t))
                (call-with-output-file "distutils-precedence.pth"
                  (lambda (port)
                    (display
                     (string-join
                      '("import os"
                        "var = 'SETUPTOOLS_USE_DISTUTILS'"
                        "enabled = os.environ.get(var, 'local') == 'local'"
                        "enabled and __import__('_distutils_hack').add_shim();")
                      "; ")
                     port)))))))))
    (native-inputs (list))
    ;; Avoid introducing an additional module-dependency.
    (inputs (list (module-ref (resolve-interface '(gnu packages python))
                              'python-wrapper)))
    (propagated-inputs (list))))

(define-public python-wheel
  (package
    (name "python-wheel")
    (version "0.46.1")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "wheel" version))
        (sha256
         (base32 "0f3abrpkf3spv0lk5mhv8m2ch0j074a3rivn7hfxzxx0bpxpwizx"))))
    (build-system pyproject-build-system)
    (arguments
     ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
     ;; fails to find the newly-built bdist_wheel library, even though it is
     ;; available on PYTHONPATH.  What search path is consulted by setup.py?
     '(#:tests? #f))
    (native-inputs
     (list python-flit-core))
    (home-page "https://github.com/pypa/wheel")
    (synopsis "Format for built Python packages")
    (description
     "A wheel is a ZIP-format archive with a specially formatted filename and
the @code{.whl} extension.  It is designed to contain all the files for a PEP
376 compatible install in a way that is very close to the on-disk format.  Many
packages will be properly installed with only the @code{Unpack} step and the
unpacked archive preserves enough information to @code{Spread} (copy data and
scripts to their final locations) at any later time.  Wheel files can be
installed with a newer @code{pip} or with wheel's own command line utility.")
    (license license:expat)))

(define-public python-wheel-0.40
  (package
    (inherit python-wheel)
    (version "0.40.0")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "wheel" version))
        (sha256
         (base32 "0ww8fgkvwv35ypj4cnngczdwp6agr4qifvk2inb32azfzbrrc4fd"))))))

(define-public python-pyparsing
  (package
    (name "python-pyparsing")
    (version "3.2.3")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "pyparsing" version))
       (sha256
        (base32 "1giqgjknzbbh34qf8ij5rsrqlxfysjx39xi85vvl5ddkp0d3zhdr"))))
    (build-system pyproject-build-system)
    (outputs '("out" "doc"))
    (arguments
     `(#:tests? #f                      ;no test target
       #:phases
       (modify-phases %standard-phases
         (add-after 'install 'install-doc
           (lambda* (#:key outputs #:allow-other-keys)
             (let* ((doc (string-append (assoc-ref outputs "doc")
                                        "/share/doc/" ,name "-" ,version))
                    (html-doc (string-append doc "/html"))
                    (examples (string-append doc "/examples")))
               (mkdir-p html-doc)
               (mkdir-p examples)
               (for-each
                (lambda (dir tgt)
                  (map (lambda (file)
                         (install-file file tgt))
                       (find-files dir ".*")))
                (list "docs" "htmldoc" "examples")
                (list doc html-doc examples))))))))
    (native-inputs (list python-flit-core))
    (home-page "https://github.com/pyparsing/pyparsing")
    (synopsis "Python parsing class library")
    (description
     "The pyparsing module is an alternative approach to creating and
executing simple grammars, vs. the traditional lex/yacc approach, or the use
of regular expressions.  The pyparsing module provides a library of classes
that client code uses to construct the grammar directly in Python code.")
    (license license:expat)))

(define-public python-packaging
  (package
    (name "python-packaging")
    (version "25.0")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "packaging" version))
       (sha256
        (base32 "0kzwn2ar4ndm90qrvgyjcbkqz3klrg0ziwm1yrhbyxynk0n8fhyl"))))
    (build-system pyproject-build-system)
    (native-inputs
     (list python-flit-core
           python-pretend
           python-pytest-bootstrap))
    (propagated-inputs (list python-pyparsing python-six))
    (home-page "https://github.com/pypa/packaging")
    (synopsis "Core utilities for Python packages")
    (description "Packaging is a Python module for dealing with Python packages.
     It offers an interface for working with package versions, names, and dependency
     information.")
    ;; From 'LICENSE': This software is made available under the terms of
    ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
    ;; Contributions to this software is made under the terms of *both* these
    ;; licenses.
    (license (list license:asl2.0 license:bsd-2))))

(define-public python-packaging-bootstrap
  (package/inherit python-packaging
    (name "python-packaging-bootstrap")
    (arguments
     ;; XXX: disabled to avoid extra dependencies
     (list
      #:tests? #f))
    (native-inputs (list python-flit-core))
    (propagated-inputs '())))

(define-public python-pretend
  (package
    (name "python-pretend")
    (version "1.0.9")
    (source
     (origin
       (method git-fetch)       ;no tests in PyPI archive
       (uri (git-reference
              (url "https://github.com/alex/pretend")
              (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "156l685r9mg7i4xyrk9ql3sxk088irxlg8x7md5i0d05hdw1z8rs"))))
    (build-system pyproject-build-system)
    (native-inputs
     (list python-packaging-bootstrap
           python-pytest-bootstrap
           python-setuptools-bootstrap))
    (home-page "https://github.com/alex/pretend")
    (synopsis "Library for stubbing in Python")
    (description
     "Pretend is a library to make stubbing with Python easier.  Stubbing is a
technique for writing tests.  You may hear the term mixed up with mocks,fakes,
or doubles.  Basically, a stub is an object that returns pre-canned responses,
rather than doing any computation.")
    (license license:bsd-3)))

(define-public python-pyproject-hooks
  (package
    (name "python-pyproject-hooks")
    (version "1.2.0")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "pyproject_hooks" version))
       (sha256
        (base32 "1y511nblr0lslz1d5s46844f5raryjnp3n1dci499bhgqkarp18y"))))
    (build-system pyproject-build-system)
    (native-inputs
     (list python-flit-core
           python-pytest-bootstrap
           python-testpath))
    (home-page "https://github.com/pypa/pyproject-hooks")
    (synopsis "Low-level library for calling @file{pyproject.toml} backends")
    (description
     "@code{pyproject-hooks} is a low-level library for calling build backends
in @file{pyproject.toml}-based projects.  It provides basic functionality to
write tooling that generates distribution files from Python projects.")
    (license license:expat)))

;;; The name 'python-pypa-build' is chosen rather than 'python-build' to avoid
;;; a name clash with python-build from (guix build-system python).
(define-public python-pypa-build
  (package
    (name "python-pypa-build")
    ;; Newer version needs more inputs, consider to move to python-xyz.
    (version "1.3.0")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "build" version))
       (sha256
        (base32 "15xk0w71x8v1c8by049rdwh74mhkl3rj3v9sym8fkgbhl87dv3k9"))))
    (build-system pyproject-build-system)
    (arguments `(#:tests? #f))         ;disabled to avoid extra dependencies
    (native-inputs
     (list python-flit-core))
    (propagated-inputs
     (list python-colorama
           python-packaging
           python-pyproject-hooks
           python-tomli))
    (home-page "https://pypa-build.readthedocs.io/en/latest/")
    (synopsis "Simple Python PEP 517 package builder")
    (description "The @command{build} command invokes the PEP 517 hooks to
build a distribution package.  It is a simple build tool and does not perform
any dependency management.  It aims to keep dependencies to a minimum, in
order to make bootstrapping easier.")
    (license license:expat)))

(define-public python-poetry-core
  (package
    (name "python-poetry-core")
    (version "2.1.3")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "poetry_core" version))
       (sha256
        (base32 "194nwaig8zkbj2ig4zwf1k7cl4vqlmvs8mmdkb425mky8was08h5"))))
    (build-system pyproject-build-system)
    (arguments
     `(#:tests? #f))                      ;disabled to avoid extra dependencies
    (home-page "https://github.com/python-poetry/poetry-core")
    (synopsis "Poetry PEP 517 build back-end")
    (description
     "The @code{poetry-core} module provides a PEP 517 build back-end
implementation developed for Poetry.  This project is intended to be
a light weight, fully compliant, self-contained package allowing PEP 517
compatible build front-ends to build Poetry managed projects.")
    (license license:expat)))

(define-public python-filelock-bootstrap
  ;; Try to update simultaneously with the standard version in
  ;; (gnu packages python-build).
  (package
    (name "python-filelock-bootstrap")
    (version "3.16.1")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "filelock" version))
       (sha256
        (base32
         "0d8ljvmsfgriiqf5dqii91gfcpj7cpjrh8fnsvifaiyvspygnjf2"))))
    (build-system pyproject-build-system)
    (arguments (list #:tests? #f))      ; avoid extra dependencies.
    (native-inputs
     (list python-hatch-vcs-bootstrap
           python-hatchling
           python-setuptools-scm-bootstrap))
    (home-page "https://github.com/tox-dev/py-filelock")
    (synopsis "Platform independent file lock")
    (description "@code{filelock} contains a single module implementing
a platform independent file lock in Python, which provides a simple way of
inter-process communication.")
    (license license:unlicense)))

;;; This package exists to bootstrap python-tomli.
(define-public python-flit-core-bootstrap
  (package
    (name "python-flit-core-bootstrap")
    (version "3.12.0")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "flit" version))
       (sha256
        (base32 "0h1pxi2hgr95321bgl45l86693zl14l3shj0idsyg4k9v56z700w"))))
    (build-system pyproject-build-system)
    (arguments
     (list
      ;; flit-core has a test suite, but it requires Pytest.  Disable it so
      ;; as to not pull pytest as an input.
      #:tests? #f
      #:phases
      #~(modify-phases %standard-phases
          (add-after 'unpack 'fix-license
            ;; flit_core bundles the 'tomli' TOML parser, to avoid a
            ;; bootstrapping problem. See
            ;; <https://github.com/pypa/packaging-problems/issues/342>.
            (lambda _
              (delete-file-recursively "flit_core/flit_core/vendor")
              (substitute* "flit_core/pyproject.toml"
                (("license-files.*") "license-files = [\"LICENSE*\"]\n"))))
          (replace 'build
            ;; flit-core requires itself to build.  Luckily, a
            ;; bootstrapping script exists, which does so using just
            ;; the checkout sources and Python.
            (lambda _
              (chdir "flit_core")
              (invoke "python" "build_dists.py")))
          (delete 'sanity-check))))
    (propagated-inputs
     (list python-toml))
    (home-page "https://github.com/pypa/flit")
    (synopsis "Core package of the Flit Python build system")
    (description "This package provides @code{flit-core}, a PEP 517 build
backend for packages using Flit.  The only public interface is the API
specified by PEP 517, @code{flit_core.buildapi}.")
    (license license:bsd-3)))

(define-public python-flit-core
  (package/inherit python-flit-core-bootstrap
    (name "python-flit-core")
    (propagated-inputs
     (modify-inputs propagated-inputs
       (delete "python-toml")
       (prepend python-tomli)))))

(define-public python-setuptools-scm
  (package
    (name "python-setuptools-scm")
    (version "8.3.1")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "setuptools_scm" version))
       (sha256
        (base32 "0qra4jysbdwlrwsb5iz8kai1xxbsz6adzbrbscvx1b2xny95wm9x"))))
    (build-system pyproject-build-system)
    (arguments
     (list
      #:tests? #f    ;avoid extra dependencies such as pytest
      ;; pyproject-build-system will error handle forms such as
      ;; "module:object", so we set it.
      #:build-backend "setuptools.build_meta"))
    (propagated-inputs
     (list python-packaging-bootstrap
           python-setuptools-bootstrap))
    (home-page "https://github.com/pypa/setuptools_scm/")
    (synopsis "Manage Python package versions in SCM metadata")
    (description
     "Setuptools_scm handles managing your Python package versions in
@dfn{software configuration management} (SCM) metadata instead of declaring
them as the version argument or in a SCM managed file.")
    (license license:expat)))

(define-public python-setuptools-scm-bootstrap
  (package/inherit python-setuptools-scm
    (name "python-setuptools-scm-bootstrap")
    (build-system pyproject-build-system)
    (arguments
     (list
      #:tests? #f    ;avoid extra dependencies such as pytest
      ;; pyproject-build-system will error handle forms such as
      ;; "module:object", so we set it.
      #:build-backend "setuptools.build_meta"))
    (native-inputs
     (list python-packaging-bootstrap))
    (propagated-inputs
     (list python-setuptools-bootstrap))))

(define-public python-setuptools-scm-next
  (package
    (inherit python-setuptools-scm)
    (name "python-setuptools-scm")
    (version "9.2.2")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "setuptools_scm" version))
       (sha256
        (base32 "0mzgyyg1cgigkmlfm0iy44f2092zn8xc093ygn4a11jncss4lrqw"))))))

(define-public python-six
  (package
    (name "python-six")
    (version "1.17.0")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "six" version))
       (sha256
        (base32 "109ajcsfhrz33lbwbb337w34crc3lb9rjnxrcpnbczlf8rfk6w7z"))))
    (build-system pyproject-build-system)
    (native-inputs
     (list python-pytest-bootstrap
           python-setuptools-bootstrap))
    (home-page "https://pypi.org/project/six/")
    (synopsis "Python 2 and 3 compatibility utilities")
    (description
     "Six is a Python 2 and 3 compatibility library.  It provides utility
functions for smoothing over the differences between the Python versions with
the goal of writing Python code that is compatible on both Python versions.
Six supports every Python version since 2.5.  It is contained in only one
Python file, so it can be easily copied into your project.")
    (license license:x11)))

;; XXX: Deprecated on <2026-01-23>.
(define-deprecated/public-alias python-six-bootstrap python-six)

(define-public python-editables
  (package
    (name "python-editables")
    (version "0.5")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/pfmoore/editables")
                    (commit version)))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "1bp959fz987jvrnkilhyr41fw4g00g9jfyiwmfvy96hv1yl68w8b"))))
    (build-system pyproject-build-system)
    (arguments (list #:tests? #f))    ;avoid extra dependencies such as pytest
    (native-inputs
     (list python-flit-core))
    (home-page "https://github.com/pfmoore/editables")
    (synopsis "Editable installations")
    (description "This library supports the building of wheels which, when
installed, will expose packages in a local directory on @code{sys.path} in
``editable mode''.  In other words, changes to the package source will be
reflected in the package visible to Python, without needing a reinstall.")
    (license license:expat)))

(define-public python-hatchling
  (package
    (name "python-hatchling")
    (version "1.27.0")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "hatchling" version))
       (sha256
        (base32 "1mhzjhg7ky8npcrnbwwq30w8s73mm73m5z0j260v7aqrk1njj74p"))))
    (build-system pyproject-build-system)
    (arguments
     (list #:tests? #f))                  ;to keep dependencies to a minimum
    (propagated-inputs
     (list python-packaging-bootstrap
           python-pathspec
           python-pluggy
           python-tomli
           python-trove-classifiers))
    (home-page "https://hatch.pypa.io/latest/")
    (synopsis "Modern, extensible Python build backend")
    (description "Hatch is a modern, extensible Python project manager.  It
has features such as:
@itemize
@item Standardized build system with reproducible builds by default
@item Robust environment management with support for custom scripts
@item Easy publishing to PyPI or other indexes
@item Version management
@item Configurable project generation with sane defaults
@item Responsive CLI, ~2-3x faster than equivalent tools.
@end itemize")
    (license license:expat)))

(define-public python-hatchling-bootstrap
  (package/inherit python-hatchling
    (name "python-hatchling-bootstrap")
    (propagated-inputs
     (modify-inputs propagated-inputs
       (replace "python-packaging" python-packaging-bootstrap)))))

(define-public python-hatchling-for-hatch
  ;; For hatch@1.9.7, remove when no longer required.
  (hidden-package
   (package
     (inherit python-hatchling)
     (version "1.21.1")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "hatchling" version))
        (sha256
         (base32 "1g40g68vzfakddd9f0psp9jkfqy3v3la4zs5g127ski2792l195v"))))
    (propagated-inputs
     (list python-editables
           python-packaging-bootstrap
           python-pathspec
           python-pluggy
           python-trove-classifiers)))))

(define-public python-hatch-docstring-description
  (package
    (name "python-hatch-docstring-description")
    (version "1.1.1")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "hatch_docstring_description" version))
       (sha256
        (base32 "1qwa8m4yswn0bkc5xzq30xsaca578axl5ig2r6mkcdxsfg196pdi"))))
    (build-system pyproject-build-system)
    (arguments (list #:tests? #f))      ;avoid extra test dependencies
    (native-inputs
     (list python-hatch-vcs
           python-hatchling))
    (propagated-inputs
     (list python-hatchling))
    (home-page "https://github.com/flying-sheep/hatch-docstring-description")
    (synopsis "Derive PyPI package description from Python package docstring ")
    (description
     "This package provides a Hatchling plugin to read the description from the
package docstring.")
    (license license:gpl3+)))

(define-public python-hatch-fancy-pypi-readme
  (package
    (name "python-hatch-fancy-pypi-readme")
    (version "25.1.0")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "hatch_fancy_pypi_readme" version))
       (sha256
        (base32 "0i803kq80qx0k1lj3z69zw40ynqxml4p1qsc851izmchzwyysn4w"))))
    (build-system pyproject-build-system)
    (arguments (list #:tests? #f))      ;avoid extra test dependencies
    (propagated-inputs (list python-hatchling python-tomli))
    (home-page "https://github.com/hynek/hatch-fancy-pypi-readme")
    (synopsis "Fancy PyPI READMEs with Hatch")
    (description "This hatch plugin allows defining a project description in
terms of concatenated fragments that are based on static strings, files and
parts of files defined using cut-off points or regular expressions.")
    (license license:expat)))

(define-public python-hatch-requirements-txt
  (package
    (name "python-hatch-requirements-txt")
    (version "0.4.1")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "hatch_requirements_txt" version))
       (sha256
        (base32 "083xakilrmy0ymh34s9wm8x8s7s8vn7ij33xz9avn1gxb1bnws1c"))))
    (build-system pyproject-build-system)
    (arguments (list #:tests? #f))      ;avoid extra test dependencies
    (propagated-inputs (list python-hatchling python-packaging-bootstrap))
    (home-page "https://github.com/repo-helper/hatch-requirements-txt")
    (synopsis "Hatchling plugin to read requirements.txt")
    (description
     "This package implements a functionality to read project dependencies
from requirements.txt.")
    (license license:expat)))

(define-public python-hatch-vcs
  (package
    (name "python-hatch-vcs")
    (version "0.5.0")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "hatch_vcs" version))
       (sha256
        (base32 "1yczh2aqrf9p3gs1dayswz5pp9z2yhmlld0c14ah4d20d49gm583"))))
    (arguments (list #:tests? #f))      ;avoid extra test dependencies
    (build-system pyproject-build-system)
    (propagated-inputs (list python-hatchling python-setuptools-scm))
    (home-page "https://github.com/ofek/hatch-vcs")
    (synopsis "Hatch plugin for versioning with your preferred VCS")
    (description "This package is a plugin for Hatch that uses your preferred
version control system (like Git) to determine project versions.")
    (license license:expat)))

(define-public python-hatch-vcs-bootstrap
  (package/inherit python-hatch-vcs
    (name "python-hatch-vcs-bootstrap")
    (native-inputs
     (list python-packaging-bootstrap))
    (propagated-inputs
     (list python-hatchling-bootstrap
           python-setuptools-scm-bootstrap))))

(define-public python-inflect
  (package
    (name "python-inflect")
    (version "7.5.0")
    (source (origin
              (method url-fetch)
              (uri (pypi-uri "inflect" version))
              (sha256
               (base32
                "07spmlkmskwhxc0j5j4ms3w0f6pyv3h8iqwcbahdabklqc0riwgs"))))
    (build-system pyproject-build-system)
    (native-inputs
     (list python-pygments
           python-pytest-bootstrap
           python-setuptools-bootstrap
           python-setuptools-scm-bootstrap))
    (propagated-inputs
     (list python-more-itertools
           python-typeguard
           python-typing-extensions))
    (home-page "https://github.com/jaraco/inflect")
    (synopsis "Correctly generate plurals, singular nouns, ordinals, indefinite articles")
    (description
     "This Python module lets you correctly generate plurals, singular nouns,
ordinals, indefinite articles; it also can convert numbers to words.")
    (license license:expat)))

(define-public python-iniconfig
  (package
    (name "python-iniconfig")
    (version "2.1.0")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "iniconfig" version))
       (sha256
        (base32 "1iz1fg3n6pv4q8jzv1q0izl5001diwqggizrg3p3ywrn1gix5frs"))))
    (build-system pyproject-build-system)
    (arguments (list #:tests? #f))      ;no tests in PyPI, tests introduce cycle with pytest
    (native-inputs
     (list python-hatch-vcs-bootstrap
           python-hatchling-bootstrap))
    (home-page "https://github.com/RonnyPfannschmidt/iniconfig")
    (synopsis "Simple INI-file parser")
    (description "The @code{iniconfig} package provides a small and simple
     INI-file parser module having a unique set of features ; @code{iniconfig}
     @itemize
     @item maintains the order of sections and entries              ;
     @item supports multi-line values with or without line-continuations ;
     @item supports \"#\" comments everywhere                            ;
     @item raises errors with proper line-numbers                        ;
     @item raises an error when two sections have the same name.
     @end itemize")
    (license license:expat)))

(define-public python-installer
  (package
    (name "python-installer")
    (version "0.7.0")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "installer" version))
       (sha256
        (base32 "0cdnqh3a3amw8k4s1pzfjh0hpvzw4pczgl702s1b16r82qqkwvd2"))))
    (build-system pyproject-build-system)
    (arguments (list #:tests? #f))      ;avoid extra test dependencies
    (native-inputs
     (list python-flit-core))
    (home-page "https://installer.rtfd.io/")
    (synopsis "Installer library for Python wheels")
    (description
     "This package provides a low-level library for installing a Python
package from a wheel distribution.  It provides basic functionality and
abstractions for handling wheels and installing packages from wheels.")
    (license license:expat)))

;; Both packages have been merged into a single one.
(define-deprecated-package python-pypa-installer
  python-installer)

(define-public python-jaraco-classes
  (package
    (name "python-jaraco-classes")
    (version "3.4.0")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "jaraco.classes" version))
       (sha256
        (base32 "1k9s7wxhsy15730qab8bry7kpgl4yk3wch45ikfw0f823nsj9827"))))
    (build-system pyproject-build-system)
    (arguments
     (list  ; Do not test the myproject.toml build as it pulls dependencies.
      #:test-flags '(list "-k" "not project")))
    (native-inputs
     (list python-pytest-bootstrap
           python-setuptools-bootstrap))
    (propagated-inputs
     (list python-more-itertools))
    (home-page "https://github.com/jaraco/jaraco.classes")
    (synopsis "Utility functions for Python class constructs")
    (description "This Python library contains utility functions for Python
class constructs.")
    (license license:expat)))

(define-public python-jaraco-collections
  (package
    (name "python-jaraco-collections")
    (version "5.2.1")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "jaraco_collections" version))
       (sha256
        (base32 "1v8qza70spm4d822bm7wq3j2cyd33nqg2i87n99spw6np9q1kf6s"))))
    (build-system pyproject-build-system)
    ;; Do not test pyproject.toml with python-pytest-checkdocs as it tries to
    ;; download dependencies.
    (arguments
     '(#:test-flags '("-k" "not project")))
    (native-inputs
     (list python-pytest-bootstrap
           python-setuptools-bootstrap
           python-setuptools-scm-bootstrap))
    (propagated-inputs
     (list python-jaraco-text))
    (home-page "https://github.com/jaraco/jaraco.collections")
    (synopsis "Provides various collection objects")
    (description
     "This package provides models and classes to supplement the
standard library @code{collections} module.  Examples include
@itemize
@item
RangeMap: A mapping that accepts a range of values for keys.
@item
Projection: A subset over an existing mapping.
@item
KeyTransformingDict: Generalized mapping with keys transformed by a function.
@item
FoldedCaseKeyedDict: A dict whose string keys are case-insensitive.
@item
BijectiveMap: A map where keys map to values and values back to their keys.
@item
ItemsAsAttributes: A mapping mix-in exposing items as attributes.
@item
IdentityOverrideMap: A map whose keys map by default to themselves unless overridden.
@item
FrozenDict: A hashable, immutable map.
@item
Enumeration: An object whose keys are enumerated.
@item
Everything: A container that contains all things.
@item
Least, Greatest: Objects that are always less than or greater than any other.
@item
pop_all: Return all items from the mutable sequence and remove them from that sequence.
@item
DictStack: A stack of dicts, great for sharing scopes.
@item
WeightedLookup: A specialized RangeMap for selecting an item by weights.
@end itemize")
    (license license:expat)))

(define-public python-jaraco-context
  (package
    (name "python-jaraco-context")
    (version "6.0.1")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "jaraco_context" version))
       (sha256
        (base32 "1cyija3n4481r1ykxdx342m07lrfyg4ygbn0in9i82yganjlxblv"))))
    (build-system pyproject-build-system)
    (arguments
     (list #:tests? #f))        ;no tests in PyPI archive and Git checkout
    (native-inputs
     (list python-setuptools-bootstrap
           python-setuptools-scm-bootstrap))
    (propagated-inputs
     (list python-backports-tarfile))
    (home-page "https://github.com/jaraco/jaraco.context")
    (synopsis "Context managers Python library")
    (description
     "This Python library provides context managers-related procedures.")
    (license license:expat)))

(define-public python-jaraco-envs-bootstrap
  (package
    (name "python-jaraco-envs-bootstrap")
    (version "2.6.0")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "jaraco.envs" version))
       (sha256
        (base32 "1xb00gfhhhvh44wqq5yqb5bxi79nd97vzvh1xrbb43b40v29b4c0"))))
    (build-system pyproject-build-system)
    (arguments
     (list                              ; avoid extra dependencies.
      #:tests? #f
      #:phases
      #~(modify-phases %standard-phases
          (delete 'sanity-check))))
    (propagated-inputs
     (list python-path
           python-virtualenv-bootstrap))
    (native-inputs
     (list python-setuptools-bootstrap
           python-setuptools-scm-bootstrap))
    (home-page "https://github.com/jaraco/jaraco.envs")
    (synopsis "Classes for orchestrating Python (virtual) environments")
    (description
     "This package provides classes for orchestrating Python (virtual)
environments.")
    (license license:expat)))

(define-public python-jaraco-functools
  (package
    (name "python-jaraco-functools")
    (version "4.2.1")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "jaraco_functools" version))
       (sha256
        (base32 "0lvk12qbl5zd1ikr6xzflj1jcs3vwgmwgy2k63x5dkmbrjzllqxy"))))
    (build-system pyproject-build-system)
    (arguments
     (list #:tests? (not (%current-target-system))
           ;; Do not test the myproject.toml build as it pulls dependencies.
           ;; Do not run a test that tries to emulate a broken proprietary
           ;; CI set-up, fails to do so correctly, and then throws an error.
           #:test-flags
           '(list "-k" "not project and not test_function_throttled")))
    (native-inputs
     (list python-jaraco-classes
           python-pytest-bootstrap
           python-setuptools-bootstrap
           python-setuptools-scm-bootstrap))
    (propagated-inputs (list python-more-itertools))
    (home-page "https://github.com/jaraco/jaraco.functools")
    (synopsis "Python library extending Python's @code{functools}")
    (description "This library extends the standard @code{functools} Python
module with a few extra procedures.")
    (license license:expat)))

(define-public python-jaraco-path
  (package
    (name "python-jaraco-path")
    (version "3.7.2")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/jaraco/jaraco.path")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "12bj9za1yp0yn0ppya6a4kwgmh7hvmw64x7ivp4y0sbv20r0vfdq"))))
    (build-system pyproject-build-system)
    (native-inputs
     (list python-pytest-bootstrap
           python-setuptools-bootstrap
           python-setuptools-scm-bootstrap))
    (home-page "https://github.com/jaraco/jaraco.path")
    (synopsis "Miscellaneous path functions")
    (description
     "This package provides miscellaneous path functions for Python.")
    (license license:expat)))

(define-public python-jaraco-test
  (package
    (name "python-jaraco-test")
    (version "5.5.1")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "jaraco_test" version))
       (sha256
        (base32 "0xfkly5w4i4npi4pq1g32y8q8iijkq4pfcfs8wcjhfn4amj6212c"))))
    (build-system pyproject-build-system)
    (arguments
     (list #:test-flags '(list "-k" "http")))
    (native-inputs
     (list python-pytest-bootstrap
           python-setuptools-bootstrap))
    (propagated-inputs
     (list python-jaraco-collections
           python-jaraco-context
           python-jaraco-functools))
    (home-page "https://github.com/jaraco/jaraco.test")
    (synopsis "Testing support by jaraco")
    (description "This package provides testing support by jaraco.")
    (license license:expat)))

(define-public python-jaraco-text
  (package
    (name "python-jaraco-text")
    (version "4.0.0")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "jaraco_text" version))
       (sha256
        (base32 "1c0dy5jvhigcyryi2h8n1m87dnhyxr7w01n9shwzkdlslv7gwwav"))))
    (build-system pyproject-build-system)
    ;; Do not test pyproject.toml with python-pytest-checkdocs as it tries to
    ;; download dependencies.
    (arguments
     '(#:test-flags '("-k" "not project")))
    (native-inputs
     (list python-pytest-bootstrap
           python-setuptools-bootstrap
           python-setuptools-scm-bootstrap))
    (propagated-inputs
     (list python-autocommand
           python-inflect
           python-jaraco-context
           python-jaraco-functools
           python-more-itertools))
    (home-page "https://github.com/jaraco/jaraco.text")
    (synopsis "Provides various routines for text manipulation")
    (description
     "This package provides handy routines for dealing with text,
such as wrapping, substitution, trimming, stripping, prefix and suffix
removal, line continuation, indentation, comment processing, identifier
processing, values parsing, case insensitive comparison, and more.")
    (license license:expat)))

(define-public python-pdm-backend
  (package
    (name "python-pdm-backend")
    (version "2.4.5")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "pdm_backend" version))
       (sha256
        (base32 "0nzyfa4jb0cpfhh0jfqsk4xz8rbyfyxqrh2ps3axm2ih8321kh2n"))))
    (build-system pyproject-build-system)
    (arguments
     (list
      #:tests? #f)) ; Depends on pytest, which we cannot import into this module.
    (home-page "https://pdm-backend.fming.dev/")
    (synopsis "PEP 517 build backend for PDM")
    (description
     "PDM-Backend is a build backend that supports the latest packaging
standards, which includes PEP 517, PEP 621 and PEP 660.")
    (license license:expat)))

(define-public python-virtualenv-bootstrap
  (package
    (name "python-virtualenv-bootstrap")
    (version "20.29.1")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "virtualenv" version))
       (sha256
        (base32
         "0dfwnn8i1y33kgxhi4xyhsj4yr5vsin7zf9c343bcbyk700rgf5q"))))
    (build-system pyproject-build-system)
    (arguments (list #:tests? #f))      ; avoid extra dependencies.
    (native-inputs
     (list python-hatch-vcs-bootstrap
           python-hatchling
           python-setuptools-bootstrap))
    (propagated-inputs
     (list python-distlib
           python-filelock-bootstrap
           python-platformdirs-bootstrap))
    (home-page "https://virtualenv.pypa.io/")
    (synopsis "Virtual Python environment builder")
    (description
     "Virtualenv is a tool to create isolated Python environments.")
    (license license:expat)))