summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-06-10 22:39:42 +0200
committerMichał Górny <mgorny@gentoo.org>2022-06-12 10:31:03 +0200
commit1ef1b0d8924f29b9d86fd3707f09a7c57b98e31d (patch)
tree921a2f56f10d084da01268b32e85e8282387a95b /eclass
parentpython-r1.eclass: Warn about direct foreach_impl calls in d-r1 (diff)
downloadgentoo-1ef1b0d8924f29b9d86fd3707f09a7c57b98e31d.tar.gz
gentoo-1ef1b0d8924f29b9d86fd3707f09a7c57b98e31d.tar.bz2
gentoo-1ef1b0d8924f29b9d86fd3707f09a7c57b98e31d.zip
distutils-r1.eclass: Update function docs
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/distutils-r1.eclass33
1 files changed, 22 insertions, 11 deletions
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 693b656b21bc..366a6b4ae192 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -855,7 +855,8 @@ _distutils-r1_disable_ez_setup() {
# @FUNCTION: _distutils-r1_handle_pyproject_toml
# @INTERNAL
# @DESCRIPTION:
-# Generate setup.py for pyproject.toml if requested.
+# Verify whether DISTUTILS_USE_SETUPTOOLS is set correctly
+# for pyproject.toml build systems (in non-PEP517 mode).
_distutils-r1_handle_pyproject_toml() {
if [[ ${DISTUTILS_USE_PEP517} ]]; then
die "${FUNCNAME} is not implemented in PEP517 mode"
@@ -1327,12 +1328,19 @@ distutils_pep517_install() {
# @FUNCTION: distutils-r1_python_compile
# @USAGE: [additional-args...]
# @DESCRIPTION:
-# The default python_compile(). Runs 'esetup.py build'. Any parameters
-# passed to this function will be appended to setup.py invocation,
-# i.e. passed as options to the 'build' command.
+# The default python_compile().
#
-# This phase also sets up initial setup.cfg with build directories
-# and copies upstream egg-info files if supplied.
+# If DISTUTILS_USE_PEP517 is set to "no", a no-op.
+#
+# If DISTUTILS_USE_PEP517 is set to any other value, builds a wheel
+# using the PEP517 backend and installs it into ${BUILD_DIR}/install.
+# May additionally call build_ext prior to that when using setuptools
+# and the eclass detects a potential benefit from parallel extension
+# builds.
+#
+# In legacy mode, runs 'esetup.py build'. Any parameters passed to this
+# function will be appended to setup.py invocation, i.e. passed
+# as options to the 'build' command.
distutils-r1_python_compile() {
debug-print-function ${FUNCNAME} "${@}"
@@ -1499,12 +1507,14 @@ distutils-r1_python_test() {
# @FUNCTION: distutils-r1_python_install
# @USAGE: [additional-args...]
# @DESCRIPTION:
-# The default python_install(). Runs 'esetup.py install', doing
-# intermediate root install and handling script wrapping afterwards.
+# The default python_install().
+#
+# In PEP517 mode, merges the files from ${BUILD_DIR}/install
+# (if present) to the image directory.
+#
+# In the legacy mode, calls `esetup.py install` to install the package.
# Any parameters passed to this function will be appended
# to the setup.py invocation (i.e. as options to the 'install' command).
-#
-# This phase updates the setup.cfg file with install directories.
distutils-r1_python_install() {
debug-print-function ${FUNCNAME} "${@}"
@@ -1901,7 +1911,8 @@ distutils-r1_src_test() {
# @FUNCTION: _distutils-r1_post_python_install
# @INTERNAL
# @DESCRIPTION:
-# Post-phase function called after python_install.
+# Post-phase function called after python_install. Performs QA checks.
+# In PEP517 mode, additionally optimizes installed Python modules.
_distutils-r1_post_python_install() {
debug-print-function ${FUNCNAME} "${@}"