Re: [Pythonmac-SIG] suggestions for an appscript FAQ

2008-03-26 Thread Jeremy Reichman
I just found out about appscript, and one of my early questions is "can I
install it as a universal binary?" If I can't do that, my next question is
"can I install it for both architectures simultaneously, on either PowerPC
or Intel?" (I happen to do sys admin and would like to install it once for
both architectures if possible.)


-- 
Jeremy


___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


[Pythonmac-SIG] py2app and matplotlib

2008-03-26 Thread Christopher Barker

Hi all,

I'm having trouble getting py2app to work with matplotlib. There is a 
matplotlib recipe, but it's out of date, and some things have changed.


The first error I got was not being able to find pytz.zoneinfo. As 
that's in a different place now, I commented it out of the matplotlib.py 
recipe.


However, now I'm getting an error that I don't even know how to begin to 
solve:


...

  File "build/bdist.macosx-10.3-fat/egg/macholib/MachO.py", line 106, 
in load_header

hdr = MachOHeader(self, fh, offset, size, magic, hdr, endian)
  File "build/bdist.macosx-10.3-fat/egg/macholib/MachO.py", line 146, 
in __init__

self.load(fh)
  File "build/bdist.macosx-10.3-fat/egg/macholib/MachO.py", line 178, 
in load

raise ValueError("Unknown load command: %d" % (cmd_load.cmd,))
ValueError: Unknown load command: 27
> 
/Users/cbarker/HAZMAT/SmallToolsSVN/phCalculator/trunk/build/bdist.macosx-10.3-fat/egg/macholib/MachO.py(178)load()


Enclosed is about the simplest matplotlib script, and a test_setup 
script to py2app it -- anyone have any ideas?


-Chris




--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

[EMAIL PROTECTED]
#!/usr/bin/env python
"""
simple test for MPL and py2app
"""

import matplotlib

import pylab

pylab.plot((1,2,3,4,5,6,7), (5,3,6,8,4,6,3))

pylab.show()

#!/usr/bin/env python2.5
"""
Script to build an app bundle from the pH wxPython application on OS-X 10.4

% python setup.py py2app

"""
from setuptools import setup

Plist={}

APP = ['test.py']
DATA_FILES = []
OPTIONS = {'argv_emulation': False, # this puts the names of dropped files into sys.argv when starting the app. 
   'plist': Plist, 
   }


setup(
app=APP,
data_files=DATA_FILES,
version='1e-6',
description="pH calculator",
author="Christopher Barker",
author_email="[EMAIL PROTECTED]",
options={'py2app': OPTIONS},
setup_requires=['py2app'],
)

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig