Opened 11 years ago

Closed 11 years ago

#23670 closed enhancement (fixed)

build pygame with PyPortMidi support

Reported by: gchaynes@… Owned by: jmroot (Joshua Root)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: py26-game


The current build on py26-game does not seem to be built with Midi support, as has been added in recent versions. The Python portion of the MIDI support is correctly there. I just did a fresh install of py26-game, which installed 1.9.1 correctly. If I then open python, and type:

>>> import pygame.midi

This command works fine. If I then call:

>>> pygame.midi.init()

I get the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pygame/", line 71, in init
    import pygame.pypm
ImportError: No module named pypm

The current Mac OS X build of PyGame, available on the PyGame website, provides the pypm build (it's a .so file that gets dynamically linked into pygame at run-time).

This is on Mac OS X Snow Leopard, in 64-bit mode. (The build of PyGame available on their website is 32-bit).

Attachments (1)

Portfile (1.4 KB) - added by gchaynes@… 11 years ago.
Portfile for portmidi SVN revision 201

Download all attachments as: .zip

Change History (6)

comment:1 Changed 11 years ago by mf2k (Frank Schima)

Owner: changed from macports-tickets@… to jmr@…

comment:2 Changed 11 years ago by jmroot (Joshua Root)

Keywords: pygame midi removed

The MIDI support is described as "experimental", so I'll put it in a variant for now.

comment:3 Changed 11 years ago by jmroot (Joshua Root)

Summary: Pygame is not built with PyPortMidi supportbuild pygame with PyPortMidi support
Type: defectenhancement
Version: 1.8.2

Seems like portmidi needs updating first, and it doesn't look to be straightforward.

Changed 11 years ago by gchaynes@…

Attachment: Portfile added

Portfile for portmidi SVN revision 201

comment:4 Changed 11 years ago by gchaynes@…

I'm new to editing Portfiles, but managed to update the portmidi Portfile to both a much newer SVN version, and also to include the porttime.h header file as well. (portmidi used to also create an additional library, libporttime.a, but that is now rolled into libportmidi.a) Hope this helps.

comment:5 Changed 11 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.