commit: 2408bbf65d6188df6e9da54a56f644f945d6a3e5
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat May 3 14:06:36 2025 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat May 3 15:04:40 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2408bbf6
dev-python/zeroconf: Make extensions optional
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/zeroconf/zeroconf-0.146.5.ebuild | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/dev-python/zeroconf/zeroconf-0.146.5.ebuild
b/dev-python/zeroconf/zeroconf-0.146.5.ebuild
index 4a09da4b8792..50846ac5b7c7 100644
--- a/dev-python/zeroconf/zeroconf-0.146.5.ebuild
+++ b/dev-python/zeroconf/zeroconf-0.146.5.ebuild
@@ -18,6 +18,7 @@ HOMEPAGE="
LICENSE="LGPL-2.1+"
SLOT="0"
KEYWORDS="~amd64 ~arm arm64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+native-extensions"
RDEPEND="
>=dev-python/ifaddr-0.1.7[${PYTHON_USEDEP}]
@@ -25,7 +26,9 @@ RDEPEND="
# the build system uses custom build script that uses distutils to build
# C extensions, sigh
BDEPEND="
- >=dev-python/cython-3.0.8[${PYTHON_USEDEP}]
+ native-extensions? (
+ >=dev-python/cython-3.0.8[${PYTHON_USEDEP}]
+ )
>=dev-python/setuptools-65.6.3[${PYTHON_USEDEP}]
test? (
dev-python/pytest-asyncio[${PYTHON_USEDEP}]
@@ -34,13 +37,21 @@ BDEPEND="
distutils_enable_tests pytest
-export REQUIRE_CYTHON=1
-
PATCHES=(
# https://bugs.gentoo.org/954107 (workaround)
"${FILESDIR}/zeroconf-0.146.5-cython-3.1.patch"
)
+python_compile() {
+ if use native-extensions; then
+ local -x REQUIRE_CYTHON=1
+ else
+ local -x SKIP_CYTHON=1
+ fi
+
+ distutils-r1_python_compile
+}
+
python_test() {
local -x SKIP_IPV6=1
local EPYTEST_DESELECT=(