Skip to content

Commit

Permalink
distutils-r1.eclass: Print deprecation warning for distutils builds
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
mgorny committed Apr 11, 2022
1 parent b711a25 commit 41f25be
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions eclass/distutils-r1.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -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} ]]
Expand Down

0 comments on commit 41f25be

Please sign in to comment.