diff options
author | Ronald Oussoren <ronaldoussoren@mac.com> | 2006-05-14 19:56:34 (GMT) |
---|---|---|
committer | Ronald Oussoren <ronaldoussoren@mac.com> | 2006-05-14 19:56:34 (GMT) |
commit | 836b039b7cbcf99dd0864dcdffa30ef66a81d819 (patch) | |
tree | 840c0b4da42ed45831769fff68b9040fdf910f87 /Lib | |
parent | 375f06b1755b712dcb1868fb32ee86dd317552f5 (diff) | |
download | cpython-836b039b7cbcf99dd0864dcdffa30ef66a81d819.zip cpython-836b039b7cbcf99dd0864dcdffa30ef66a81d819.tar.gz cpython-836b039b7cbcf99dd0864dcdffa30ef66a81d819.tar.bz2 |
Rework the build system for osx applications:
* Don't use xcodebuild for building PythonLauncher, but use a normal unix
makefile. This makes it a lot easier to use the same build flags as for the
rest of python (e.g. make a universal version of python launcher)
* Convert the mac makefile-s to makefile.in-s and use configure to set makefile
variables instead of forwarding them as command-line arguments
* Add a C version of pythonw, that we you can use '#!/usr/local/bin/pythonw'
* Build IDLE.app using bundlebuilder instead of BuildApplet, that will allow
easier modification of the bundle contents later on.
Diffstat (limited to 'Lib')
-rwxr-xr-x | Lib/plat-mac/bundlebuilder.py | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/Lib/plat-mac/bundlebuilder.py b/Lib/plat-mac/bundlebuilder.py index 03d8c81..aac92bd 100755 --- a/Lib/plat-mac/bundlebuilder.py +++ b/Lib/plat-mac/bundlebuilder.py @@ -145,11 +145,24 @@ class BundleBuilder(Defaults): self.message("Building %s" % repr(self.bundlepath), 1) if os.path.exists(self.bundlepath): shutil.rmtree(self.bundlepath) - os.mkdir(self.bundlepath) - self.preProcess() - self._copyFiles() - self._addMetaFiles() - self.postProcess() + if os.path.exists(self.bundlepath + '~'): + shutil.rmtree(self.bundlepath + '~') + bp = self.bundlepath + + # Create the app bundle in a temporary location and then + # rename the completed bundle. This way the Finder will + # never see an incomplete bundle (where it might pick up + # and cache the wrong meta data) + self.bundlepath = bp + '~' + try: + os.mkdir(self.bundlepath) + self.preProcess() + self._copyFiles() + self._addMetaFiles() + self.postProcess() + os.rename(self.bundlepath, bp) + finally: + self.bundlepath = bp self.message("Done.", 1) def preProcess(self): |