Date: Thursday, April 6, 2023 @ 13:35:53
  Author: felixonmars
Revision: 1438946

archrelease: copy trunk to community-staging-x86_64

Added:
  python-rtmidi/repos/community-staging-x86_64/
  python-rtmidi/repos/community-staging-x86_64/PKGBUILD
    (from rev 1438942, python-rtmidi/trunk/PKGBUILD)
  python-rtmidi/repos/community-staging-x86_64/remove-dev-suffix.patch
    (from rev 1438942, python-rtmidi/trunk/remove-dev-suffix.patch)
  python-rtmidi/repos/community-staging-x86_64/remove-xdg-open.patch
    (from rev 1438943, python-rtmidi/trunk/remove-xdg-open.patch)
  python-rtmidi/repos/community-staging-x86_64/skip-broken-clean.patch
    (from rev 1438943, python-rtmidi/trunk/skip-broken-clean.patch)
  python-rtmidi/repos/community-staging-x86_64/unbundle-rtmidi.patch
    (from rev 1438943, python-rtmidi/trunk/unbundle-rtmidi.patch)

-------------------------+
 PKGBUILD                |   81 ++++++++++++++++++++++++++++++++++++++++++++++
 remove-dev-suffix.patch |   12 ++++++
 remove-xdg-open.patch   |   18 ++++++++++
 skip-broken-clean.patch |   20 +++++++++++
 unbundle-rtmidi.patch   |   59 +++++++++++++++++++++++++++++++++
 5 files changed, 190 insertions(+)

Copied: python-rtmidi/repos/community-staging-x86_64/PKGBUILD (from rev 
1438942, python-rtmidi/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD                           (rev 0)
+++ community-staging-x86_64/PKGBUILD   2023-04-06 13:35:53 UTC (rev 1438946)
@@ -0,0 +1,81 @@
+# Maintainer: George Rawlinson <[email protected]>
+# Contributor: OSAMC <https://github.com/osam-cologne/archlinux-proaudio>
+# Contributor: Christopher Arndt <aur -at- chrisarndt -dot- de>
+
+pkgname=python-rtmidi
+pkgver=1.4.9
+pkgrel=5
+pkgdesc='Python bindings for the MIDI I/O library RtMidi'
+arch=('x86_64')
+url='https://github.com/SpotlightKid/python-rtmidi'
+license=('MIT')
+depends=('python' 'rtmidi')
+makedepends=(
+  'git'
+  'python-installer'
+  'python-wheel'
+  'python-setuptools'
+  'cython'
+  'alsa-lib'
+  'jack'
+  'python-sphinx'
+)
+_commit='0a5aa06d46485cb2dab836bd20205f60efb95eed'
+source=(
+  "$pkgname::git+$url#commit=$_commit"
+  'unbundle-rtmidi.patch'
+  'remove-xdg-open.patch'
+  'remove-dev-suffix.patch'
+  'skip-broken-clean.patch'
+)
+b2sums=('SKIP'
+        
'b27c438fa93c00fd458fd8083302838ad0ca96c09c89f0993c6fdc09681f8eccddca53445925c1b437860faa488115d2bc33076a202a5dd730f44cef298c9831'
+        
'ad41a0730e09cee2c0729c7b79e497187bf6cf8fd603b3dbe4af061859a14e868d1522c746bee17c1a9587709a8cba38dd573bf876dff0f47d82dbe1876ffb2f'
+        
'083a035e09ac1338c6a96841ec8c360f1bf50b2a568ab39e3d388ef4205b25eb5e85062af6fb26e7ca19254d20e2ead45b3e8333695546790c85308a29f05ac5'
+        
'8a15a1b6a977bb2ab3bd642cefb5e136b7f76f7784a8a3d33678ee892771969e3fb20039b8de4850007dc166ef9cde9445bf66a475eb577f25a9edf947828338')
+
+pkgver() {
+  cd "$pkgname"
+
+  git describe --tags | sed 's/^v//'
+}
+
+prepare() {
+  cd "$pkgname"
+
+  # use system rtmidi
+  patch -p1 -i "$srcdir/unbundle-rtmidi.patch"
+
+  # remove xdg-open from Makefile
+  patch -p1 -i "$srcdir/remove-xdg-open.patch"
+
+  # skip broken clean in Makefile
+  patch -p1 -i "$srcdir/skip-broken-clean.patch"
+
+  # remove -dev suffix from version
+  patch -p1 -i "$srcdir/remove-dev-suffix.patch"
+}
+
+build() {
+  cd "$pkgname"
+
+  # module
+  make dist
+
+  # documentation
+  make docs
+}
+
+package() {
+  depends+=('libasound.so' 'libjack.so')
+  cd "$pkgname"
+
+  python -m installer --destdir="$pkgdir" dist/*.whl
+
+  # license
+  install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE.txt
+
+  # documentation
+  install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.rst
+  cp -vr docs/_build/html "$pkgdir/usr/share/doc/$pkgname"
+}

Copied: python-rtmidi/repos/community-staging-x86_64/remove-dev-suffix.patch 
(from rev 1438942, python-rtmidi/trunk/remove-dev-suffix.patch)
===================================================================
--- community-staging-x86_64/remove-dev-suffix.patch                            
(rev 0)
+++ community-staging-x86_64/remove-dev-suffix.patch    2023-04-06 13:35:53 UTC 
(rev 1438946)
@@ -0,0 +1,12 @@
+--- a/setup.cfg
++++ b/setup.cfg
+@@ -1,9 +1,3 @@
+-[egg_info]
+-tag_build = .dev
+-#tag_date = true
+-#tag_svn_revision = true
+-
+-
+ [aliases]
+ # A handy alias to build a release (source and egg)
+ release = build filltmpl egg_info -Db "" sdist --formats=zip,gztar bdist_wheel

Copied: python-rtmidi/repos/community-staging-x86_64/remove-xdg-open.patch 
(from rev 1438943, python-rtmidi/trunk/remove-xdg-open.patch)
===================================================================
--- community-staging-x86_64/remove-xdg-open.patch                              
(rev 0)
+++ community-staging-x86_64/remove-xdg-open.patch      2023-04-06 13:35:53 UTC 
(rev 1438946)
@@ -0,0 +1,18 @@
+--- a/Makefile
++++ b/Makefile
+@@ -46,7 +46,6 @@ coverage:
+       coverage run --source rtmidi setup.py test
+       coverage report -m
+       coverage html
+-      xdg-open htmlcov/index.html
+ 
+ dist: clean release
+       ls -l dist
+@@ -59,7 +58,6 @@ docs: release
+       cat docs/api.rst.inc >> docs/rtmidi.rst
+       $(MAKE) -C docs clean
+       $(MAKE) -C docs html
+-      xdg-open docs/_build/html/index.html
+ 
+ lint:
+       flake8 rtmidi tests examples

Copied: python-rtmidi/repos/community-staging-x86_64/skip-broken-clean.patch 
(from rev 1438943, python-rtmidi/trunk/skip-broken-clean.patch)
===================================================================
--- community-staging-x86_64/skip-broken-clean.patch                            
(rev 0)
+++ community-staging-x86_64/skip-broken-clean.patch    2023-04-06 13:35:53 UTC 
(rev 1438946)
@@ -0,0 +1,20 @@
+--- a/Makefile
++++ b/Makefile
+@@ -47,7 +47,7 @@ coverage:
+       coverage report -m
+       coverage html
+ 
+-dist: clean release
++dist: release
+       ls -l dist
+ 
+ docs: release
+@@ -62,7 +62,7 @@ docs: release
+ lint:
+       flake8 rtmidi tests examples
+ 
+-release: clean
++release:
+       $(PYTHON) setup.py release
+ 
+ release_upload: release

Copied: python-rtmidi/repos/community-staging-x86_64/unbundle-rtmidi.patch 
(from rev 1438943, python-rtmidi/trunk/unbundle-rtmidi.patch)
===================================================================
--- community-staging-x86_64/unbundle-rtmidi.patch                              
(rev 0)
+++ community-staging-x86_64/unbundle-rtmidi.patch      2023-04-06 13:35:53 UTC 
(rev 1438946)
@@ -0,0 +1,59 @@
+--- 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,13 @@
+ 
+ 
+ if sys.platform.startswith('linux'):
+-    if alsa and find_library('asound'):
+-        define_macros.append(("__LINUX_ALSA__", None))
+-        libraries.append('asound')
++    if not find_library('rtmidi'):
++        sys.exit("Failed to find librtmidi")
+ 
+-    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.")
+-
+-    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 +192,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]

Reply via email to