summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNed Deily <nad@acm.org>2013-11-22 06:42:25 (GMT)
committerNed Deily <nad@acm.org>2013-11-22 06:42:25 (GMT)
commitb8f944f0b76ebfeecb181498868f10b273981668 (patch)
treea818ddc5a97ce0095936b9aebc1da0559f24afb5
parentc06d6fdc37a70c28feaac60b06047b9f6357c05f (diff)
downloadcpython-b8f944f0b76ebfeecb181498868f10b273981668.zip
cpython-b8f944f0b76ebfeecb181498868f10b273981668.tar.gz
cpython-b8f944f0b76ebfeecb181498868f10b273981668.tar.bz2
Issue #19649: On OS X, the same set of file names are now installed
in bin directories for all configurations: non-framework vs framework, and single arch vs universal builds. pythonx.y-32 is now always installed for 64-bit/32-bit universal builds. The obsolete and undocumented pythonw* symlinks are no longer installed anywhere.
-rw-r--r--Mac/Makefile.in107
-rw-r--r--Makefile.pre.in35
-rw-r--r--Misc/NEWS6
-rwxr-xr-xconfigure5
-rw-r--r--configure.ac4
5 files changed, 116 insertions, 41 deletions
diff --git a/Mac/Makefile.in b/Mac/Makefile.in
index 5cb664d..c40ad1a 100644
--- a/Mac/Makefile.in
+++ b/Mac/Makefile.in
@@ -3,9 +3,12 @@
# commandline in that case.
VERSION=@VERSION@
+ABIFLAGS=@ABIFLAGS@
+LDVERSION=@LDVERSION@
builddir = ..
srcdir=@srcdir@
prefix=@prefix@
+exec_prefix=@exec_prefix@
LIBDEST=$(prefix)/lib/python$(VERSION)
RUNSHARED=@RUNSHARED@
BUILDEXE=@BUILDEXEEXT@
@@ -23,7 +26,7 @@ export MACOSX_DEPLOYMENT_TARGET
# These are normally glimpsed from the previous set
-bindir=$(prefix)/bin
+BINDIR= @bindir@
PYTHONAPPSDIR=@FRAMEWORKINSTALLAPPSPREFIX@/$(PYTHONFRAMEWORK) $(VERSION)
APPINSTALLDIR=$(prefix)/Resources/Python.app
@@ -46,19 +49,7 @@ APPTEMPLATE=$(srcdir)/Resources/app
APPSUBDIRS=MacOS Resources
compileall=$(srcdir)/../Lib/compileall.py
-installapps: install_Python install_pythonw install_PythonLauncher install_IDLE
-
-install_pythonw: pythonw
- $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw "$(DESTDIR)$(prefix)/bin/pythonw$(VERSION)"
- $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw "$(DESTDIR)$(prefix)/bin/python$(VERSION)"
- ln -sf python$(VERSION) "$(DESTDIR)$(prefix)/bin/python3"
- ln -sf pythonw$(VERSION) "$(DESTDIR)$(prefix)/bin/pythonw3"
-ifneq ($(LIPO_32BIT_FLAGS),)
- lipo $(LIPO_32BIT_FLAGS) -output $(DESTDIR)$(prefix)/bin/python$(VERSION)-32 pythonw
- lipo $(LIPO_32BIT_FLAGS) -output $(DESTDIR)$(prefix)/bin/pythonw$(VERSION)-32 pythonw
- ln -sf pythonw$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/pythonw3-32"
- ln -sf python$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/python3-32"
-endif
+installapps: install_Python install_PythonLauncher install_IDLE
#
# Install unix tools in /usr/local/bin. These are just aliases for the
@@ -68,21 +59,39 @@ installunixtools:
if [ ! -d "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" ]; then \
$(INSTALL) -d -m $(DIRMODE) "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" ;\
fi
- for fn in python3 pythonw3 idle3 pydoc3 python3-config \
- python$(VERSION) pythonw$(VERSION) idle$(VERSION) \
- pydoc$(VERSION) python$(VERSION)-config 2to3 \
- 2to3-$(VERSION) pyvenv pyvenv-$(VERSION) ;\
- do \
- ln -fs "$(prefix)/bin/$${fn}" "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin/$${fn}" ;\
- done
-ifneq ($(LIPO_32BIT_FLAGS),)
- for fn in python3-32 pythonw3-32 \
- python$(VERSION)-32 pythonw$(VERSION)-32 ;\
+ cd "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" && \
+ for fn in \
+ 2to3 \
+ idle3 \
+ pydoc3 \
+ python3 \
+ python3-config \
+ pyvenv \
+ ; \
do \
- ln -fs "$(prefix)/bin/$${fn}" "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin/$${fn}" ;\
+ rm -f $${fn} ; \
+ $(LN) -s $(BINDIR)/$${fn} $${fn} ;\
done
-endif
-
+ -if test "x$(VERSION)" != "x$(LDVERSION)"; then \
+ cd "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" && \
+ for fn in \
+ python$(VERSION)-config \
+ ; \
+ do \
+ rm -f $${fn} ;\
+ $(LN) -s $(BINDIR)/$${fn} $${fn} ;\
+ done ;\
+ fi
+ -if test "x$(LIPO_32BIT_FLAGS)" != "x"; then \
+ cd "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" && \
+ for fn in \
+ python3-32 \
+ ; \
+ do \
+ rm -f $${fn} ;\
+ $(LN) -s $(BINDIR)/$${fn} $${fn} ;\
+ done ;\
+ fi
#
# Like installunixtools, but only install links to the versioned binaries.
@@ -91,20 +100,44 @@ altinstallunixtools:
if [ ! -d "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" ]; then \
$(INSTALL) -d -m $(DIRMODE) "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" ;\
fi
- for fn in python$(VERSION) pythonw$(VERSION) idle$(VERSION) \
- pydoc$(VERSION) python$(VERSION)-config 2to3-$(VERSION) pyvenv-$(VERSION) ;\
- do \
- ln -fs "$(prefix)/bin/$${fn}" "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin/$${fn}" ;\
- done
-ifneq ($(LIPO_32BIT_FLAGS),)
- for fn in python$(VERSION)-32 pythonw$(VERSION)-32 ;\
+ cd "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" && \
+ for fn in \
+ 2to3-$(VERSION) \
+ idle$(VERSION) \
+ pydoc$(VERSION) \
+ python$(VERSION) \
+ python$(LDVERSION)-config \
+ pyvenv-$(VERSION) \
+ ; \
do \
- ln -fs "$(prefix)/bin/$${fn}" "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin/$${fn}" ;\
+ rm -f $${fn} ;\
+ $(LN) -s $(BINDIR)/$${fn} $${fn} ;\
done
-endif
+ -if test "x$(VERSION)" != "x$(LDVERSION)"; then \
+ cd "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" && \
+ for fn in \
+ python$(LDVERSION) \
+ ; \
+ do \
+ rm -f $${fn} ;\
+ $(LN) -s $(BINDIR)/$${fn} $${fn} ;\
+ done ;\
+ fi
+ -if test "x$(LIPO_32BIT_FLAGS)" != "x"; then \
+ cd "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" && \
+ for fn in \
+ python$(VERSION)-32 \
+ ; \
+ do \
+ rm -f $${fn} ;\
+ $(LN) -s $(BINDIR)/$${fn} $${fn} ;\
+ done ;\
+ fi
pythonw: $(srcdir)/Tools/pythonw.c Makefile
- $(CC) $(LDFLAGS) -DPYTHONFRAMEWORK='"$(PYTHONFRAMEWORK)"' -o $@ $(srcdir)/Tools/pythonw.c -I.. -I$(srcdir)/../Include ../$(PYTHONFRAMEWORK).framework/Versions/$(VERSION)/$(PYTHONFRAMEWORK)
+ $(CC) $(LDFLAGS) -DPYTHONFRAMEWORK='"$(PYTHONFRAMEWORK)"' -o $@ \
+ $(srcdir)/Tools/pythonw.c -I.. -I$(srcdir)/../Include \
+ ../$(PYTHONFRAMEWORK).framework/Versions/$(VERSION)/$(PYTHONFRAMEWORK)
install_PythonLauncher:
cd PythonLauncher && make install DESTDIR=$(DESTDIR)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 33f6f86..0e75bbe 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -148,6 +148,12 @@ PYTHONFRAMEWORKINSTALLDIR= @PYTHONFRAMEWORKINSTALLDIR@
MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@
@EXPORT_MACOSX_DEPLOYMENT_TARGET@export MACOSX_DEPLOYMENT_TARGET
+# Option to install to strip binaries
+STRIPFLAG=-s
+
+# Flags to lipo to produce a 32-bit-only universal executable
+LIPO_32BIT_FLAGS=@LIPO_32BIT_FLAGS@
+
# Options to enable prebinding (for fast startup prior to Mac OS X 10.3)
OTHER_LIBTOOL_OPT=@OTHER_LIBTOOL_OPT@
@@ -955,7 +961,7 @@ quicktest: all platform
$(TESTRUNNER) $(QUICKTESTOPTS)
-install: altinstall bininstall maninstall
+install: @FRAMEWORKINSTALLFIRST@ altinstall bininstall maninstall @FRAMEWORKINSTALLLAST@
altinstall: @FRAMEWORKALTINSTALLFIRST@ altbininstall libinstall inclinstall libainstall \
sharedinstall oldsharedinstall altmaninstall @FRAMEWORKALTINSTALLLAST@
@@ -983,7 +989,7 @@ $(DESTSHARED):
# Install the interpreter with $(VERSION) affixed
# This goes into $(exec_prefix)
-altbininstall: $(BUILDPYTHON)
+altbininstall: $(BUILDPYTHON) @FRAMEWORKPYTHONW@
@for i in $(BINDIR) $(LIBDIR); \
do \
if test ! -d $(DESTDIR)$$i; then \
@@ -992,7 +998,11 @@ altbininstall: $(BUILDPYTHON)
else true; \
fi; \
done
- $(INSTALL_PROGRAM) $(BUILDPYTHON) $(DESTDIR)$(BINDIR)/python$(LDVERSION)$(EXE)
+ if test "$(PYTHONFRAMEWORKDIR)" = "no-framework" ; then \
+ $(INSTALL_PROGRAM) $(BUILDPYTHON) $(DESTDIR)$(BINDIR)/python$(LDVERSION)$(EXE); \
+ else \
+ $(INSTALL_PROGRAM) $(STRIPFLAG) Mac/pythonw $(DESTDIR)$(BINDIR)/python$(LDVERSION)$(EXE); \
+ fi
-if test "$(VERSION)" != "$(LDVERSION)"; then \
if test -f $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE) -o -h $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE); \
then rm -f $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE); \
@@ -1013,6 +1023,12 @@ altbininstall: $(BUILDPYTHON)
fi; \
else true; \
fi
+ if test "x$(LIPO_32BIT_FLAGS)" != "x" ; then \
+ rm -f $(DESTDIR)$(BINDIR)python$(VERSION)-32$(EXE); \
+ lipo $(LIPO_32BIT_FLAGS) \
+ -output $(DESTDIR)$(BINDIR)/python$(VERSION)-32$(EXE) \
+ $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE); \
+ fi
bininstall: altbininstall
-if test -f $(DESTDIR)$(BINDIR)/python3$(EXE) -o -h $(DESTDIR)$(BINDIR)/python3$(EXE); \
@@ -1038,6 +1054,10 @@ bininstall: altbininstall
(cd $(DESTDIR)$(BINDIR); $(LN) -s 2to3-$(VERSION) 2to3)
-rm -f $(DESTDIR)$(BINDIR)/pyvenv
(cd $(DESTDIR)$(BINDIR); $(LN) -s pyvenv-$(VERSION) pyvenv)
+ if test "x$(LIPO_32BIT_FLAGS)" != "x" ; then \
+ rm -f $(DESTDIR)$(BINDIR)/python3-32$(EXE); \
+ (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-32$(EXE) python3-32$(EXE)) \
+ fi
# Install the versioned manual page
altmaninstall:
@@ -1364,7 +1384,14 @@ frameworkinstallmaclib:
frameworkinstallapps:
cd Mac && $(MAKE) installapps DESTDIR="$(DESTDIR)"
-# This install the unix python and pythonw tools in /usr/local/bin
+# Build the bootstrap executable that will spawn the interpreter inside
+# an app bundle within the framework. This allows the interpreter to
+# run OS X GUI APIs.
+frameworkpythonw:
+ cd Mac && $(MAKE) pythonw
+
+# This installs the python* and other bin symlinks in $prefix/bin or in
+# a bin directory relative to the framework root
frameworkinstallunixtools:
cd Mac && $(MAKE) installunixtools DESTDIR="$(DESTDIR)"
diff --git a/Misc/NEWS b/Misc/NEWS
index b5916f4..6d453fe 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -357,6 +357,12 @@ Build
- Issue #19373: Apply upstream change to Tk 8.5.15 fixing OS X 10.9
screen refresh problem for OS X installer build.
+- Issue #19649: On OS X, the same set of file names are now installed
+ in bin directories for all configurations: non-framework vs framework,
+ and single arch vs universal builds. pythonx.y-32 is now always
+ installed for 64-bit/32-bit universal builds. The obsolete and
+ undocumented pythonw* symlinks are no longer installed anywhere.
+
Tools/Demos
-----------
diff --git a/configure b/configure
index cb01b74..b40058a 100755
--- a/configure
+++ b/configure
@@ -712,6 +712,7 @@ _PYTHON_HOST_PLATFORM
MACHDEP
FRAMEWORKINSTALLAPPSPREFIX
FRAMEWORKUNIXTOOLSPREFIX
+FRAMEWORKPYTHONW
FRAMEWORKALTINSTALLLAST
FRAMEWORKALTINSTALLFIRST
FRAMEWORKINSTALLLAST
@@ -3152,6 +3153,7 @@ if test "${enable_framework+set}" = set; then :
FRAMEWORKINSTALLLAST=
FRAMEWORKALTINSTALLFIRST=
FRAMEWORKALTINSTALLLAST=
+ FRAMEWORKPYTHONW=
if test "x${prefix}" = "xNONE"; then
FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
else
@@ -3166,6 +3168,7 @@ if test "${enable_framework+set}" = set; then :
FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
+ FRAMEWORKPYTHONW="frameworkpythonw"
FRAMEWORKINSTALLAPPSPREFIX="/Applications"
if test "x${prefix}" = "xNONE" ; then
@@ -3233,6 +3236,7 @@ else
FRAMEWORKINSTALLLAST=
FRAMEWORKALTINSTALLFIRST=
FRAMEWORKALTINSTALLLAST=
+ FRAMEWORKPYTHONW=
if test "x${prefix}" = "xNONE" ; then
FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
else
@@ -3255,6 +3259,7 @@ fi
+
##AC_ARG_WITH(dyld,
## AS_HELP_STRING([--with-dyld],
## [Use (OpenStep|Rhapsody) dynamic linker]))
diff --git a/configure.ac b/configure.ac
index 5ba7d03..02f481e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -250,6 +250,7 @@ AC_ARG_ENABLE(framework,
FRAMEWORKINSTALLLAST=
FRAMEWORKALTINSTALLFIRST=
FRAMEWORKALTINSTALLLAST=
+ FRAMEWORKPYTHONW=
if test "x${prefix}" = "xNONE"; then
FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
else
@@ -264,6 +265,7 @@ AC_ARG_ENABLE(framework,
FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
+ FRAMEWORKPYTHONW="frameworkpythonw"
FRAMEWORKINSTALLAPPSPREFIX="/Applications"
if test "x${prefix}" = "xNONE" ; then
@@ -325,6 +327,7 @@ AC_ARG_ENABLE(framework,
FRAMEWORKINSTALLLAST=
FRAMEWORKALTINSTALLFIRST=
FRAMEWORKALTINSTALLLAST=
+ FRAMEWORKPYTHONW=
if test "x${prefix}" = "xNONE" ; then
FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
else
@@ -342,6 +345,7 @@ AC_SUBST(FRAMEWORKINSTALLFIRST)
AC_SUBST(FRAMEWORKINSTALLLAST)
AC_SUBST(FRAMEWORKALTINSTALLFIRST)
AC_SUBST(FRAMEWORKALTINSTALLLAST)
+AC_SUBST(FRAMEWORKPYTHONW)
AC_SUBST(FRAMEWORKUNIXTOOLSPREFIX)
AC_SUBST(FRAMEWORKINSTALLAPPSPREFIX)