[Pythonmac-SIG] py2app DistUtilsPlatformError[Sec=Unclassified]
Christopher Barker
Chris.Barker at noaa.gov
Wed Sep 23 18:21:26 CEST 2009
Aahz wrote:
> On Wed, Sep 23, 2009, mathew oakes wrote:
>>> DistutilsPlatformError: invalid Python installation: unable to
>>> open /Full/Path/To/App.app/Contents/Resources/include/python2.6/pyconfig.h (No such file or directory)
>> but python in in the bundle at .../Resources/lib/ and it doesn't have a
>> pyconfig header
>
> Ayup, you need to copy it from python2.5 -- pretty annoying.
Indeed. Does anyone know what pyconfig.h is used for? Is it a setuptools
thing? py2app was written before setuptools, and I've found most of what
I've had to do by hand was due to egg issues.
Here's my code for this:
def AddMacExtras(NAME):
# post processing:
print "Adding extra stuff"
if "-A"in sys.argv:
print "Building an Alias -- not copying everything"
else:
## ugly hard coding of paths!
print "adding the pyconfig header"
shutil.copy("/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/pyconfig.h",
"dist/%s.app/Contents/Resources/include/python2.5/pyconfig.h"%NAME)
HTH,
-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
Chris.Barker at noaa.gov
More information about the Pythonmac-SIG
mailing list