[Pythonmac-SIG] py2app DistUtilsPlatformError[Sec=Unclassified]

Ned Deily nad at acm.org
Thu Sep 24 06:00:42 CEST 2009


In article <20090923163646.GA26464 at panix.com>,
 Aahz <aahz at pythoncraft.com> wrote:
> On Wed, Sep 23, 2009, Christopher Barker wrote:
> > 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.
> 
> It's a setuptools thing.

I believe pyconfig.h is created by the compiler build ./configure script 
to capture the relevant platform-dependent build configuration for that 
python instance and is used by distutils build_ext so that package C 
extensions can be correctly built.

> > shutil.copy("/Library/Frameworks/Python.framework/Versions/2.5/include/pytho
> > n2.5/pyconfig.h",
> > "dist/%s.app/Contents/Resources/include/python2.5/pyconfig.h"%NAME)
> 
> My solution is to just copy it once to the installed Python 2.6.

I'm not a py2app user so I'm not sure I understand the problem you all 
are seeing.  Is it that pyconfig.h isn't being installed in 
/Library/Frameworks by a Python installer?

-- 
 Ned Deily,
 nad at acm.org



More information about the Pythonmac-SIG mailing list