From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: "Michał Górny" <mgorny@gentoo.org>
Subject: [gentoo-dev] [PATCH 0/5] distutils-r1.eclass: DISTUTILS_EXT to enable features specific to building extensions
Date: Thu, 20 Apr 2023 16:29:50 +0200 [thread overview]
Message-ID: <20230420142955.1092937-1-mgorny@gentoo.org> (raw)
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
next reply other threads:[~2023-04-20 14:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-20 14:29 Michał Górny [this message]
2023-04-20 14:29 ` [gentoo-dev] [PATCH 1/5] distutils-r1.eclass: Add DISTUTILS_EXT control variable Michał Górny
2023-04-20 14:29 ` [gentoo-dev] [PATCH 2/5] distutils-r1.eclass: Add PYTHON_DEPS to DEPEND when DISTUTILS_EXT Michał Górny
2023-04-20 14:29 ` [gentoo-dev] [PATCH 3/5] distutils-r1.eclass: Support IUSE=debug for DISTUTILS_EXT Michał Górny
2023-04-20 14:29 ` [gentoo-dev] [PATCH 4/5] distutils-r1.eclass: Issue build_ext only w/ DISTUTILS_EXT Michał Górny
2023-04-20 14:29 ` [gentoo-dev] [PATCH 5/5] distutils-r1.eclass: Detect missing DISTUTILS_EXT Michał Górny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230420142955.1092937-1-mgorny@gentoo.org \
--to=mgorny@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox