summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szuba <marecki@gentoo.org>2023-06-16 22:11:37 +0100
committerMarek Szuba <marecki@gentoo.org>2023-06-16 22:18:27 +0100
commit04429885a2d8b6d95e3e0da0377be05104e9f883 (patch)
tree3a834155f6cce0cde9663f4c7b3294473cef8663 /dev-python/python-rtmidi
parentmedia-libs/pcaudiolib: Stabilize 1.2-r2 x86, #908296 (diff)
downloadgentoo-04429885a2d8b6d95e3e0da0377be05104e9f883.tar.gz
gentoo-04429885a2d8b6d95e3e0da0377be05104e9f883.tar.bz2
gentoo-04429885a2d8b6d95e3e0da0377be05104e9f883.zip
dev-python/python-rtmidi: fix building against newer meson-python
Since 0.13.0, meson-python throws an error if a package is split between purelib and platlib. Upstream did attempt to use the "pure" keyword to account for the mixed nature of this module but unfortunately, they appear to have got it wrong. Closes: https://bugs.gentoo.org/908457 Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'dev-python/python-rtmidi')
-rw-r--r--dev-python/python-rtmidi/files/python-rtmidi-1.5.1-meson_pure.patch29
-rw-r--r--dev-python/python-rtmidi/python-rtmidi-1.5.1.ebuild4
2 files changed, 33 insertions, 0 deletions
diff --git a/dev-python/python-rtmidi/files/python-rtmidi-1.5.1-meson_pure.patch b/dev-python/python-rtmidi/files/python-rtmidi-1.5.1-meson_pure.patch
new file mode 100644
index 000000000000..fba3f395812c
--- /dev/null
+++ b/dev-python/python-rtmidi/files/python-rtmidi-1.5.1-meson_pure.patch
@@ -0,0 +1,29 @@
+--- a/meson.build
++++ b/meson.build
+@@ -6,7 +6,7 @@
+ default_options: [
+ 'warning_level=2'
+ ],
+- meson_version: '>=0.63.0'
++ meson_version: '>=0.64.0'
+ )
+
+ cpp = meson.get_compiler('cpp')
+@@ -69,7 +69,7 @@
+ endif # Platform detection
+
+ pymod = import('python')
+-python = pymod.find_installation(get_option('python'), required: true)
++python = pymod.find_installation(get_option('python'), required: true, pure: false)
+
+ # Generate _rtmidi extension source
+ subdir('src')
+--- a/rtmidi/meson.build
++++ b/rtmidi/meson.build
+@@ -78,6 +78,5 @@
+ python.install_sources(
+ python_sources,
+ version_py,
+- pure: true,
+ subdir: 'rtmidi',
+ )
diff --git a/dev-python/python-rtmidi/python-rtmidi-1.5.1.ebuild b/dev-python/python-rtmidi/python-rtmidi-1.5.1.ebuild
index ed64baccc94b..abefc8615ade 100644
--- a/dev-python/python-rtmidi/python-rtmidi-1.5.1.ebuild
+++ b/dev-python/python-rtmidi/python-rtmidi-1.5.1.ebuild
@@ -4,6 +4,7 @@
EAPI=8
PYTHON_COMPAT=( python3_{9..11} )
+DISTUTILS_EXT=1
DISTUTILS_USE_PEP517=meson-python
PYPI_NO_NORMALIZE=1
@@ -33,6 +34,7 @@ BDEPEND="<dev-python/cython-2.99[${PYTHON_USEDEP}]
PATCHES=(
"${FILESDIR}"/${PN}-1.5.1-build_backend.patch
+ "${FILESDIR}"/${PN}-1.5.1-meson_pure.patch
"${FILESDIR}"/${PN}-1.5.1-unbundle_rtmidi.patch
)
@@ -45,6 +47,8 @@ src_prepare() {
# Just in case
rm -r src/rtmidi || die
rm src/_rtmidi.cpp || die
+
+ DISTUTILS_ARGS=( -Dwheel=true )
}
python_test() {