Skip to content

Commit 360e98c

Browse files
Py3k: update OSX installer-generator
This update makes sure that the installer won't write files in /usr/local/bin by default. The installer also won't replace /Library/Frameworks/Python.framework/Version/Current. Both to ensure that the installer doens't break an existing install of python 2.x.
1 parent 2160015 commit 360e98c

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

‎Mac/BuildScript/build-installer.py‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ def getFullVersion():
184184
wrappers for lots of Mac OS X API's.
185185
""",
186186
postflight="scripts/postflight.framework",
187+
selected='selected',
187188
),
188189
dict(
189190
name="PythonApplications",
@@ -197,6 +198,7 @@ def getFullVersion():
197198
It also installs a number of examples and demos.
198199
""",
199200
required=False,
201+
selected='selected',
200202
),
201203
dict(
202204
name="PythonUnixTools",
@@ -208,6 +210,7 @@ def getFullVersion():
208210
is not necessary to use MacPython.
209211
""",
210212
required=False,
213+
selected='unselected',
211214
),
212215
dict(
213216
name="PythonDocumentation",
@@ -222,6 +225,7 @@ def getFullVersion():
222225
""",
223226
postflight="scripts/postflight.documentation",
224227
required=False,
228+
selected='selected',
225229
),
226230
dict(
227231
name="PythonProfileChanges",
@@ -239,6 +243,7 @@ def getFullVersion():
239243
topdir="/Library/Frameworks/Python.framework",
240244
source="/empty-dir",
241245
required=False,
246+
selected='unselected',
242247
),
243248
dict(
244249
name="PythonSystemFixes",
@@ -252,6 +257,7 @@ def getFullVersion():
252257
topdir="/Library/Frameworks/Python.framework",
253258
source="/empty-dir",
254259
required=False,
260+
selected='unselected',
255261
)
256262
]
257263

@@ -650,6 +656,8 @@ def buildPython():
650656
frmDir = os.path.join(rootDir, 'Library', 'Frameworks', 'Python.framework')
651657
gid = grp.getgrnam('admin').gr_gid
652658

659+
660+
653661
for dirpath, dirnames, filenames in os.walk(frmDir):
654662
for dn in dirnames:
655663
os.chmod(os.path.join(dirpath, dn), 0775)
@@ -696,6 +704,11 @@ def buildPython():
696704

697705
os.chdir(curdir)
698706

707+
# Remove the 'Current' link, that way we don't accidently mess with an already installed
708+
# version of python
709+
os.unlink(os.path.join(rootDir, 'Library', 'Frameworks', 'Python.framework', 'Versions', 'Current'))
710+
711+
699712

700713

701714
def patchFile(inPath, outPath):
@@ -830,7 +843,7 @@ def makeMpkgPlist(path):
830843
IFPkgFlagPackageList=[
831844
dict(
832845
IFPkgFlagPackageLocation='%s-%s.pkg'%(item['name'], getVersion()),
833-
IFPkgFlagPackageSelection='selected'
846+
IFPkgFlagPackageSelection=item['selected'],
834847
)
835848
for item in PKG_RECIPES
836849
],

‎Mac/BuildScript/resources/Welcome.rtf‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ See the ReadMe file for more information.\
1616
\
1717

1818
\b NOTE:
19-
\b0 This package will by default update your shell profile to ensure that this version of Python is on the search path of your shell. Please deselect the "Shell profile updater" package on the package customization screen if you want to avoid this modification. }
19+
\b0 This package will by default update not your shell profile, and will also not install\
20+
files in /usr/local. }

0 commit comments

Comments
 (0)