[Pythonmac-SIG] StandAlone Python Application Does not Release Python

Bob Swerdlow rswerdlow at transpose.com
Sat Aug 21 16:38:50 CEST 2004


The only "out of the ordinary" setup stuff I do has to do with building in
standalone with optimized code.  We do use popen2 and start other processes,
but I can see that they have all terminated when the application is stopped.

In the build, we found that site.py was not pointing to the standalone
files, so our build process goes this way (the app name is Goombah):

1. python
buildapp.py --standalone --package=encodings --package=_strptime --package=u
rllib2 build
2. save site.pyc to another location
3. python -OO
buildapp.py --standalone --strip --package=encodings --package=_strptime --p
ackage=urllib2 build
4. copy site.pyc into Goombah.Contents/Resources

For completeness, here's the bundle definition:

infoPlist = Plist(
    CFBundleDevelopmentRegion='English',
    CFBundleGetInfoString='Goombah ' + COOLTUNES_VERSION,
    CFBundleHelpBookFolder='Goombah Help',
    CFBundleHelpBookName='Goombah Help',
    CFBundleIconFile='Goombah.icns',
    CFBundleIdentifier='com.transpose.goombah',
    CFBundleInfoDictionaryVersion='6.0',
    CFBundleName='Goombah',
    CFBundlePackageType='APPL',
    CFBundleShortVersionString='BETA TESTING',
    CFBundleSignature='GMBH',
    CFBundleVersion=COOLTUNES_VERSION,

    NSHumanReadableCopyright='Copyright 2001-2004 Transpose, LLC\nAll rights
res
erved.',
    NSMainNibFile='MainMenu',
    NSPrincipalClass='NSApplication'
)

buildapp(
    name = "Goombah",
    mainprogram = "cooltunesmain" + ".py",
    resources = ["MainMenu.nib", "MacPleaseWaitDialog.nib",
"MacProgressDialog.nib"] + \
                creditDocs + helpDocs + iconFiles + \
                getblogurlSrcs + libchangesSrcs + macuiSrcs + pyclientSrcs +
termsDocs,
    nibname = "MainMenu",
    plist = infoPlist
)

----- Original Message ----- 
From: "Jack Jansen" <Jack.Jansen at cwi.nl>
To: "Bob Ippolito" <bob at redivi.com>
Cc: "Bob Swerdlow" <rswerdlow at transpose.com>; <pythonmac-sig at python.org>;
"Gary Robinson" <grobinson at transpose.com>
Sent: Saturday, August 21, 2004 3:52 AM
Subject: Re: [Pythonmac-SIG] StandAlone Python Application Does not Release
Python


>
> On 20 Aug 2004, at 23:44, Bob Ippolito wrote:
>
> >
> > On Aug 20, 2004, at 5:24 PM, Bob Swerdlow wrote:
> >
> >> I'm building a stand-alone Python application using PyObjC 1.1 and
> >> Python
> >> 2.3 on Panther.  We've run into a problem: when we make a new
> >> release, the
> >> users find that they cannot copy it over the old release, even after
> >> they
> >> have quit the application - the Finder reports "The operation cannot
> >> be
> >> completed because the item 'Python' is in use."
> >
> > I think this has something to do with the fact that bundlebuilder uses
> > a script stub that is execve'd.  You should try using the PyObjC Xcode
> > template until there is a release of py2app or bundlebuilder2 that
> > uses a proper executable stub.
>
> BobI,
> could you explain, please? Someone else reported a similar problem
> (with Idle, I think?) where he/she also couldn't remove Python because
> it was in use, about half a year ago. At that time we never found out
> what the problem was...
>
> And, BobS, is there anything in your setup that could be considered out
> of the ordinary? Such as not running on HFS+ or over a network, or
> anything else you can think of?
> --
> Jack Jansen, <Jack.Jansen at cwi.nl>, http://www.cwi.nl/~jack
> If I can't dance I don't want to be part of your revolution -- Emma
> Goldman
>
>




More information about the Pythonmac-SIG mailing list