* [gentoo-commits] repo/gentoo:master commit in: dev-python/mido/, dev-python/mido/files/
@ 2022-09-29 0:39 Marek Szuba
0 siblings, 0 replies; only message in thread
From: Marek Szuba @ 2022-09-29 0:39 UTC (permalink / raw
To: gentoo-commits
commit: 33ffa7fb1ba486448a52409fd1104ddc206a4eda
Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 29 00:38:34 2022 +0000
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Thu Sep 29 00:39:03 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=33ffa7fb
dev-python/mido: new package, add 1.2.10
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>
dev-python/mido/Manifest | 1 +
.../python-rtmidi-1.4.9-unbundle_rtmidi.patch | 60 ++++++++++++++++++++++
dev-python/mido/metadata.xml | 16 ++++++
dev-python/mido/mido-1.2.10.ebuild | 27 ++++++++++
4 files changed, 104 insertions(+)
diff --git a/dev-python/mido/Manifest b/dev-python/mido/Manifest
new file mode 100644
index 000000000000..49be2c8dad04
--- /dev/null
+++ b/dev-python/mido/Manifest
@@ -0,0 +1 @@
+DIST mido-1.2.10.tar.gz 103070 BLAKE2B 84e39cd7f52947f50dc31bac5abb7752e736c867817fbd711e768f1ef182990671633c24bb5726fb428f312f2497d15da560b307ddfeea3399d06330183e9668 SHA512 f21040acda9d084b7449ba52c3d036c637a172a84cdf6975adab999d78d24977be0cba3bd7287253e4a3b6de5044ef01a82de6d19316a22410bc96e9eca6128f
diff --git a/dev-python/mido/files/python-rtmidi-1.4.9-unbundle_rtmidi.patch b/dev-python/mido/files/python-rtmidi-1.4.9-unbundle_rtmidi.patch
new file mode 100644
index 000000000000..ecd9f53b108c
--- /dev/null
+++ b/dev-python/mido/files/python-rtmidi-1.4.9-unbundle_rtmidi.patch
@@ -0,0 +1,60 @@
+--- a/setup.py
++++ b/setup.py
+@@ -102,7 +102,7 @@
+
+ # Set up options for compiling the _rtmidi Extension
+ if cythonize:
+- sources = [join(SRC_DIR, "_rtmidi.pyx"), join(SRC_DIR, "rtmidi", "RtMidi.cpp")]
++ sources = [join(SRC_DIR, "_rtmidi.pyx")]
+ elif exists(join(SRC_DIR, "_rtmidi.cpp")):
+ cythonize = lambda x: x # noqa
+ sources = [join(SRC_DIR, "_rtmidi.cpp"), join(SRC_DIR, "rtmidi", "RtMidi.cpp")]
+@@ -145,18 +145,18 @@
+
+
+ if sys.platform.startswith('linux'):
+- if alsa and find_library('asound'):
+- define_macros.append(("__LINUX_ALSA__", None))
+- libraries.append('asound')
+-
+- if jack:
+- check_for_jack(define_macros, libraries)
+-
+ if not find_library('pthread'):
+ sys.exit("The 'pthread' library is required to build python-rtmidi on"
+ "Linux. Please install the libc6 development package.")
++ if not find_library('rtmidi'):
++ sys.exit("Failed to find librtmidi")
+
+ libraries.append("pthread")
++
++ res = subprocess.check_output(['pkg-config', '--variable', 'includedir', 'rtmidi'])
++ rtmidi_include_dir = res.decode().strip()
++ include_dirs.append(rtmidi_include_dir)
++ libraries.append('rtmidi')
+ elif sys.platform.startswith('darwin'):
+ if jack:
+ check_for_jack(define_macros, libraries)
+@@ -197,7 +197,7 @@
+ # Finally, set up our distribution
+ setup(
+ packages=['rtmidi'],
+- ext_modules=cythonize(extensions),
++ ext_modules=cythonize(extensions, include_path=[ rtmidi_include_dir ]),
+ tests_require=[], # Test dependencies are handled by tox
+ # On systems without a RTC (e.g. Raspberry Pi), system time will be the
+ # Unix epoch when booted without network connection, which makes zip fail,
+--- a/tests/test_rtmidi.py
++++ b/tests/test_rtmidi.py
+@@ -54,11 +54,6 @@
+ else:
+ self.assertEqual(res, rtmidi.API_UNSPECIFIED)
+
+- def test_get_rtmidi_version(self):
+- version = rtmidi.get_rtmidi_version()
+- self.assertTrue(isinstance(version, string_types))
+- self.assertEqual(version, '4.0.0')
+-
+
+ class BaseTests:
+ NOTE_ON = [0x90, 48, 100]
diff --git a/dev-python/mido/metadata.xml b/dev-python/mido/metadata.xml
new file mode 100644
index 000000000000..0751ee0b29fc
--- /dev/null
+++ b/dev-python/mido/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>marecki@gentoo.org</email>
+ <name>Marek Szuba</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="pypi">mido</remote-id>
+ <remote-id type="github">mido/mido</remote-id>
+ </upstream>
+ <use>
+ <flag name="portmidi">Support using <pkg>media-libs/portmidi</pkg> as MIDI back-end</flag>
+ <flag name="rtmidi">Support using <pkg>media-libs/rtmidi</pkg> as MIDI back-end</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-python/mido/mido-1.2.10.ebuild b/dev-python/mido/mido-1.2.10.ebuild
new file mode 100644
index 000000000000..3288fa2bd953
--- /dev/null
+++ b/dev-python/mido/mido-1.2.10.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} )
+DISTUTILS_USE_PEP517=setuptools
+
+inherit distutils-r1
+
+DESCRIPTION="MIDI Objects, a library for working with MIDI messages and ports"
+HOMEPAGE="
+ https://pypi.org/project/mido/
+ https://github.com/mido/mido
+"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+portmidi rtmidi"
+
+RDEPEND="portmidi? ( media-libs/portmidi )
+ rtmidi? ( dev-python/python-rtmidi[${PYTHON_USEDEP}] )"
+
+distutils_enable_sphinx docs
+distutils_enable_tests pytest
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-09-29 0:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-29 0:39 [gentoo-commits] repo/gentoo:master commit in: dev-python/mido/, dev-python/mido/files/ Marek Szuba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox