all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#72142] [PATCH] add python-rtmidi
@ 2024-07-16 15:23 Rick Huijzer
  2024-07-18 15:10 ` [bug#72142] [PATCH v1] Fix formatting, boost not needed in python-rtmidi Rick Huijzer
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Rick Huijzer @ 2024-07-16 15:23 UTC (permalink / raw)
  To: 72142; +Cc: Rick Huijzer

---
I've run guix lint and should be fine. I'm having a bit of a hard time with formatting so I will probaby have to recreate the perfect setup from the documentation.
Packaging python-rtmidi in an effort to bring a complete DMX workflow to guix.

 gnu/packages/python-xyz.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 4d7ddeb9d7..8f8cf4a1a8 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -24710,6 +24710,32 @@ (define-public python-sacn
      a network.")
     (license license:expat)))
 
+(define-public python-rtmidi
+  (package
+    (name "python-rtmidi")
+    (version "1.5.8")
+    (source 
+      (origin
+       (method url-fetch)
+       (uri (pypi-uri "python_rtmidi" version))
+       (sha256
+        (base32 "1yh4s124awzwhfg49m8s6qsa58qxabljlmnb1q00kbk8n1ldx6kz"))))
+    (build-system meson-build-system)
+    (inputs
+      (list glibc
+            python-cffi
+            jack-2
+            boost
+            rtmidi))
+    (native-inputs (list python python-pytest pkg-config python-setuptools))
+    (home-page "https://pypi.org/project/python-rtmidi/")
+    (synopsis "Python bindings for RtMidi")
+    (description
+    "Python-rtmidi is a Python binding for RtMidi, a set of C++ classes that provides
+    a common API for real-time MIDI input/output across Linux (ALSA & JACK), macOS,
+    and Windows (Multimedia Library).")
+    (license license:expat)))
+
 (define-public python-bagit
   (package
     (name "python-bagit")

base-commit: 3c58b759a51072aabd7eaaca680674a0c2b36c23
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [bug#72142] [PATCH v1] Fix formatting, boost not needed in python-rtmidi
  2024-07-16 15:23 [bug#72142] [PATCH] add python-rtmidi Rick Huijzer
@ 2024-07-18 15:10 ` Rick Huijzer
  2024-07-18 16:38   ` jgart via Guix-patches via
  2024-07-18 20:54 ` [bug#72142] [PATCH] add python-rtmidi Rick Huijzer
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 6+ messages in thread
From: Rick Huijzer @ 2024-07-18 15:10 UTC (permalink / raw)
  To: 72142
  Cc: Rick Huijzer, Lars-Dominik Braun, Marius Bakke, Munyoki Kilyungi,
	Sharlatan Hellseher, Tanguy Le Carrour, jgart

Change-Id: I96127532b959bec2995180d8c0838595c0943a62
---
Sorry; this is a fixed patch. Still trying to use pytest, but haven't found a nice way to add the add-installed-pythonpath logic, which is not present in the meson-build system
 gnu/packages/python-xyz.scm | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 4ac585c8d9..a46d36790b 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -24765,24 +24765,19 @@ (define-public python-rtmidi
   (package
     (name "python-rtmidi")
     (version "1.5.8")
-    (source 
-      (origin
+    (source
+     (origin
        (method url-fetch)
        (uri (pypi-uri "python_rtmidi" version))
        (sha256
         (base32 "1yh4s124awzwhfg49m8s6qsa58qxabljlmnb1q00kbk8n1ldx6kz"))))
     (build-system meson-build-system)
-    (inputs
-      (list glibc
-            python-cffi
-            jack-2
-            boost
-            rtmidi))
+    (inputs (list glibc python-cffi jack-2 rtmidi))
     (native-inputs (list python python-pytest pkg-config python-setuptools))
     (home-page "https://pypi.org/project/python-rtmidi/")
     (synopsis "Python bindings for RtMidi")
     (description
-    "Python-rtmidi is a Python binding for RtMidi, a set of C++ classes that provides
+     "Python-rtmidi is a Python binding for RtMidi, a set of C++ classes that provides
     a common API for real-time MIDI input/output across Linux (ALSA & JACK), macOS,
     and Windows (Multimedia Library).")
     (license license:expat)))

base-commit: c3cdb2b4057a2c2e8e7be1e320784431f0f671ae
prerequisite-patch-id: f1cc8a724ee8010966de580066164220f481deff
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [bug#72142] [PATCH v1] Fix formatting, boost not needed in python-rtmidi
  2024-07-18 15:10 ` [bug#72142] [PATCH v1] Fix formatting, boost not needed in python-rtmidi Rick Huijzer
@ 2024-07-18 16:38   ` jgart via Guix-patches via
  0 siblings, 0 replies; 6+ messages in thread
From: jgart via Guix-patches via @ 2024-07-18 16:38 UTC (permalink / raw)
  To: Rick Huijzer, 72142
  Cc: Sharlatan Hellseher, Rick Huijzer, Munyoki Kilyungi,
	Lars-Dominik Braun, Marius Bakke, Tanguy Le Carrour

> + (inputs (list glibc python-cffi jack-2 rtmidi))

Hi, since this is a Python library, do we want to make the Python inputs propagated?

Were you able to test in a shell that the following works fine when run from a script or repl?

If not, can you test that and report back on the results. I'll give it a try after.

Or, how have you gone about testing that this package works in a Guix environment with all the system audio requirements?


```python
import time
import rtmidi

midiout = rtmidi.MidiOut()
available_ports = midiout.get_ports()

if available_ports:
    midiout.open_port(0)
else:
    midiout.open_virtual_port("My virtual output")

with midiout:
    note_on = [0x90, 60, 112] # channel 1, middle C, velocity 112
    note_off = [0x80, 60, 0]
    midiout.send_message(note_on)
    time.sleep(0.5)
    midiout.send_message(note_off)
    time.sleep(0.1)

del midiout
```

all best,

jgart




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#72142] [PATCH] add python-rtmidi
  2024-07-16 15:23 [bug#72142] [PATCH] add python-rtmidi Rick Huijzer
  2024-07-18 15:10 ` [bug#72142] [PATCH v1] Fix formatting, boost not needed in python-rtmidi Rick Huijzer
@ 2024-07-18 20:54 ` Rick Huijzer
  2024-08-06 13:28 ` Rick Huijzer
  2024-09-02 20:07 ` Rick Huijzer
  3 siblings, 0 replies; 6+ messages in thread
From: Rick Huijzer @ 2024-07-18 20:54 UTC (permalink / raw)
  To: 72142

[-- Attachment #1: Type: text/plain, Size: 584 bytes --]

Hi,

I will look into the propagated inputs question. Indeed looking at the
documentation python does not belong there.

Your example works at a foreign distro using guix (Fedora) with jack, which
is where I've tested the declaration. On Guix system it seems to work when
using the PipeWire Home Service, but I can't get it to work with the
standalone jack2 just yet.  So that's something I've got to look into as
well.

It wasn't my intention to submit a poorly working patch, sorry. Somewhere
next week probably I will compose a new patch revision.

-- 
Kind regards,

Rick Huijzer

[-- Attachment #2: Type: text/html, Size: 971 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#72142] [PATCH] add python-rtmidi
  2024-07-16 15:23 [bug#72142] [PATCH] add python-rtmidi Rick Huijzer
  2024-07-18 15:10 ` [bug#72142] [PATCH v1] Fix formatting, boost not needed in python-rtmidi Rick Huijzer
  2024-07-18 20:54 ` [bug#72142] [PATCH] add python-rtmidi Rick Huijzer
@ 2024-08-06 13:28 ` Rick Huijzer
  2024-09-02 20:07 ` Rick Huijzer
  3 siblings, 0 replies; 6+ messages in thread
From: Rick Huijzer @ 2024-08-06 13:28 UTC (permalink / raw)
  To: 72142

[-- Attachment #1: Type: text/plain, Size: 832 bytes --]

Hi,

I've installed guix-system and did some further testing:

The package seems to work just fine when properly installing jack2,
pipewire (pw-jack) or jack on guix-system (and Fedora). It's possible to
put jack (v1) in the propagated inputs, but that's not that elegant I
suppose. Furthermore all the audio packages I could find in guix include
jack in the same way, at build time and not as a propagated input.

I cannot test this with actual midi hardware, only with the
midiout.open_virtual_port method. But for my use case (using the OLA
suite), the library works fine, even when using real DMX controller
hardware.

So after testing and configuring my system properly, I have found no reason
for a revised patch. If you or someone else wants to take a look at this
patch, please do.

Thanks.

-- 
Kind regards,

Rick Huijzer

[-- Attachment #2: Type: text/html, Size: 1260 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#72142] [PATCH] add python-rtmidi
  2024-07-16 15:23 [bug#72142] [PATCH] add python-rtmidi Rick Huijzer
                   ` (2 preceding siblings ...)
  2024-08-06 13:28 ` Rick Huijzer
@ 2024-09-02 20:07 ` Rick Huijzer
  3 siblings, 0 replies; 6+ messages in thread
From: Rick Huijzer @ 2024-09-02 20:07 UTC (permalink / raw)
  To: 72142

[-- Attachment #1: Type: text/plain, Size: 134 bytes --]

Hi,

Could someone have a look at this? It builds and works. Feedback is much
appreciated.

-- 
Met vriendelijke groet,

Rick Huijzer

[-- Attachment #2: Type: text/html, Size: 431 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-09-02 20:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-16 15:23 [bug#72142] [PATCH] add python-rtmidi Rick Huijzer
2024-07-18 15:10 ` [bug#72142] [PATCH v1] Fix formatting, boost not needed in python-rtmidi Rick Huijzer
2024-07-18 16:38   ` jgart via Guix-patches via
2024-07-18 20:54 ` [bug#72142] [PATCH] add python-rtmidi Rick Huijzer
2024-08-06 13:28 ` Rick Huijzer
2024-09-02 20:07 ` Rick Huijzer

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.