summaryrefslogtreecommitdiff
path: root/Mac
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2004-12-27 15:51:03 +0000
committerJack Jansen <jack.jansen@cwi.nl>2004-12-27 15:51:03 +0000
commit43c92a13a024bc138ba179372bd7a2a748acc909 (patch)
treecac60a6e72467e999dd6266c68af77b192436c10 /Mac
parente3ce630dacb748a2b4a815e759af4ba1864eb458 (diff)
downloadcpython-43c92a13a024bc138ba179372bd7a2a748acc909.tar.gz
Fix for #1091468: DESTROOTed frameworkinstalls fail. Added a --destroot
option to various tools, and do the right thing when we're doing a destroot install. Will backport to 2.4 and 2.3.
Diffstat (limited to 'Mac')
-rw-r--r--Mac/OSX/Makefile9
-rw-r--r--Mac/scripts/BuildApplet.py10
2 files changed, 15 insertions, 4 deletions
diff --git a/Mac/OSX/Makefile b/Mac/OSX/Makefile
index b7791cb081..f4bedaee18 100644
--- a/Mac/OSX/Makefile
+++ b/Mac/OSX/Makefile
@@ -2,7 +2,7 @@
# main Makefile. The next couple of variables are overridden on the
# commandline in that case.
-VERSION=2.4
+VERSION=2.5
builddir = ../..
srcdir = ../..
prefix=/Library/Frameworks/Python.framework/Versions/$(VERSION)
@@ -120,10 +120,12 @@ install_IDE:
echo See Mac/OSX/README for details; \
else \
echo $(BUILDPYTHON) $(srcdir)/Mac/scripts/BuildApplet.py \
+ --destroot $(DESTDIR) \
--python $(INSTALLED_PYTHONW) \
--output $(DESTDIR)$(PYTHONAPPSDIR)/PythonIDE.app --noargv \
$(srcdir)/Mac/Tools/IDE/PythonIDE.py ; \
$(BUILDPYTHON) $(srcdir)/Mac/scripts/BuildApplet.py \
+ --destroot $(DESTDIR) \
--python $(INSTALLED_PYTHONW) \
--output $(DESTDIR)$(PYTHONAPPSDIR)/PythonIDE.app --noargv \
$(srcdir)/Mac/Tools/IDE/PythonIDE.py; \
@@ -136,6 +138,7 @@ install_PackageManager:
else \
echo $(BUILDPYTHON) $(bundlebuilder) \
--builddir $(DESTDIR)$(PYTHONAPPSDIR)/ \
+ --destroot $(DESTDIR) \
--python $(INSTALLED_PYTHONW) \
--resource $(srcdir)/Mac/Tools/IDE/PythonIDE.rsrc \
--mainprogram $(srcdir)/Mac/Tools/IDE/PackageManager.py \
@@ -143,6 +146,7 @@ install_PackageManager:
--creator Pimp build; \
$(BUILDPYTHON) $(bundlebuilder) \
--builddir $(DESTDIR)$(PYTHONAPPSDIR)/ \
+ --destroot $(DESTDIR) \
--python $(INSTALLED_PYTHONW) \
--resource $(srcdir)/Mac/Tools/IDE/PythonIDE.rsrc \
--mainprogram $(srcdir)/Mac/Tools/IDE/PackageManager.py \
@@ -157,11 +161,13 @@ install_IDLE:
else \
echo $(BUILDPYTHON) $(srcdir)/Mac/scripts/BuildApplet.py \
--python $(INSTALLED_PYTHONW) \
+ --destroot $(DESTDIR) \
--output $(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app \
--extra $(srcdir)/Lib/idlelib \
$(srcdir)/Tools/scripts/idle ; \
$(BUILDPYTHON) $(srcdir)/Mac/scripts/BuildApplet.py \
--python $(INSTALLED_PYTHONW) \
+ --destroot $(DESTDIR) \
--output $(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app \
--extra $(srcdir)/Lib/idlelib:Contents/Resources/idlelib \
$(srcdir)/Tools/scripts/idle ; \
@@ -170,6 +176,7 @@ install_IDLE:
install_BuildApplet:
$(BUILDPYTHON) $(srcdir)/Mac/scripts/BuildApplet.py \
+ --destroot $(DESTDIR) \
--python $(INSTALLED_PYTHONW) \
--output $(DESTDIR)$(PYTHONAPPSDIR)/BuildApplet.app \
$(srcdir)/Mac/scripts/BuildApplet.py
diff --git a/Mac/scripts/BuildApplet.py b/Mac/scripts/BuildApplet.py
index cb2aed87fd..756218f1ff 100644
--- a/Mac/scripts/BuildApplet.py
+++ b/Mac/scripts/BuildApplet.py
@@ -53,8 +53,8 @@ def buildapplet():
buildtools.process(template, filename, dstfilename, 1)
else:
- SHORTOPTS = "o:r:ne:v?P"
- LONGOPTS=("output=", "resource=", "noargv", "extra=", "verbose", "help", "python=")
+ SHORTOPTS = "o:r:ne:v?PR"
+ LONGOPTS=("output=", "resource=", "noargv", "extra=", "verbose", "help", "python=", "destroot=")
try:
options, args = getopt.getopt(sys.argv[1:], SHORTOPTS, LONGOPTS)
except getopt.error:
@@ -67,6 +67,7 @@ def buildapplet():
raw = 0
extras = []
verbose = None
+ destroot = ''
for opt, arg in options:
if opt in ('-o', '--output'):
dstfilename = arg
@@ -87,6 +88,8 @@ def buildapplet():
verbose = Verbose()
elif opt in ('-?', '--help'):
usage()
+ elif opt in ('-d', '--destroot'):
+ destroot = arg
# On OS9 always be verbose
if sys.platform == 'mac' and not verbose:
verbose = 'default'
@@ -97,7 +100,8 @@ def buildapplet():
buildtools.update(template, filename, dstfilename)
else:
buildtools.process(template, filename, dstfilename, 1,
- rsrcname=rsrcfilename, others=extras, raw=raw, progress=verbose)
+ rsrcname=rsrcfilename, others=extras, raw=raw,
+ progress=verbose, destroot=destroot)
def usage():
print "BuildApplet creates an application from a Python source file"