diff --git a/pep-0517.txt b/pep-0517.txt index 770dba78e..d91ec049f 100644 --- a/pep-0517.txt +++ b/pep-0517.txt @@ -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``. 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 -``build_directory``. For instance, it is expected that ``pyproject.toml`` will -exist in the root of this directory after this hook runs. For tools such as -`setuptools_scm `_, this may include +``build_directory``. For instance, ``pyproject.toml`` should +be copied unmodified into the root of this directory. For tools such +as `setuptools_scm `_, this may include extracting some information from a version control system. 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 -extract the resulting tarball to use as a build directory. Backends in which +Because the wheel will be built from a temporary build directory, ``build_wheel`` +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 ``prepare_build_files``.