diff options
author | Sam James <sam@gentoo.org> | 2023-07-02 14:10:24 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-07-02 14:10:38 +0100 |
commit | 9d347c82d7d8fc2b5fb27f684aed3433220a4e19 (patch) | |
tree | a396172182958e2725da65724adf65a9c399205f /dev-python/scikit-build-core | |
parent | dev-python/scikit-build-core: drop 0.4.6 (diff) | |
download | gentoo-9d347c82d7d8fc2b5fb27f684aed3433220a4e19.tar.gz gentoo-9d347c82d7d8fc2b5fb27f684aed3433220a4e19.tar.bz2 gentoo-9d347c82d7d8fc2b5fb27f684aed3433220a4e19.zip |
dev-python/scikit-build-core: backport setuptools hook breakage fix
Bug: https://bugs.gentoo.org/909035
Closes: https://bugs.gentoo.org/909335
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-python/scikit-build-core')
-rw-r--r-- | dev-python/scikit-build-core/files/scikit-build-core-0.4.7-setuptools-hooks.patch | 28 | ||||
-rw-r--r-- | dev-python/scikit-build-core/scikit-build-core-0.4.7-r1.ebuild | 52 |
2 files changed, 80 insertions, 0 deletions
diff --git a/dev-python/scikit-build-core/files/scikit-build-core-0.4.7-setuptools-hooks.patch b/dev-python/scikit-build-core/files/scikit-build-core-0.4.7-setuptools-hooks.patch new file mode 100644 index 000000000000..f3b352644b0d --- /dev/null +++ b/dev-python/scikit-build-core/files/scikit-build-core-0.4.7-setuptools-hooks.patch @@ -0,0 +1,28 @@ +https://bugs.gentoo.org/909035 +https://bugs.gentoo.org/909335 +https://github.com/scikit-build/scikit-build-core/issues/413 +https://github.com/scikit-build/scikit-build-core/commit/fd9e6cf638a14dee2fb39b36e41b607ce8221d27 + +From fd9e6cf638a14dee2fb39b36e41b607ce8221d27 Mon Sep 17 00:00:00 2001 +From: Henry Schreiner <HenrySchreinerIII@gmail.com> +Date: Sat, 24 Jun 2023 15:07:26 -0400 +Subject: [PATCH] fix: avoid interfering with other setuptools plugins (#414) + +Fix #413. + +--------- + +Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> +--- a/src/scikit_build_core/setuptools/build_cmake.py ++++ b/src/scikit_build_core/setuptools/build_cmake.py +@@ -182,7 +182,8 @@ def _has_cmake(dist: Distribution) -> bool: + def _prepare_extension_detection(dist: Distribution) -> None: + # Setuptools needs to know that it has extensions modules + +- dist.has_ext_modules = lambda: type(dist).has_ext_modules(dist) or _has_cmake(dist) # type: ignore[method-assign] ++ orig_has_ext_modules = dist.has_ext_modules ++ dist.has_ext_modules = lambda: orig_has_ext_modules() or _has_cmake(dist) # type: ignore[method-assign] + + # Hack for stdlib distutils + if not setuptools.distutils.__package__.startswith("setuptools"): # type: ignore[attr-defined] + diff --git a/dev-python/scikit-build-core/scikit-build-core-0.4.7-r1.ebuild b/dev-python/scikit-build-core/scikit-build-core-0.4.7-r1.ebuild new file mode 100644 index 000000000000..b3c010a4c60d --- /dev/null +++ b/dev-python/scikit-build-core/scikit-build-core-0.4.7-r1.ebuild @@ -0,0 +1,52 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=hatchling +PYTHON_COMPAT=( python3_{10..11} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Build backend for CMake based projects" +HOMEPAGE=" + https://github.com/scikit-build/scikit-build-core/ + https://pypi.org/project/scikit-build-core/ +" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +# we always want [pyproject] extra +RDEPEND=" + >=dev-python/packaging-20.9[${PYTHON_USEDEP}] + >=dev-python/pathspec-0.10.1[${PYTHON_USEDEP}] + >=dev-python/pyproject-metadata-0.5[${PYTHON_USEDEP}] + $(python_gen_cond_dep ' + dev-python/exceptiongroup[${PYTHON_USEDEP}] + >=dev-python/tomli-1.1[${PYTHON_USEDEP}] + ' 3.9 3.10) +" +BDEPEND=" + dev-python/hatch-vcs[${PYTHON_USEDEP}] + test? ( + dev-python/build[${PYTHON_USEDEP}] + >=dev-python/cattrs-22.2.0[${PYTHON_USEDEP}] + dev-python/pybind11[${PYTHON_USEDEP}] + >=dev-python/pytest-subprocess-1.5[${PYTHON_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}] + dev-python/virtualenv[${PYTHON_USEDEP}] + dev-python/wheel[${PYTHON_USEDEP}] + ) +" + +PATCHES=( + "${FILESDIR}"/${P}-setuptools-hooks.patch +) + +distutils_enable_tests pytest + +python_test() { + epytest -m "not isolated and not network" +} |