@@ -118,9 +118,9 @@ may be present in a given ``.dist-info`` directory; installers MUST NOT add both
118
118
The ``provenance_url.json `` JSON file MUST be a dictionary, compliant with
119
119
:rfc: `8259 ` and UTF-8 encoded.
120
120
121
- If present, it MUST contain exactly three keys. The first MUST be ``url ``, with
121
+ If present, it MUST contain exactly two keys. The first MUST be ``url ``, with
122
122
type ``string ``. The second key MUST be ``archive_info `` with a value defined
123
- below. The third key MUST be `` index_url `` with type `` string ``.
123
+ below.
124
124
125
125
The value of the ``url `` key MUST be the URL from which the distribution package was downloaded. If a wheel is
126
126
built from a source distribution, the ``url `` value MUST be the URL from which
@@ -140,11 +140,6 @@ Additionally, the user:password section of the URL MAY be a well-known,
140
140
non-security sensitive string. A typical example is ``git `` in the case of an
141
141
URL such as ``
ssh://[email protected] ``.
142
142
143
- The value of the ``index_url `` key MUST be a base URL of a :term: `Package Index `
144
- used to download the given distribution package, such as
145
- ``https://pypi.org/simple/ ``. The recorded URL SHOULD point to a repository
146
- compliant with :pep: `503 `.
147
-
148
143
The value of ``archive_info `` MUST be a dictionary with a single key
149
144
``hashes ``. The value of ``hashes `` is a dictionary mapping hash function
150
145
names to a hex-encoded digest of the file referenced by the ``url `` value. At
@@ -269,7 +264,6 @@ A valid ``provenance_url.json`` list multiple hashes:
269
264
"sha512" : " 6bad5536c30a0b2d5905318a1592948929fbac9baf3bcf2e7faeaf90f445f82bc2b656d0a89070d8a6a9395761f4793c83187bd640c64b2656a112b5be41f73d"
270
265
}
271
266
},
272
- "index_url" : " https://pypi.org/simple/" ,
273
267
"url" : " https://files.pythonhosted.org/packages/07/51/2c0959c5adf988c44d9e1e0d940f5b074516ecc87e96b1af25f59de9ba38/pip-23.0.1-py3-none-any.whl"
274
268
}
275
269
@@ -283,7 +277,6 @@ A valid ``provenance_url.json`` listing a single hash entry:
283
277
"sha256" : " 236bcb61156d76c4b8a05821b988c7b8c35bf0da28a4b614e8d6ab5212c25c6f"
284
278
}
285
279
},
286
- "index_url" : " https://pypi.org/simple/" ,
287
280
"url" : " https://files.pythonhosted.org/packages/07/51/2c0959c5adf988c44d9e1e0d940f5b074516ecc87e96b1af25f59de9ba38/pip-23.0.1-py3-none-any.whl"
288
281
}
289
282
@@ -298,7 +291,6 @@ build and install a wheel:
298
291
"sha256" : " 8bfe29f17c10e2f2e619de8033a07a224058d96b3bfe2ed61777596f7ffd7fa9"
299
292
}
300
293
},
301
- "index_url" : " https://pypi.org/simple/" ,
302
294
"url" : " https://files.pythonhosted.org/packages/1d/43/ad8ae671de795ec2eafd86515ef9842ab68455009d864c058d0c3dcf680d/micropipenv-0.0.1.tar.gz"
303
295
}
304
296
@@ -321,7 +313,6 @@ values in sync.
321
313
"sha256" : " 236bcb61156d76c4b8a05821b988c7b8c35bf0da28a4b614e8d6ab5212c25c6f"
322
314
}
323
315
},
324
- "index_url" : " https://pypi.org/simple/" ,
325
316
"url" : " https://files.pythonhosted.org/packages/07/51/2c0959c5adf988c44d9e1e0d940f5b074516ecc87e96b1af25f59de9ba38/pip-23.0.1-py3-none-any.whl"
326
317
}
327
318
@@ -337,7 +328,6 @@ in the Python docs under :attr:`py3.11:hashlib.hash.name`.
337
328
"SHA-256" : " 236bcb61156d76c4b8a05821b988c7b8c35bf0da28a4b614e8d6ab5212c25c6f"
338
329
}
339
330
},
340
- "index_url" : " https://pypi.org/simple/" ,
341
331
"url" : " https://files.pythonhosted.org/packages/07/51/2c0959c5adf988c44d9e1e0d940f5b074516ecc87e96b1af25f59de9ba38/pip-23.0.1-py3-none-any.whl"
342
332
}
343
333
@@ -466,6 +456,17 @@ in the ``provenance_url.json`` file if that file is created; per this PEP:
466
456
By doing so, consumers of ``provenance_url.json `` can check
467
457
artifact digests when the ``provenance_url.json `` file is created by installers.
468
458
459
+ Storing index URL
460
+ -----------------
461
+
462
+ A possibility was raised for storing the index URL as part of the file content.
463
+ This index URL would represent the index configured in pip's configuration or
464
+ specified using the ``--index-url `` or ``--extra-index-url `` options. Storing
465
+ this information was considered confusing, especially when using other
466
+ installation options like ``--find-links ``. Since the actual index URL is not
467
+ strictly bound to the location from which the wheel file was downloaded, we
468
+ decided not to store the index URL in the ``provenance_url.json `` file.
469
+
469
470
Open Issues
470
471
===========
471
472
@@ -653,6 +654,9 @@ the proposed pip-sbom prototype.
653
654
654
655
Thanks to Stéphane Bidoul and Chris Jerdonek for :pep: `610 `.
655
656
657
+ Thanks to Frost Ming for raising possible concern around storing index URL in
658
+ the ``provenance_url.json `` file.
659
+
656
660
Last, but not least, thanks to Donald Stufft for sponsoring this PEP.
657
661
658
662
Copyright
0 commit comments