aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Mac/BuildScript/build-installer.py
diff options
context:
space:
mode:
Diffstat (limited to 'Mac/BuildScript/build-installer.py')
-rwxr-xr-xMac/BuildScript/build-installer.py101
1 files changed, 30 insertions, 71 deletions
diff --git a/Mac/BuildScript/build-installer.py b/Mac/BuildScript/build-installer.py
index fd5d5c36a77..f01258731eb 100755
--- a/Mac/BuildScript/build-installer.py
+++ b/Mac/BuildScript/build-installer.py
@@ -193,7 +193,8 @@ def library_recipes():
LT_10_5 = bool(DEPTARGET < '10.5')
- if (DEPTARGET > '10.5') and (getVersionTuple() >= (3, 4)):
+# Disable for now
+ if (DEPTARGET > '10.5') and (getVersionTuple() >= (3, 5)):
result.extend([
dict(
name="Tcl 8.5.15",
@@ -237,9 +238,9 @@ def library_recipes():
if getVersionTuple() >= (3, 3):
result.extend([
dict(
- name="XZ 5.0.3",
- url="http://tukaani.org/xz/xz-5.0.3.tar.gz",
- checksum='fefe52f9ecd521de2a8ce38c21a27574',
+ name="XZ 5.0.5",
+ url="http://tukaani.org/xz/xz-5.0.5.tar.gz",
+ checksum='19d924e066b6fff0bc9d1981b4e53196',
configure_pre=[
'--disable-dependency-tracking',
]
@@ -282,9 +283,9 @@ def library_recipes():
),
),
dict(
- name="SQLite 3.7.13",
- url="http://www.sqlite.org/sqlite-autoconf-3071300.tar.gz",
- checksum='c97df403e8a3d5b67bb408fcd6aabd8e',
+ name="SQLite 3.8.1",
+ url="http://www.sqlite.org/2013/sqlite-autoconf-3080100.tar.gz",
+ checksum='8b5a0a02dfcb0c7daf90856a5cfd485a',
extra_cflags=('-Os '
'-DSQLITE_ENABLE_FTS4 '
'-DSQLITE_ENABLE_FTS3_PARENTHESIS '
@@ -364,6 +365,7 @@ def library_recipes():
# Instructions for building packages inside the .mpkg.
def pkg_recipes():
unselected_for_python3 = ('selected', 'unselected')[PYTHON_3]
+ unselected_for_lt_python34 = ('selected', 'unselected')[getVersionTuple() < (3, 4)]
result = [
dict(
name="PythonFramework",
@@ -432,10 +434,27 @@ def pkg_recipes():
topdir="/Library/Frameworks/Python.framework",
source="/empty-dir",
required=False,
- selected=unselected_for_python3,
+ selected=unselected_for_lt_python34,
),
]
+ if getVersionTuple() >= (3, 4):
+ result.append(
+ dict(
+ name="PythonInstallPip",
+ long_name="Install or upgrade pip",
+ readme="""\
+ This package installs (or upgrades from an earlier version)
+ pip, a tool for installing and managing Python packages.
+ """,
+ postflight="scripts/postflight.ensurepip",
+ topdir="/Library/Frameworks/Python.framework",
+ source="/empty-dir",
+ required=False,
+ selected='selected',
+ )
+ )
+
if DEPTARGET < '10.4' and not PYTHON_3:
result.append(
dict(
@@ -453,6 +472,7 @@ def pkg_recipes():
selected=unselected_for_python3,
)
)
+
return result
def fatal(msg):
@@ -567,20 +587,6 @@ def checkEnvironment():
% frameworks['Tk'],
]
- # For 10.6+ builds, we build two versions of _tkinter:
- # - the traditional version (renamed to _tkinter_library.so) linked
- # with /Library/Frameworks/{Tcl,Tk}.framework
- # - the default version linked with our builtin copies of Tcl and Tk
- if (DEPTARGET > '10.5') and (getVersionTuple() >= (3, 4)):
- EXPECTED_SHARED_LIBS['_tkinter_library.so'] = \
- EXPECTED_SHARED_LIBS['_tkinter.so']
- EXPECTED_SHARED_LIBS['_tkinter.so'] = [
- "/Library/Frameworks/Python.framework/Versions/%s/lib/libtcl%s.dylib"
- % (getVersion(), frameworks['Tcl']),
- "/Library/Frameworks/Python.framework/Versions/%s/lib/libtk%s.dylib"
- % (getVersion(), frameworks['Tk']),
- ]
-
# Remove inherited environment variables which might influence build
environ_var_prefixes = ['CPATH', 'C_INCLUDE_', 'DYLD_', 'LANG', 'LC_',
'LD_', 'LIBRARY_', 'PATH', 'PYTHON']
@@ -955,34 +961,19 @@ def buildPython():
runCommand("%s -C --enable-framework --enable-universalsdk=%s "
"--with-universal-archs=%s "
"%s "
+ "%s "
"LDFLAGS='-g -L%s/libraries/usr/local/lib' "
"CFLAGS='-g -I%s/libraries/usr/local/include' 2>&1"%(
shellQuote(os.path.join(SRCDIR, 'configure')), shellQuote(SDKPATH),
UNIVERSALARCHS,
(' ', '--with-computed-gotos ')[PYTHON_3],
+ (' ', '--without-ensurepip ')[getVersionTuple() >= (3, 4)],
shellQuote(WORKDIR)[1:-1],
shellQuote(WORKDIR)[1:-1]))
print("Running make")
runCommand("make")
- # For deployment targets of 10.6 and higher, we build our own version
- # of Tcl and Cocoa Aqua Tk libs because the Apple-supplied Tk 8.5 is
- # out-of-date and has critical bugs. Save the _tkinter.so that was
- # linked with /Library/Frameworks/{Tck,Tk}.framework and build
- # another _tkinter.so linked with our builtin Tcl and Tk libs.
- if (DEPTARGET > '10.5') and (getVersionTuple() >= (3, 4)):
- runCommand("find build -name '_tkinter.so' "
- " -execdir mv '{}' _tkinter_library.so \;")
- print("Running make to build builtin _tkinter")
- runCommand("make TCLTK_INCLUDES='-I%s/libraries/usr/local/include' "
- "TCLTK_LIBS='-L%s/libraries/usr/local/lib -ltcl8.5 -ltk8.5'"%(
- shellQuote(WORKDIR)[1:-1],
- shellQuote(WORKDIR)[1:-1]))
- # make a copy which will be moved to lib-tkinter later
- runCommand("find build -name '_tkinter.so' "
- " -execdir cp -p '{}' _tkinter_builtin.so \;")
-
print("Running make install")
runCommand("make install DESTDIR=%s"%(
shellQuote(rootDir)))
@@ -1007,27 +998,11 @@ def buildPython():
'Python.framework', 'Versions',
version, 'lib', 'python%s'%(version,))
- # If we made multiple versions of _tkinter, move them to
- # their own directories under python lib. This allows
- # users to select which to import by manipulating sys.path
- # directly or with PYTHONPATH.
-
- if (DEPTARGET > '10.5') and (getVersionTuple() >= (3, 4)):
- TKINTERS = ['builtin', 'library']
- tkinter_moves = [('_tkinter_' + tkn + '.so',
- os.path.join(path_to_lib, 'lib-tkinter', tkn))
- for tkn in TKINTERS]
- # Create the destination directories under lib-tkinter.
- # The permissions and uid/gid will be fixed up next.
- for tkm in tkinter_moves:
- os.makedirs(tkm[1])
-
print("Fix file modes")
frmDir = os.path.join(rootDir, 'Library', 'Frameworks', 'Python.framework')
gid = grp.getgrnam('admin').gr_gid
shared_lib_error = False
- moves_list = []
for dirpath, dirnames, filenames in os.walk(frmDir):
for dn in dirnames:
os.chmod(os.path.join(dirpath, dn), STAT_0o775)
@@ -1053,25 +1028,9 @@ def buildPython():
% (sl, p))
shared_lib_error = True
- # If this is a _tkinter variant, move it to its own directory
- # now that we have fixed its permissions and checked that it
- # was linked properly. The directory was created earlier.
- # The files are moved after the entire tree has been walked
- # since the shared library checking depends on the files
- # having unique names.
- if (DEPTARGET > '10.5') and (getVersionTuple() >= (3, 4)):
- for tkm in tkinter_moves:
- if fn == tkm[0]:
- moves_list.append(
- (p, os.path.join(tkm[1], '_tkinter.so')))
-
if shared_lib_error:
fatal("Unexpected shared library errors.")
- # Now do the moves.
- for ml in moves_list:
- shutil.move(ml[0], ml[1])
-
if PYTHON_3:
LDVERSION=None
VERSION=None