PEP 517: Misc changes from discussion (#288)

This commit is contained in:
Thomas Kluyver 2017-06-10 03:59:46 +01:00 committed by Nick Coghlan
parent d7f4eefd7b
commit 22e36e2113
1 changed files with 14 additions and 8 deletions

View File

@ -222,10 +222,10 @@ Mandatory.
:: ::
def build_sdist(sdist_directory, config_settings): def export_sdist(sdist_directory, config_settings):
... ...
Must build an unpacked source distribution in the specified Must export an unpacked source distribution into the specified
``sdist_directory``. ``sdist_directory``.
An unpacked source distribution (sdist) consists of a directory called An unpacked source distribution (sdist) consists of a directory called
@ -244,15 +244,21 @@ can only build an sdist from a VCS checkout.
... ...
Must copy or create any files needed to build a wheel of this package into Must copy or create any files needed to build a wheel of this package into
``build_directory``. For instance, it is expected that ``pyproject.toml`` will ``build_directory``. For instance, ``pyproject.toml`` should
exist in the root of this directory after this hook runs. For tools such as be copied unmodified into the root of this directory. For tools such
`setuptools_scm <https://github.com/pypa/setuptools_scm>`_, this may include as `setuptools_scm <https://github.com/pypa/setuptools_scm>`_, this may include
extracting some information from a version control system. extracting some information from a version control system.
The ``build_wheel`` hook will subsequently be run from the ``build_directory`` The ``build_wheel`` hook will subsequently be run from the ``build_directory``
populated by this hook. populated by this hook. The contents of the resulting wheel should be the same
whether ``build_wheel`` is invoked in an original source directory, the build
directory populated by this hook, or an unpacked sdist directory.
Optional. If this hook is not defined, frontends may call ``build_sdist`` and Because the wheel will be built from a temporary build directory, ``build_wheel``
extract the resulting tarball to use as a build directory. Backends in which may create intermediate files in the working directory, and does not need to
take care to clean them up.
Optional. If this hook is not defined, frontends may call ``export_sdist`` and
use the unpacked sdist as a build directory. Backends in which
building an sdist has additional requirements should define building an sdist has additional requirements should define
``prepare_build_files``. ``prepare_build_files``.