Skip to content

Commit 0cd0e65

Browse files
committed
Added target "installunixprograms" which installs python and pythonw in
/usr/local/bin (referring to the framework-based interpreter and Python.app). Added target symlinkmacsubtree to aid in debugging.
1 parent ab10ce6 commit 0cd0e65

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

Mac/OSX/Makefile

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,19 @@ PYTHONBUILDDIR=../..
22
INSTALLDIR=/Library/Frameworks/Python.framework/Versions/Current
33
APPINSTALLDIR=/Applications/Python.app
44

5+
# Variables for installing the "normal" unix binaries
6+
UNIXBINDIR=/usr/local/bin
7+
INSTALLED_PYTHON=$(INSTALLDIR)/bin/python
8+
INSTALLED_PYTHONW=$(APPINSTALLDIR)/Contents/MacOS/python
9+
510
# Items more-or-less copied from the main Makefile
611
DIRMODE=755
712
INSTALL=/usr/bin/install -c
13+
INSTALL_SYMLINK=/usr/bin/install -l as
814
INSTALL_PROGRAM=${INSTALL}
915
INSTALL_SCRIPT= ${INSTALL_PROGRAM}
1016
INSTALL_DATA= ${INSTALL} -m 644
17+
STRIPFLAG=-s
1118
OPT=-g -O3 -Wall -Wstrict-prototypes -no-cpp-precomp -fno-common -dynamic
1219
INCLUDES=-I$(PYTHONBUILDDIR) -I$(PYTHONBUILDDIR)/Include \
1320
-I$(PYTHONBUILDDIR)/Mac/Include
@@ -71,7 +78,7 @@ install: pythonforbundle
7178
esac; \
7279
done; \
7380
done
74-
$(INSTALL_PROGRAM) pythonforbundle $(APPINSTALLDIR)/Contents/MacOS/python
81+
$(INSTALL_PROGRAM) $(STRIPFLAG) pythonforbundle $(APPINSTALLDIR)/Contents/MacOS/python
7582
# Create a temporary version of the resources here
7683
$(PYTHON) $(RFCONVERTER) -r $(RESOURCEDIR)/dialogs.rsrc dialogs.rsrc
7784
$(PYTHON) $(RFCONVERTER) -r $(RESOURCEDIR)/errors.rsrc errors.rsrc
@@ -179,5 +186,18 @@ installmacsubtree:
179186
done
180187

181188
@echo '** Copy the contents of sample_sitecustomize.py (or similar code) into'
182-
@echo '**' $(INSTALLDIR)/lib/python2.2/sitecustomize.py
189+
@echo '**' $(INSTALLDIR)/lib/python2.3/sitecustomize.py
190+
191+
# Put symlinks "python" and "pythonw" in the standard place
192+
installunixprograms: $(INSTALLED_PYTHON) pythonw.sh
193+
$(INSTALL) -d $(UNIXBINDIR)
194+
$(INSTALL_SYMLINK) $(INSTALLED_PYTHON) $(UNIXBINDIR)/python
195+
$(INSTALL) pythonw.sh $(UNIXBINDIR)/pythonw
183196

197+
# This is for development purposes: put a symlink to the Mac source subtree in the
198+
# framework
199+
symlinkmacsubtree:
200+
ln -sf `cd $(PYTHONBUILDDIR)/Mac; pwd` $(INSTALLDIR)/Mac
201+
202+
@echo '** Copy the contents of sample_sitecustomize.py (or similar code) into'
203+
@echo '**' $(INSTALLDIR)/lib/python2.3/sitecustomize.py

0 commit comments

Comments
 (0)