diff --git a/pep-0625.rst b/pep-0625.rst index a5b8c6a6a..4b39fba1d 100644 --- a/pep-0625.rst +++ b/pep-0625.rst @@ -39,17 +39,17 @@ predictability to assign this format certain contextual information that helps the installation process. pip, for example, parses the file name of an sdist from a :pep:`503` index, to obtain the distribution's project name and version for dependency resolution purposes. But due to the lack of specification, -the installer does not have any guarantee to the correctness of the inferred +the installer does not have any guarantee as to the correctness of the inferred message, and must verify it at some point by locally building the distribution metadata. -This build step is awkward for a certin class of operations, when the user +This build step is awkward for a certain class of operations, when the user does not expect the build process to occur. `pypa/pip#8387`_ describes an example. The command ``pip download --no-deps --no-binary=numpy numpy`` is expected to only download an sdist for numpy, since we do not need to check for dependencies, and both the name and version are available by introspecting the downloaded file name. pip, however, cannot assume the downloaded archive -follows the convention, and must build check the metadata. For a :pep:`518` +follows the convention, and must build and check the metadata. For a :pep:`518` project, this means running the ``prepare_metadata_for_build_wheel`` hook specified in :pep:`517`, which incurs significant overhead. @@ -64,9 +64,9 @@ the metadata available in the file name. This PEP also serves as the formal specification to the long-standing file name convention used by the current sdist implementations. The file name contains the distribution name and version, to aid tools identifying a -distribution without needing to download, unarchieve the file, and perform +distribution without needing to download, unarchive the file, and perform costly metadata generation for introspection, if all the information they need -are available in the file name. +is available in the file name. Specification @@ -107,7 +107,7 @@ Rejected Ideas Create specification for sdist metadata --------------------------------------- -The topic of creating a trustworthy, standard sdist metadata format as a mean +The topic of creating a trustworthy, standard sdist metadata format as a means to distinguish sdists from arbitrary archive files has been raised and discussed multiple times, but has yet to make significant progress due to the complexity of potential metadata inconsistency between an sdist and a @@ -115,7 +115,7 @@ wheel built from it. This PEP does not exclude the possibility of creating a metadata specification for sdists in the future. But by specifying only the file name of an sdist, a -tool can reliably identify an sdist, and perform useful introspection to its +tool can reliably identify an sdist, and perform useful introspection on its identity, without going into the details required for metadata specification. Use a currently common sdist naming scheme @@ -126,7 +126,7 @@ There is a currently established practice to name an sdist in the format of Popular source code management services use a similar scheme to name the downloaded source archive. GitHub, for example, uses ``distribution-1.0.zip`` -as the arhieve name containing source code of repository ``distribution`` on +as the archive name containing source code of repository ``distribution`` on branch ``1.0``. Giving this scheme a special meaning would cause confusion since a source archive may not a valid sdist. @@ -137,7 +137,7 @@ A scheme ``{distribution}-{version}.sdist.tar.gz`` was raised during the initial discussion. This was abandoned due to backwards compatibility issues with currently available installation tools. pip 20.1, for example, would parse ``distribution-1.0.sdist.tar.gz`` as project ``distribution`` with -version ``1.0.sdist``. This would cause the sdist be downloaded, but fail to +version ``1.0.sdist``. This would cause the sdist to be downloaded, but fail to install due to inconsistent metadata. The same problem exists for all common archive suffixes. To avoid confusing