diff options
author | Michał Górny <mgorny@gentoo.org> | 2023-04-19 13:30:35 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2023-04-22 08:17:04 +0200 |
commit | d665eb96ae193c1683b196461a39bdb8ae4039da (patch) | |
tree | cfc71e6085aed7fe79b7404dca48e315d2fe8181 /eclass | |
parent | distutils-r1.eclass: Issue build_ext only w/ DISTUTILS_EXT (diff) | |
download | gentoo-d665eb96ae193c1683b196461a39bdb8ae4039da.tar.gz gentoo-d665eb96ae193c1683b196461a39bdb8ae4039da.tar.bz2 gentoo-d665eb96ae193c1683b196461a39bdb8ae4039da.zip |
distutils-r1.eclass: Detect missing DISTUTILS_EXT
Detect when Python packages install extensions and warn about missing
DISTUTILS_EXT appropriately.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/30650
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/distutils-r1.eclass | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index 28a1f449e217..cef9d71e5593 100644 --- a/eclass/distutils-r1.eclass +++ b/eclass/distutils-r1.eclass @@ -2069,6 +2069,16 @@ _distutils-r1_post_python_install() { eerror "https://projects.gentoo.org/python/guide/qawarn.html#stray-top-level-files-in-site-packages" die "Failing install because of stray top-level files in site-packages" fi + + if [[ ! ${DISTUTILS_EXT} && ! ${_DISTUTILS_EXT_WARNED} ]]; then + if [[ $(find "${sitedir}" -name "*$(get_modname)" | head -n 1) ]] + then + eqawarn "Python extension modules (*$(get_modname)) found installed. Please set:" + eqawarn " DISTUTILS_EXT=1" + eqawarn "in the ebuild." + _DISTUTILS_EXT_WARNED=1 + fi + fi fi } |