@@ -359,16 +359,16 @@ unless otherwise specified for the same reason.
359
359
purpose.
360
360
361
361
362
- ``packages.simple-repo-package -url ``
362
+ ``packages.index -url ``
363
363
------------------------------------
364
364
365
365
- Optional (although mutually exclusive with
366
- ``packages.files.simple-repo-package -url ``)
366
+ ``packages.files.index -url ``)
367
367
- String
368
- - Stores the `project detail `_ URL from the `Simple Repository API `_.
368
+ - Stores the `project index `_ URL from the `Simple Repository API `_.
369
369
- Useful for generating Packaging URLs (aka PURLs).
370
370
- When possible, lockers SHOULD include this or
371
- ``packages.files.simple-repo-package -url `` to assist with generating
371
+ ``packages.files.index -url `` to assist with generating
372
372
`software bill of materials `_ (aka SBOMs).
373
373
374
374
@@ -464,29 +464,38 @@ unless otherwise specified for the same reason.
464
464
package, regardless of version.
465
465
466
466
467
- ``packages.files.simple-repo-package -url ``
467
+ ``packages.files.index -url ``
468
468
''''''''''''''''''''''''''''''''''''''''''
469
469
470
470
- Optional (although mutually exclusive with
471
- ``packages.simple-repo-package -url ``)
471
+ ``packages.index -url ``)
472
472
- String
473
- - The value has the same meaning as ``packages.simple-repo-package -url ``.
473
+ - The value has the same meaning as ``packages.index -url ``.
474
474
- This key is available per-file to support :pep: `708 ` when some files override
475
475
what's provided by another `Simple Repository API `_ index.
476
476
477
477
478
- ``packages.files.origin ``
479
- '''''''''''''''''''''''''
478
+ ``packages.files.url ``
479
+ ''''''''''''''''''''''
480
480
481
- - Optional
481
+ - Optional (and mutually exclusive with `` packages.path ``)
482
482
- String
483
- - URI where the file was found when the lock file was generated.
484
- - If the URI is a relative file path, it is considered relative to the lock
485
- file.
483
+ - URL where the file was found when the lock file was generated.
486
484
- Useful for documenting where the file was originally found and potentially
487
485
where to look for the file if it is not already downloaded/available.
488
- - Installers MUST NOT assume the URI will always work, but installers MAY use
489
- the URI if it happens to work.
486
+ - Installers MUST NOT assume the URL will always work, but installers MAY use
487
+ the URL if it happens to work.
488
+
489
+
490
+ ``packages.path ``
491
+ '''''''''''''''''
492
+
493
+ - Optional (and mutually exclusive with ``packages.path ``)
494
+ - String
495
+ - File system path to where the file was found when the lock file was generated.
496
+ - Path may be relative to the lock file's location or absolute.
497
+ - Installers MUST NOT assume the path will always work, but installers MAY use
498
+ the path if it happens to work.
490
499
491
500
492
501
``packages.files.hash ``
@@ -518,11 +527,22 @@ unless otherwise specified for the same reason.
518
527
of the direct URL data structure.
519
528
520
529
521
- ``packages.vcs.origin ``
530
+ ``packages.vcs.url ``
522
531
'''''''''''''''''''''''
523
532
533
+ - Mutually exclusive with ``packages.vcs.path ``
524
534
- String
525
- - The URI of where the repository was located when the lock file was generated.
535
+ - The URL of where the repository was located when the lock file was generated.
536
+
537
+
538
+ ``packages.vcs.path ``
539
+ '''''''''''''''''''''
540
+
541
+ - Mutually exclusive with ``packages.vcs.url ``
542
+ - String
543
+ - The file system path where the repository was located when the lock file was
544
+ generated.
545
+ - The path may be relative to the lock file or absolute.
526
546
527
547
528
548
``packages.vcs.commit ``
@@ -573,27 +593,6 @@ unless otherwise specified for the same reason.
573
593
install.
574
594
575
595
576
- ``[[packages.build-requires]] ``
577
- -------------------------------
578
-
579
- - Optional
580
- - An array of tables whose structure matches that of ``[[packages]] ``.
581
- - Each entry represents a package and version to use when building the
582
- enclosing package and version.
583
- - The array is complete/locked like ``[[packages]] `` itself (i.e. installers
584
- follow the same installation procedure for ``[[packages.build-requires]] `` as
585
- ``[[packages]] ``)
586
- - Selection of which entries to use for an environment as the same as
587
- ``[[packages]] `` itself, albeit only applying when installing the build
588
- back-end and its dependencies.
589
- - This helps with reproducibility of the building of a package by recording
590
- either what was or would have been used if the locker needed to build the
591
- packages.
592
- - If the installer and user choose to install from source and this array is
593
- missing then the installer MAY choose to resolve what to install for building
594
- at install time, otherwise the installer MUST raise an error.
595
-
596
-
597
596
``[packages.tool] ``
598
597
-------------------
599
598
@@ -649,7 +648,7 @@ Per-file locking
649
648
dependencies = []
650
649
direct = false
651
650
files = [
652
- {name = 'attrs-23.2.0-py3-none-any.whl', lock = ['CPython 3.12 on manylinux 2.17 x86-64', 'CPython 3.12 on Windows x64'], origin = 'https://files.pythonhosted.org/packages/e0/44/827b2a91a5816512fcaf3cc4ebc465ccd5d598c45cefa6703fcf4a79018f/attrs-23.2.0-py3-none-any.whl', hash = '99b87a485a5820b23b879f04c2305b44b951b502fd64be915879d77a7e8fc6f1'}
651
+ {name = 'attrs-23.2.0-py3-none-any.whl', lock = ['CPython 3.12 on manylinux 2.17 x86-64', 'CPython 3.12 on Windows x64'], url = 'https://files.pythonhosted.org/packages/e0/44/827b2a91a5816512fcaf3cc4ebc465ccd5d598c45cefa6703fcf4a79018f/attrs-23.2.0-py3-none-any.whl', hash = '99b87a485a5820b23b879f04c2305b44b951b502fd64be915879d77a7e8fc6f1'}
653
652
]
654
653
655
654
[[packages]]
@@ -662,7 +661,7 @@ Per-file locking
662
661
dependencies = ['attrs']
663
662
direct = false
664
663
files = [
665
- {name = 'cattrs-23.2.3-py3-none-any.whl', lock = ['CPython 3.12 on manylinux 2.17 x86-64', 'CPython 3.12 on Windows x64'], origin = 'https://files.pythonhosted.org/packages/b3/0d/cd4a4071c7f38385dc5ba91286723b4d1090b87815db48216212c6c6c30e/cattrs-23.2.3-py3-none-any.whl', hash = '0341994d94971052e9ee70662542699a3162ea1e0c62f7ce1b4a57f563685108'}
664
+ {name = 'cattrs-23.2.3-py3-none-any.whl', lock = ['CPython 3.12 on manylinux 2.17 x86-64', 'CPython 3.12 on Windows x64'], url = 'https://files.pythonhosted.org/packages/b3/0d/cd4a4071c7f38385dc5ba91286723b4d1090b87815db48216212c6c6c30e/cattrs-23.2.3-py3-none-any.whl', hash = '0341994d94971052e9ee70662542699a3162ea1e0c62f7ce1b4a57f563685108'}
666
665
]
667
666
668
667
[[packages]]
@@ -675,15 +674,15 @@ Per-file locking
675
674
dependencies = []
676
675
direct = false
677
676
files = [
678
- {name = 'numpy-2.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl', lock = ['cp312-manylinux_2_17_x86_64'], origin = 'https://files.pythonhosted.org/packages/2c/f3/61eeef119beb37decb58e7cb29940f19a1464b8608f2cab8a8616aba75fd/numpy-2.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl', hash = '6790654cb13eab303d8402354fabd47472b24635700f631f041bd0b65e37298a'},
679
- {name = 'numpy-2.0.1-cp312-cp312-win_amd64.whl', lock = ['cp312-win_amd64'], origin = 'https://files.pythonhosted.org/packages/b5/59/f6ad30785a6578ad85ed9c2785f271b39c3e5b6412c66e810d2c60934c9f/numpy-2.0.1-cp312-cp312-win_amd64.whl', hash = 'bb2124fdc6e62baae159ebcfa368708867eb56806804d005860b6007388df171'}
677
+ {name = 'numpy-2.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl', lock = ['cp312-manylinux_2_17_x86_64'], url = 'https://files.pythonhosted.org/packages/2c/f3/61eeef119beb37decb58e7cb29940f19a1464b8608f2cab8a8616aba75fd/numpy-2.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl', hash = '6790654cb13eab303d8402354fabd47472b24635700f631f041bd0b65e37298a'},
678
+ {name = 'numpy-2.0.1-cp312-cp312-win_amd64.whl', lock = ['cp312-win_amd64'], url = 'https://files.pythonhosted.org/packages/b5/59/f6ad30785a6578ad85ed9c2785f271b39c3e5b6412c66e810d2c60934c9f/numpy-2.0.1-cp312-cp312-win_amd64.whl', hash = 'bb2124fdc6e62baae159ebcfa368708867eb56806804d005860b6007388df171'}
680
679
]
681
680
682
681
683
682
Per-package locking
684
683
===================
685
684
686
- Some values for ``packages.files.origin `` left out to make creating this
685
+ Some values for ``packages.files.url `` left out to make creating this
687
686
example more easily as it was done by hand.
688
687
689
688
.. code-block :: toml
@@ -706,7 +705,7 @@ example more easily as it was done by hand.
706
705
dependencies = []
707
706
direct = false
708
707
files = [
709
- {name = 'attrs-23.2.0-py3-none-any.whl', lock = ['cp312-manylinux_2_17_x86_64', 'cp312-win_amd64'], origin = 'https://files.pythonhosted.org/packages/e0/44/827b2a91a5816512fcaf3cc4ebc465ccd5d598c45cefa6703fcf4a79018f/attrs-23.2.0-py3-none-any.whl', hash = '99b87a485a5820b23b879f04c2305b44b951b502fd64be915879d77a7e8fc6f1'}
708
+ {name = 'attrs-23.2.0-py3-none-any.whl', lock = ['cp312-manylinux_2_17_x86_64', 'cp312-win_amd64'], url = 'https://files.pythonhosted.org/packages/e0/44/827b2a91a5816512fcaf3cc4ebc465ccd5d598c45cefa6703fcf4a79018f/attrs-23.2.0-py3-none-any.whl', hash = '99b87a485a5820b23b879f04c2305b44b951b502fd64be915879d77a7e8fc6f1'}
710
709
]
711
710
712
711
[[packages]]
@@ -719,7 +718,7 @@ example more easily as it was done by hand.
719
718
dependencies = ['attrs']
720
719
direct = false
721
720
files = [
722
- {name = 'cattrs-23.2.3-py3-none-any.whl', lock = ['cp312-manylinux_2_17_x86_64', 'cp312-win_amd64'], origin = 'https://files.pythonhosted.org/packages/b3/0d/cd4a4071c7f38385dc5ba91286723b4d1090b87815db48216212c6c6c30e/cattrs-23.2.3-py3-none-any.whl', hash = '0341994d94971052e9ee70662542699a3162ea1e0c62f7ce1b4a57f563685108'}
721
+ {name = 'cattrs-23.2.3-py3-none-any.whl', lock = ['cp312-manylinux_2_17_x86_64', 'cp312-win_amd64'], url = 'https://files.pythonhosted.org/packages/b3/0d/cd4a4071c7f38385dc5ba91286723b4d1090b87815db48216212c6c6c30e/cattrs-23.2.3-py3-none-any.whl', hash = '0341994d94971052e9ee70662542699a3162ea1e0c62f7ce1b4a57f563685108'}
723
722
]
724
723
725
724
[[packages]]
@@ -821,9 +820,6 @@ Example workflow
821
820
an error MUST be raised due to ambiguity for what is to be installed.
822
821
- Find and verify the candidate files and/or VCS entries based on their hash or
823
822
commit ID as appropriate.
824
- - If a source distribution or VCS was selected and
825
- ``[[packages.build-requires]] `` exists, then repeat the above process as
826
- appropriate to install the build dependencies necessary to build the package.
827
823
- Install the candidate files.
828
824
829
825
@@ -853,9 +849,6 @@ Example workflow
853
849
- If no match is found, an error MUST be raised.
854
850
- Find and verify the selected files and/or VCS entries based on their hash or
855
851
commit ID as appropriate.
856
- - If the match is a source distribution or VCS and
857
- ``[[packages.build-requires]] `` is provided, repeat the above as appropriate
858
- to build the package.
859
852
- Install the selected files.
860
853
861
854
@@ -1096,6 +1089,16 @@ for was considered. In the end, though, it was rejected as it was deemed
1096
1089
unnecessary bookkeeping.
1097
1090
1098
1091
1092
+ Locking build requirements for sdists
1093
+ =====================================
1094
+
1095
+ An earlier version of this PEP tried to lock the build requirements for sdists
1096
+ under a ``packages.build-requires `` key. Unfortunately it confused enough people
1097
+ about how it was expected to operate and there were enough edge case issues to
1098
+ decide it wasn't worth trying to do in this PEP upfront. Instead, a future PEP
1099
+ could propose a solution.
1100
+
1101
+
1099
1102
===========
1100
1103
Open Issues
1101
1104
===========
@@ -1133,7 +1136,7 @@ CC0-1.0-Universal license, whichever is more permissive.
1133
1136
.. _PDM : https://pypi.org/project/pdm/
1134
1137
.. _pip-tools : https://pypi.org/project/pip-tools/
1135
1138
.. _Poetry : https://python-poetry.org/
1136
- .. _project detail : https://packaging.python.org/en/latest/specifications/simple-repository-api/#project-detail
1139
+ .. _project index : https://packaging.python.org/en/latest/specifications/simple-repository-api/#project-list
1137
1140
.. _pyproject.toml specification : https://packaging.python.org/en/latest/specifications/pyproject-toml/#pyproject-toml-specification
1138
1141
.. _Simple Repository API : https://packaging.python.org/en/latest/specifications/simple-repository-api/
1139
1142
.. _software bill of materials : https://www.cisa.gov/sbom
0 commit comments