Lines Matching +full:- +full:- +full:workdir
6 - support universal2 variant with arm64 and x86_64 archs
7 - enable clang optimizations when building on 10.15+
10 - 2.7 end-of-life issues:
11 - Python 3 installs now update the Current version link
13 - fully support running under Python 3 as well as 2.7
14 - support building on newer macOS systems with SIP
15 - fully support building on macOS 10.9+
16 - support 10.6+ on best effort
17 - support bypassing docs build by supplying a prebuilt
18 docs html tarball in the third-party source library,
21 python-3.x.y-docs-html.tar.bz2
24 - support Intel 64-bit-only () and 32-bit-only installer builds
25 - build and use internal Tcl/Tk 8.6 for 10.6+ builds
26 - deprecate use of explicit SDK (--sdk-path=) since all but the oldest
31 supported with build-installer.
32 - use generic "gcc" as compiler (CC env var) rather than "gcc-4.2"
35 - test building with SDKROOT and DEVELOPER_DIR xcrun env variables
76 QUOTED_VALUE='quotes' -> str('quotes')
77 UNQUOTED_VALUE=noquotes -> str('noquotes')
84 raise RuntimeError("Cannot find variable %s" % variable[:-1])
107 _cache_getFullVersion = ln.split()[-1][1:-1]
112 FW_VERSION_PREFIX = "--undefined--" # initialized in parseOptions
113 FW_SSL_DIRECTORY = "--undefined--" # initialized in parseOptions
116 WORKDIR = "/tmp/_py" variable
118 # The directory we'll use to store third-party sources. Set this to something
119 # else if you don't want to re-fetch required libraries every time.
120 DEPSRC = os.path.join(WORKDIR, 'third-party')
121 DEPSRC = os.path.expanduser('~/Universal/other-sources')
124 '32-bit': ('i386', 'ppc',),
125 '64-bit': ('x86_64', 'ppc64',),
127 'intel-32': ('i386',),
128 'intel-64': ('x86_64',),
129 '3-way': ('ppc', 'i386', 'x86_64'),
133 '64-bit': '10.5',
134 '3-way': '10.5',
136 'intel-32': '10.4',
137 'intel-64': '10.5',
143 UNIVERSALARCHS = '32-bit'
154 # $MACOSX_DEPLOYMENT_TARGET -> minimum OS X level
165 '10.4': ('gcc-4.0', 'g++-4.0'),
181 -? or -h: Show this message
182 -b DIR
183 --build-dir=DIR: Create build here (default: %(WORKDIR)r)
184 --third-party=DIR: Store third-party sources here (default: %(DEPSRC)r)
185 --sdk-path=DIR: Location of the SDK (deprecated, use SDKROOT env variable)
186 --src-dir=DIR: Location of the Python sources (default: %(SRCDIR)r)
187 --dep-target=10.n macOS deployment target (default: %(DEPTARGET)r)
188 …--universal-archs=x universal architectures (options: %(UNIVERSALOPTS)r, default: %(UNIVERSALARCH…
250 … url="https://github.com/openssl/openssl/releases/download/openssl-3.0.15/openssl-3.0.15.tar.gz",
274 base_url = "https://prdownloads.sourceforge.net/tcl/{what}{version}-src.tar.gz"
282 '--enable-shared',
283 '--enable-threads',
284 '--libdir=/Library/Frameworks/Python.framework/Versions/%s/lib'%(getVersion(),),
289 "DESTDIR": shellQuote(os.path.join(WORKDIR, 'libraries')),
300 '--enable-aqua',
301 '--enable-shared',
302 '--enable-threads',
303 '--libdir=/Library/Frameworks/Python.framework/Versions/%s/lib'%(getVersion(),),
307 "DESTDIR": shellQuote(os.path.join(WORKDIR, 'libraries')),
318 url="http://tukaani.org/xz/xz-5.2.3.tar.gz",
321 '--disable-dependency-tracking',
329 url="http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz",
332 "--enable-widec",
333 "--without-cxx",
334 "--without-cxx-binding",
335 "--without-ada",
336 "--without-curses-h",
337 "--enable-shared",
338 "--with-shared",
339 "--without-debug",
340 "--without-normal",
341 "--without-tests",
342 "--without-manpages",
343 "--datadir=/usr/share",
344 "--sysconfdir=/etc",
345 "--sharedstatedir=/usr/com",
346 "--with-terminfo-dirs=/usr/share/terminfo",
347 "--with-default-terminfo-dir=/usr/share/terminfo",
348 "--libdir=/Library/Frameworks/Python.framework/Versions/%s/lib"%(getVersion(),),
351 ("ftp://ftp.invisible-island.net/ncurses//5.9/ncurses-5.9-20120616-patch.sh.bz2",
355 …install='make && make install DESTDIR=%s && cd %s/usr/local/lib && ln -fs ../../../Library/Framewo…
356 shellQuote(os.path.join(WORKDIR, 'libraries')),
357 shellQuote(os.path.join(WORKDIR, 'libraries')),
363 url="https://sqlite.org/2024/sqlite-autoconf-3450300.tar.gz",
365 extra_cflags=('-Os '
366 '-DSQLITE_ENABLE_FTS5 '
367 '-DSQLITE_ENABLE_FTS4 '
368 '-DSQLITE_ENABLE_FTS3_PARENTHESIS '
369 '-DSQLITE_ENABLE_RTREE '
370 '-DSQLITE_OMIT_AUTOINIT '
371 '-DSQLITE_TCL=0 '
374 '--enable-threadsafe',
375 '--enable-shared=no',
376 '--enable-static=yes',
377 '--disable-readline',
378 '--disable-dependency-tracking',
383 url="https://www.bytereef.org/software/mpdecimal/releases/mpdecimal-4.0.0.tar.gz",
386 "--disable-cxx",
396 url="http://download.oracle.com/berkeley-db/db-4.7.25.tar.gz",
401 '--includedir=/usr/local/include/db4',
412 # bpo-42235: The version check is pretty conservative, can be
448 long_name="UNIX command-line tools",
483 postflight="scripts/postflight.patch-profile",
485 source="/empty-dir",
498 source="/empty-dir",
580 # 1. there is a user-installed framework (usually ActiveTcl) in (or linked
582 # enforce that the version of the user-installed framework also
583 # exists in the system-supplied Tcl/Tk frameworks. Time to support
603 print(" -- Building with external Tcl/Tk %s frameworks"
614 print(" -- Building private copy of Tcl/Tk")
642 global WORKDIR, DEPSRC, SRCDIR, DEPTARGET
652 [ 'build-dir=', 'third-party=', 'sdk-path=' , 'src-dir=',
653 'dep-target=', 'universal-archs=', 'help' ])
664 if k in ('-h', '-?', '--help'):
668 elif k in ('-d', '--build-dir'):
669 WORKDIR=v
671 elif k in ('--third-party',):
674 elif k in ('--sdk-path',):
675 print(" WARNING: --sdk-path is no longer supported")
677 elif k in ('--src-dir',):
680 elif k in ('--dep-target', ):
684 elif k in ('--universal-archs', ):
699 WORKDIR=os.path.abspath(WORKDIR)
707 print("-- Settings:")
709 print(" * Build directory: %s" % WORKDIR)
710 print(" * Third-party source: %s" % DEPSRC)
716 print(" -- Building a Python %s framework at patch level %s"
729 the archive ends with "-src" but the uncompressed directory does not.
736 retval = os.path.basename(archiveName[:-7])
738 and retval.endswith('-src')):
739 retval = retval[:-4]
749 retval = os.path.basename(archiveName[:-8])
755 retval = os.path.basename(archiveName[:-4])
761 retval = os.path.basename(archiveName[:-4])
837 "i386": ["darwin-i386-cc"],
838 "x86_64": ["darwin64-x86_64-cc", "enable-ec_nistp_64_gcc_128"],
839 "arm64": ["darwin64-arm64-cc"],
840 "ppc": ["darwin-ppc-cc"],
841 "ppc64": ["darwin64-ppc-cc"],
845 # "enable-ec_nistp_64_gcc_128" option to get compile errors when
846 # building on our 10.6 gcc-4.2 environment. There have been other
848 # So, for now, do not try to use "enable-ec_nistp_64_gcc_128" when
851 arch_opts['x86_64'].remove('enable-ec_nistp_64_gcc_128')
854 "no-idea",
855 "no-mdc2",
856 "no-rc5",
857 "no-zlib",
858 "no-ssl3",
859 # "enable-unit-test",
861 "--prefix=%s"%os.path.join("/", *FW_VERSION_PREFIX),
862 "--openssldir=%s"%os.path.join("/", *FW_SSL_DIRECTORY),
865 configure_opts.append("no-asm")
876 os.path.basename(srcdir) + "-universal")
898 # copy arch-independent files from last build into the basedir framework
907 # e.g. -> "1.0.0"
910 # e.g. -> "libcrypto.1.0.0.dylib"
913 # e.g. -> "libssl.1.0.0.dylib"
920 # merge the individual arch-dependent shared libs into a fat shared lib
926 runCommand("lipo -create -output " +
935 # and the versioned links so that the setup.py post-build import test
956 to customize this process, basically a poor-mans DarwinPorts.
968 archiveName = os.path.split(url)[-1]
976 buildDir=os.path.join(WORKDIR, '_bld')
980 workDir = extractArchive(buildDir, sourceArchive)
981 os.chdir(workDir)
991 runCommand('patch -p%s < %s'%(recipe.get('patchlevel', 1),
1003 runCommand('bunzip2 -fk %s' % shellQuote(fn))
1004 fn = fn[:-4]
1013 "--prefix=/usr/local",
1014 "--enable-static",
1015 "--disable-shared",
1016 #"CPP=gcc -arch %s -E"%(' -arch '.join(archList,),),
1021 if '--disable-static' in args:
1022 configure_args.remove('--enable-static')
1023 if '--enable-shared' in args:
1024 configure_args.remove('--disable-shared')
1029 "CFLAGS=%s-mmacosx-version-min=%s -arch %s "
1030 "-I%s/usr/local/include"%(
1033 ' -arch '.join(archList),
1034 shellQuote(basedir)[1:-1],),
1035 "LDFLAGS=-mmacosx-version-min=%s -L%s/usr/local/lib -arch %s"%(
1037 shellQuote(basedir)[1:-1],
1038 ' -arch '.join(archList)),
1042 "CFLAGS=%s-mmacosx-version-min=%s -arch %s "
1043 "-I%s/usr/local/include"%(
1046 ' -arch '.join(archList),
1047 shellQuote(basedir)[1:-1],),
1060 # call special-case build recipe, e.g. for openssl
1074 Build our dependencies into $WORKDIR/libraries/usr/local
1079 universal = os.path.join(WORKDIR, 'libraries')
1093 rootDir = os.path.join(WORKDIR, '_root')
1100 # Search third-party source directory for a pre-built version of the docs.
1102 # python-3.9.0b1-docs-html.tar.bz2
1104 if f.startswith('python-'+getFullVersion())
1105 if f.endswith('-docs-html.tar.bz2') ]
1114 # see if tar extracted a directory ending in -docs-html
1116 if f.endswith('-docs-html')
1121 print(' -- using pre-built python documentation from %s'%archivefile)
1137 buildDir = os.path.join(WORKDIR, '_bld', 'python')
1138 rootDir = os.path.join(WORKDIR, '_root')
1146 os.makedirs(os.path.join(rootDir, 'empty-dir'))
1159 print(" NOTE: --with-mimalloc=no pending resolution of weak linking issues")
1160 runCommand("%s -C --enable-framework --enable-universalsdk=/ "
1161 "--with-mimalloc=no "
1162 "--with-system-libmpdec "
1163 "--with-universal-archs=%s "
1170 "LDFLAGS='-g -L%s/libraries/usr/local/lib' "
1171 "CFLAGS='-g -I%s/libraries/usr/local/include' 2>&1"%(
1174 (' ', '--with-computed-gotos ')[PYTHON_3],
1175 (' ', '--without-ensurepip ')[PYTHON_3],
1176 (' ', "--with-openssl='%s/libraries/usr/local'"%(
1177 shellQuote(WORKDIR)[1:-1],))[PYTHON_3],
1178 (' ', "--enable-optimizations --with-lto")[compilerCanOptimize()],
1179 (' ', "TCLTK_CFLAGS='-I%s/libraries/usr/local/include'"%(
1180 shellQuote(WORKDIR)[1:-1],))[internalTk()],
1181 (' ', "TCLTK_LIBS='-L%s/libraries/usr/local/lib -ltcl8.6 -ltk8.6'"%(
1182 shellQuote(WORKDIR)[1:-1],))[internalTk()],
1183 shellQuote(WORKDIR)[1:-1],
1184 shellQuote(WORKDIR)[1:-1]))
1189 # DYLD_LIBRARY_PATH, pointing to the third-party libs,
1190 # in build-installer.py's process environment and it was
1201 os.path.join(WORKDIR, 'libraries', 'usr', 'local', 'lib'),
1237 if os.path.exists(os.path.join(WORKDIR, 'libraries', 'Library')):
1239 WORKDIR, 'libraries', 'Library', 'Frameworks',
1242 WORKDIR, '_root', 'Library', 'Frameworks',
1249 runCommand("rm -r %s/pkgconfig"%(
1269 os.chown(os.path.join(dirpath, dn), -1, gid)
1279 os.chown(p, -1, gid)
1284 data = captureCommand("otool -L %s" % shellQuote(p))
1312 config_suffix = '-' + LDVERSION
1314 config_suffix = config_suffix + '-darwin'
1320 # the end-users system. Also remove the directories from _sysconfigdata.py
1323 include_path = '-I%s/libraries/usr/local/include' % (WORKDIR,)
1324 lib_path = '-L%s/libraries/usr/local/lib' % (WORKDIR,)
1355 # XXX this is extra-fragile
1434 pkgname = '%s-%s'%(recipe['name'], getVersion())
1441 print("- building package %s"%(pkgname,))
1456 srcdir = os.path.join(WORKDIR, '_root', srcdir[1:])
1467 … runCommand("pax -wf %s . 2>&1"%(shellQuote(os.path.join(packageContents, 'Archive.pax')),))
1468 … runCommand("gzip -9 %s 2>&1"%(shellQuote(os.path.join(packageContents, 'Archive.pax')),))
1535 IFPkgFlagPackageLocation='%s-%s.pkg'%(item['name'], getVersion()),
1552 for dirpath, _, filenames in os.walk(os.path.join(WORKDIR, '_root')):
1557 outdir = os.path.join(WORKDIR, 'installer')
1596 data = captureCommand("du -ks %s"%(
1597 shellQuote(os.path.join(WORKDIR, '_root'))))
1606 outdir = os.path.join(WORKDIR, 'diskimage')
1628 # python-3.x.y-macosx10.z.{dmg->pkg}
1629 # e.g. python-3.9.4-macosx10.9.{dmg->pkg}
1631 # python-3.x.y-macosz.{dmg->pkg}
1632 # e.g. python-3.9.4-macos11.{dmg->pkg}
1642 'python-%s-%s%s'%(getFullVersion(),os_name,build_system_version))
1644 imagepath = imagepath + '-%04d-%02d-%02d'%(time.localtime()[:3])
1654 cmd = ("hdiutil create -format UDRW -volname %s -srcfolder %s -size 100m %s"%(
1656 shellQuote(os.path.join(WORKDIR, 'installer')),
1665 print(" -- retrying hdiutil create")
1670 if not os.path.exists(os.path.join(WORKDIR, "mnt")):
1671 os.mkdir(os.path.join(WORKDIR, "mnt"))
1672 runCommand("hdiutil attach %s -mountroot %s"%(
1673 shellQuote(imagepath + ".tmp.dmg"), shellQuote(os.path.join(WORKDIR, "mnt"))))
1677 os.path.join(WORKDIR, "mnt", volname, ".VolumeIcon.icns"))
1678 runCommand("SetFile -a C %s/"%(
1679 shellQuote(os.path.join(WORKDIR, "mnt", volname)),))
1681 runCommand("hdiutil detach %s"%(shellQuote(os.path.join(WORKDIR, "mnt", volname))))
1684 runCommand("hdiutil convert %s -format UDZO -o %s"%(
1706 runCommand("cc -o %s %s/seticon.m -framework Cocoa"%(
1721 if os.path.exists(WORKDIR):
1722 shutil.rmtree(WORKDIR)
1723 os.mkdir(WORKDIR)
1727 # Then build third-party libraries such as sleepycat DB4.
1738 # be (re-)installed.
1744 folder = os.path.join(WORKDIR, "_root", "Applications", "Python %s"%(
1751 patchScript("scripts/postflight.patch-profile", fn)
1762 os.path.join(WORKDIR, 'installer', 'ReadMe.rtf'))
1766 os.path.join(WORKDIR, 'installer', 'License.rtf'))
1768 fp = open(os.path.join(WORKDIR, 'installer', 'Build.txt'), 'w')