@@ -48,12 +48,42 @@ compileall=$(srcdir)/../Lib/compileall.py
48
48
installapps : install_PythonLauncher install_IDLE checkapplepython install_pythonw \
49
49
install_versionedtools
50
50
51
+ installapps4way : install_Python4way install_BuildApplet install_PythonLauncher install_IDLE install_pythonw4way install_versionedtools
52
+
53
+
51
54
install_pythonw : pythonw
52
55
$(INSTALL_PROGRAM ) $(STRIPFLAG ) pythonw " $( DESTDIR) $( prefix) /bin/pythonw$( VERSION) "
53
56
$(INSTALL_PROGRAM ) $(STRIPFLAG ) pythonw " $( DESTDIR) $( prefix) /bin/python$( VERSION) "
54
57
ln -sf python$(VERSION ) " $( DESTDIR) $( prefix) /bin/python"
55
58
ln -sf pythonw$(VERSION ) " $( DESTDIR) $( prefix) /bin/pythonw"
56
59
60
+
61
+ # Install 3 variants of python/pythonw:
62
+ # - 32-bit (i386 and ppc)
63
+ # - 64-bit (x86_64 and ppc64)
64
+ # - all (all four architectures)
65
+ # - Make 'python' and 'pythonw' aliases for the 32-bit variant
66
+ install_pythonw4way : pythonw-32 pythonw-64 pythonw
67
+ $(INSTALL_PROGRAM ) $(STRIPFLAG ) pythonw-64 " $( DESTDIR) $( prefix) /bin/pythonw$( VERSION) -64"
68
+ $(INSTALL_PROGRAM ) $(STRIPFLAG ) pythonw-64 " $( DESTDIR) $( prefix) /bin/python$( VERSION) -64"
69
+ ln -sf python$(VERSION ) -64 " $( DESTDIR) $( prefix) /bin/python-64"
70
+ ln -sf pythonw$(VERSION ) -64 " $( DESTDIR) $( prefix) /bin/pythonw-64"
71
+
72
+ $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw-32 "$(DESTDIR)$(prefix)/bin/pythonw$(VERSION)-32"
73
+ $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw-32 "$(DESTDIR)$(prefix)/bin/python$(VERSION)-32"
74
+ ln -sf python$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/python-32"
75
+ ln -sf pythonw$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/pythonw-32"
76
+
77
+ $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw "$(DESTDIR)$(prefix)/bin/pythonw$(VERSION)-all"
78
+ $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw "$(DESTDIR)$(prefix)/bin/python$(VERSION)-all"
79
+ ln -sf python$(VERSION)-all "$(DESTDIR)$(prefix)/bin/python-all"
80
+ ln -sf pythonw$(VERSION)-all "$(DESTDIR)$(prefix)/bin/pythonw-all"
81
+
82
+ ln -sf pythonw$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/pythonw$(VERSION)"
83
+ ln -sf python$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/python$(VERSION)"
84
+ ln -sf pythonw$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/pythonw"
85
+ ln -sf python$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/python"
86
+
57
87
#
58
88
# Install unix tools in /usr/local/bin. These are just aliases for the
59
89
# actual installation inside the framework.
@@ -64,11 +94,16 @@ installunixtools:
64
94
fi
65
95
for fn in python pythonw idle pydoc python-config smtpd.py \
66
96
python$(VERSION ) pythonw$(VERSION ) idle$(VERSION ) \
67
- pydoc$(VERSION ) python-config $(VERSION ) smtpd$(VERSION ) .py ; \
97
+ pydoc$(VERSION ) python$(VERSION ) -config smtpd$(VERSION ) .py ; \
68
98
do \
69
99
ln -fs " $( prefix) /bin/$$ {fn}" " $( DESTDIR) $( FRAMEWORKUNIXTOOLSPREFIX) /bin/$$ {fn}" ; \
70
100
done
71
101
102
+
103
+ # TODO: install symlinks for -32, -64 and -all as well
104
+ installunixtools4way : installunixtools
105
+
106
+
72
107
#
73
108
# Like installunixtools, but only install links to the versioned binaries.
74
109
#
@@ -77,25 +112,31 @@ altinstallunixtools:
77
112
$(INSTALL ) -d -m $(DIRMODE ) " $( DESTDIR) $( FRAMEWORKUNIXTOOLSPREFIX) /bin" ; \
78
113
fi
79
114
for fn in python$( VERSION) pythonw$( VERSION) idle$( VERSION) \
80
- pydoc$(VERSION ) python-config $(VERSION ) smtpd$(VERSION ) .py ; \
115
+ pydoc$(VERSION ) python$(VERSION ) -config ) smtpd$(VERSION ) .py ; \
81
116
do \
82
117
ln -fs " $( prefix) /bin/$$ {fn}" " $( DESTDIR) $( FRAMEWORKUNIXTOOLSPREFIX) /bin/$$ {fn}" ; \
83
118
done
84
119
120
+ # TODO: -32, -64 and -all variants
121
+ altinstallunixtools4way : altinstallunixtools
85
122
86
123
# By default most tools are installed without a version in their basename, to
87
124
# make it easier to install (and use) several python versions side-by-side move
88
125
# the tools to a version-specific name and add the non-versioned name as an
89
126
# alias.
90
127
install_versionedtools :
91
- for fn in idle pydoc python-config ; \
128
+ for fn in idle pydoc ; \
92
129
do \
93
130
if [ -h " $( DESTDIR) $( prefix) /bin/$$ {fn}" ]; then \
94
131
continue ; \
95
132
fi ; \
96
133
mv " $( DESTDIR) $( prefix) /bin/$$ {fn}" " $( DESTDIR) $( prefix) /bin/$$ {fn}$( VERSION) " ; \
97
134
ln -sf " $$ {fn}$( VERSION) " " $( DESTDIR) $( prefix) /bin/$$ {fn}" ; \
98
135
done
136
+ if [ ! -h " $( DESTDIR) $( prefix) /bin/python-config" ]; then \
137
+ mv " $( DESTDIR) $( prefix) /bin/python-config" " $( DESTDIR) $( prefix) /bin/python$( VERSION) -config" ; \
138
+ ln -sf " python$( VERSION) -config" " $( DESTDIR) $( prefix) /bin/python-config" ; \
139
+ fi
99
140
if [ ! -h " $( DESTDIR) $( prefix) /bin/smtpd.py" ]; then \
100
141
mv " $( DESTDIR) $( prefix) /bin/smtpd.py" " $( DESTDIR) $( prefix) /bin/smtpd$( VERSION) .py" ; \
101
142
ln -sf " smtpd$( VERSION) .py" " $( DESTDIR) $( prefix) /bin/smtpd.py" ; \
@@ -106,6 +147,13 @@ pythonw: $(srcdir)/Tools/pythonw.c Makefile
106
147
$(CC ) $(LDFLAGS ) -o $@ $(srcdir ) /Tools/pythonw.c \
107
148
-DPYTHONWEXECUTABLE=' "$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)"'
108
149
150
+ pythonw-32 : $(srcdir ) /Tools/pythonw.c Makefile
151
+ $(CC ) $(LDFLAGS ) -o $@ -arch i386 -arch ppc $(srcdir ) /Tools/pythonw.c \
152
+ -DPYTHONWEXECUTABLE=' "$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)-32"'
153
+
154
+ pythonw-64 : $(srcdir ) /Tools/pythonw.c Makefile
155
+ $(CC ) $(LDFLAGS ) -o $@ -arch x86_64 -arch ppc64 $(srcdir ) /Tools/pythonw.c \
156
+ -DPYTHONWEXECUTABLE=' "$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)-64"'
109
157
110
158
install_PythonLauncher :
111
159
cd PythonLauncher && make install DESTDIR=$(DESTDIR )
@@ -158,6 +206,12 @@ install_Python:
158
206
done
159
207
$(INSTALL_PROGRAM ) $(STRIPFLAG ) $(BUILDPYTHON ) " $( DESTDIR) $( APPINSTALLDIR) /Contents/MacOS/$( PYTHONFRAMEWORK) "
160
208
209
+ install_Python4way : install_Python
210
+ lipo -extract i386 -extract ppc7400 -output " $( DESTDIR) $( APPINSTALLDIR) /Contents/MacOS/$( PYTHONFRAMEWORK) -32" " $( DESTDIR) $( APPINSTALLDIR) /Contents/MacOS/$( PYTHONFRAMEWORK) "
211
+ lipo -extract x86_64 -extract ppc64 -output " $( DESTDIR) $( APPINSTALLDIR) /Contents/MacOS/$( PYTHONFRAMEWORK) -64" " $( DESTDIR) $( APPINSTALLDIR) /Contents/MacOS/$( PYTHONFRAMEWORK) "
212
+
213
+
214
+
161
215
install_IDLE :
162
216
test -d " $( DESTDIR) $( PYTHONAPPSDIR) " || mkdir -p " $( DESTDIR) $( PYTHONAPPSDIR) "
163
217
-test -d " $( DESTDIR) $( PYTHONAPPSDIR) /IDLE.app" && rm -r " $( DESTDIR) $( PYTHONAPPSDIR) /IDLE.app"
0 commit comments