summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-04-11 09:46:15 +0200
committerMichał Górny <mgorny@gentoo.org>2022-04-11 21:58:42 +0200
commit41f25bec0bbf5d9bc3444f10a7da291c50b07a1b (patch)
tree60cead25e51fa9192f872da763bc86de8323177b /eclass
parentdev-python/ruamel-std-pathlib: Use distutils_write_namespace (diff)
downloadgentoo-41f25bec0bbf5d9bc3444f10a7da291c50b07a1b.tar.gz
gentoo-41f25bec0bbf5d9bc3444f10a7da291c50b07a1b.tar.bz2
gentoo-41f25bec0bbf5d9bc3444f10a7da291c50b07a1b.zip
distutils-r1.eclass: Print deprecation warning for distutils builds
Print deprecation warnings for non-PEP517 builds using plain distutils. This is a small subset of Python packages overall, and the first step towards deprecating legacy build support. Transitioning pure distutils packages is also important to avoid .egg-info collisions when we switch from CPython distutils to setuptools-vendored distutils. Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/distutils-r1.eclass9
1 files changed, 9 insertions, 0 deletions
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index ccdf0e025758..a7d5890a6b1b 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -867,6 +867,15 @@ distutils-r1_python_prepare_all() {
if [[ ! ${DISTUTILS_USE_PEP517} ]]; then
_distutils-r1_disable_ez_setup
_distutils-r1_handle_pyproject_toml
+
+ case ${DISTUTILS_USE_SETUPTOOLS} in
+ no)
+ eqawarn "Non-PEP517 builds are deprecated for ebuilds using plain distutils."
+ eqawarn "Please migrate to DISTUTILS_USE_PEP517=setuptools."
+ eqawarn "Please see Python Guide for more details:"
+ eqawarn " https://projects.gentoo.org/python/guide/distutils.html"
+ ;;
+ esac
fi
if [[ ${DISTUTILS_IN_SOURCE_BUILD} && ! ${DISTUTILS_SINGLE_IMPL} ]]