Opened 11 years ago

Closed 11 years ago

#39147 closed defect (fixed)

py27-game +portmidi fails silently on case-sensitive file system

Reported by: cr@… Owned by: jmroot (Joshua Root)
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: haspatch Cc:
Port: py-game

Description

Symptoms

pygame.midi.init() fails:

In [3]: pygame.midi.init()
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-3-51a02ee375ef> in <module>()
----> 1 pygame.midi.init()

/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/midi.pyc in init()
     69     global _init, _pypm
     70     if not _init:
---> 71         import pygame.pypm
     72         _pypm = pygame.pypm
     73 

ImportError: No module named pypm

sudo port -s -d install py27-game +portmidi compiles without errors, but the output shows:

[...]
DEBUG: Executing command line:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-game/py27-game/work/pygame-1.9.1release" && /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 config.py --prefix=/opt/local 
Using Darwin configuration...

Hunting dependencies...
SDL     : found
FONT    : found
IMAGE   : found
MIXER   : found
SMPEG   : found
PNG     : found
JPEG    : found
SCRAP   : not found
PORTMIDI: found
Framework CoreMidi not found
[...]

Analysis

The Xcode framework handling MIDI is called CoreMIDI instead of CoreMidi, which is why it fails on case-sensitive file systems.

Workaround

The problem must ultimately be fixed upstream in the long run, but until pygame gets it sorted, we can use attached patch to correct the framework reference in config_darwin.py.

Attachments (1)

py27-game_MIDI-case.patch (1.2 KB) - added by cr@… 11 years ago.

Download all attachments as: .zip

Change History (5)

Changed 11 years ago by cr@…

Attachment: py27-game_MIDI-case.patch added

comment:1 Changed 11 years ago by cr@…

Cc: cr@… added

Cc Me!

comment:2 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: cr@… removed
Keywords: haspatch added
Owner: changed from macports-tickets@… to jmr@…

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

Port: py-game added; py27-game removed

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

Resolution: fixed
Status: newclosed

Thanks. r106220

Note: See TracTickets for help on using tickets.