diff options
author | Benda Xu <heroxbd@gentoo.org> | 2023-07-17 08:05:11 +0800 |
---|---|---|
committer | Benda Xu <heroxbd@gentoo.org> | 2023-07-17 09:17:37 +0800 |
commit | f4e9370d76817e46724cfbd5f1aaa9212e11dc25 (patch) | |
tree | 3fdb867e0fcfa4c971b37f82da6740b76b1796cf /dev-python/meson-python | |
parent | dev-python/pybind11: keyword ~x64-macos and ~arm64-macos. (diff) | |
download | gentoo-f4e9370d76817e46724cfbd5f1aaa9212e11dc25.tar.gz gentoo-f4e9370d76817e46724cfbd5f1aaa9212e11dc25.tar.bz2 gentoo-f4e9370d76817e46724cfbd5f1aaa9212e11dc25.zip |
dev-python/meson-python: recognize python modules on Prefix/macOS
keyword 0.13.2 for ~arm64-macos, ~x64-macos.
At Prefix/macOS we conventionally name the python modules as .bundle.
Bug: https://bugs.gentoo.org/910401
Signed-off-by: Benda Xu <heroxbd@gentoo.org>
Diffstat (limited to 'dev-python/meson-python')
-rw-r--r-- | dev-python/meson-python/files/meson-python-0.13.2_Mach-O_bundle.patch | 21 | ||||
-rw-r--r-- | dev-python/meson-python/meson-python-0.13.2.ebuild | 4 |
2 files changed, 24 insertions, 1 deletions
diff --git a/dev-python/meson-python/files/meson-python-0.13.2_Mach-O_bundle.patch b/dev-python/meson-python/files/meson-python-0.13.2_Mach-O_bundle.patch new file mode 100644 index 000000000000..2531c93f41e2 --- /dev/null +++ b/dev-python/meson-python/files/meson-python-0.13.2_Mach-O_bundle.patch @@ -0,0 +1,21 @@ +Support .bundle python modules at Prefix/macOS. + +Not forwarding to upstream because we are reflecting on the naming +scheme of plugin modules on Prefix/macOS. + +Bug: https://bugs.gentoo.org/910401 +Signed-off-by: Benda Xu <heroxbd@gentoo.org> + +Index: meson-python-0.13.2/mesonpy/__init__.py +=================================================================== +--- meson-python-0.13.2.orig/mesonpy/__init__.py ++++ meson-python-0.13.2/mesonpy/__init__.py +@@ -129,7 +129,7 @@ _STYLES = _init_colors() # holds the co + + _SUFFIXES = importlib.machinery.all_suffixes() + _EXTENSION_SUFFIXES = importlib.machinery.EXTENSION_SUFFIXES +-_EXTENSION_SUFFIX_REGEX = re.compile(r'^\.(?:(?P<abi>[^.]+)\.)?(?:so|pyd|dll)$') ++_EXTENSION_SUFFIX_REGEX = re.compile(r'^\.(?:(?P<abi>[^.]+)\.)?(?:so|pyd|dll|bundle)$') + assert all(re.match(_EXTENSION_SUFFIX_REGEX, x) for x in _EXTENSION_SUFFIXES) + + diff --git a/dev-python/meson-python/meson-python-0.13.2.ebuild b/dev-python/meson-python/meson-python-0.13.2.ebuild index a3ead795daa5..37341a7784da 100644 --- a/dev-python/meson-python/meson-python-0.13.2.ebuild +++ b/dev-python/meson-python/meson-python-0.13.2.ebuild @@ -20,7 +20,7 @@ SRC_URI=" LICENSE="MIT" SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos" RDEPEND=" >=dev-python/pyproject-metadata-0.7.1[${PYTHON_USEDEP}] @@ -40,6 +40,8 @@ BDEPEND=" ) " +PATCHES=( "${FILESDIR}"/meson-python-0.13.2_Mach-O_bundle.patch ) + distutils_enable_tests pytest python_test() { |