spe for Python 2.7?

Dave Curtis dave at dave-curtis.com
Thu Mar 22 23:46:40 PDT 2012


On Mar 22, 2012, at 6:05 PM, Lawrence Velázquez wrote:

> On Mar 22, 2012, at 7:41 p.m., Ryan Schmidt wrote:
> 
>> 
>> On Mar 22, 2012, at 18:34, Dave Curtis wrote:
>> 
>>> OK.  Agreement all around. Yay!
>>> 
>>> So... does that mean there *should* be py26-spe and py27-spe, etc, ports?
>> 
>> No. Spe is not a python module. Spe is a program that happens to use python. There is and should only be a single port called "spe".
>> 
> 
> 
> To clarify, you'll want to have one port called "spe" that has a variant for each version of Python  it can use (+python26, +python27, etc.).
> 


Since I'm just learning how to do this, I thought I'd try to make the minimal necessary changes to the existing portfile for spe 2.6 to see if I could get things going for 2.7.   I managed to achieve 'hello world' in spe, albeit with some annoying benign exceptions coming from something wx isn't finding. 

Diff's attached.  Summary:
1. Tweaked portgroup to python27
2. added supported_arches i386 because of wx dependency
3. changed py26-foo dependencies to py27-foo
4. tweaked call to python to use arch -i386, which was conveniently already being patched in the portfile.  This was moved to a post-patch to get out of the way of a new patchfile.
5. Added patchfiles command to overcome the fact that pychecker2 is not available in macports.  spe contains a fall-back version of the module, so I tweaked the installation to include the fallback version.

When SPE exists, 17 copies of this are printed to stderr:

Exception ImportError: 'No module named traceback' in <bound method WeakMethod.__onNotifyDeadObj of <wx.lib.pubsub.core.weakmethod.WeakMethod at 336293600; DEAD>> ignored

which looks like wx is not quite right, yet.  I'm guessing this comes during widget destruction or some such.

-dave

-------------- next part --------------
A non-text attachment was scrubbed...
Name: spe-Portfile.diff
Type: application/octet-stream
Size: 1115 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20120322/04906fa8/attachment.obj>
-------------- next part --------------
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-setup.py.diff
Type: application/octet-stream
Size: 752 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20120322/04906fa8/attachment-0001.obj>


More information about the macports-users mailing list