[prev in list] [next in list] [prev in thread] [next in thread]
List: gentoo-dev
Subject: [gentoo-dev] [PATCH 0/5] distutils-r1.eclass: DISTUTILS_EXT to enable features specific to building
From: Michał Górny <mgorny () gentoo ! org>
Date: 2023-04-20 14:29:50
Message-ID: 20230420142955.1092937-1-mgorny () gentoo ! org
[Download RAW message or body]
Hi,
Here's a patch series that adds a DISTUTILS_EXT variable that indicates
that the package in question builds Python extensions (i.e. loadable
.so modules) and enables a few related features:
1. adds DEPEND=${PYTHON_DEPS} to fix cross-compiling
2. adds IUSE=debug that controls passing -DNDEBUG/-UNDEBUG to builds
(right now unlike most distros out there we are always building
with assertions enabled)
3. limits our parallel build_ext optimization to DISTUTILS_EXT ebuilds
(i.e. eliminates the few false positives triggering it right now)
The patches also include logic to automatically detect and report
(as a QA warning) missing DISTUTILS_EXT if a package is installing .so
files into site-packages.
Note that technically none of the above applies to ebuilds building Rust
extensions rather than C/Cython. However, there's no trivial way to
distinguish one from the other for the purpose of QA check and none
of the above points do any real harm. Especially that cargo.eclass
adds IUSE=debug anyway.
DISTUTILS_EXT should also be set if the extensions are built
conditionally to USE flags. The only ill effect of doing that is that
PYTHON_DEPS are added unconditionally (unless you're using
DISTUTILS_OPTIONAL) rather than conditionally to the flag responsible
for the extension but that's a minor point anyway.
--
Best regards,
Michał Górny
Michał Górny (5):
distutils-r1.eclass: Add DISTUTILS_EXT control variable
distutils-r1.eclass: Add PYTHON_DEPS to DEPEND when DISTUTILS_EXT
distutils-r1.eclass: Support IUSE=debug for DISTUTILS_EXT
distutils-r1.eclass: Issue build_ext only w/ DISTUTILS_EXT
distutils-r1.eclass: Detect missing DISTUTILS_EXT
eclass/distutils-r1.eclass | 50 +++++++++++++++++++++++++++++++++-----
1 file changed, 44 insertions(+), 6 deletions(-)
--
2.40.0
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic