Skip to content

Commit fb577c1

Browse files
committed
Clarify manual index hash guidance
1 parent 78dccd6 commit fb577c1

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

‎source/guides/hosting-your-own-index.rst‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,12 @@ directory with autoindex enabled. For an example using the built in Web server
5252
in `Twisted`_, you would simply run ``twistd -n web --path .`` and then
5353
instruct users to add the URL to their installer's configuration.
5454

55-
An automatically generated directory listing usually doesn't include artifact
56-
hashes. Without hashes in the repository links, tools may be unable to record
57-
them in lock files. To include a SHA-256 hash, generate an ``index.html`` file
58-
in each project directory and append the hash to each artifact URL as described
59-
by the :ref:`Simple Repository API <simple-repository-html-project-detail>`:
55+
A bare, automatically generated directory listing, such as one produced by a
56+
generic autoindex module, may not include artifact hashes. Without hashes in
57+
the repository links, tools may be unable to record them in lock files. To
58+
include a SHA-256 hash, generate an ``index.html`` file in each project
59+
directory and append the hash to each artifact URL as described by the
60+
:ref:`Simple Repository API <simple-repository-html-project-detail>`:
6061

6162
.. code-block:: html
6263

@@ -71,7 +72,9 @@ by the :ref:`Simple Repository API <simple-repository-html-project-detail>`:
7172

7273
Replace ``3571b...`` with the full SHA-256 digest of the artifact. You can use
7374
:ref:`dumb-pypi` to generate a static repository with hashes and other Simple
74-
Repository API metadata from a directory of package artifacts.
75+
Repository API metadata from a directory of package artifacts. Full repository
76+
implementations should prefer the JSON variant of the Simple Repository API,
77+
which requires a (possibly empty) ``hashes`` mapping for each file.
7578

7679
Existing projects
7780
=================

0 commit comments

Comments
 (0)