• Home
  • Raw
  • Download

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://www.openssl.org/source/openssl-1.1.1m.tar.gz",
277 url="ftp://ftp.tcl.tk/pub/tcl//tcl8_6/tcl%s-src.tar.gz"%(tcl_tk_ver,),
281 '--enable-shared',
282 '--enable-threads',
283 '--libdir=/Library/Frameworks/Python.framework/Versions/%s/lib'%(getVersion(),),
288 "DESTDIR": shellQuote(os.path.join(WORKDIR, 'libraries')),
294 url="ftp://ftp.tcl.tk/pub/tcl//tcl8_6/tk%s-src.tar.gz"%(tcl_tk_ver,),
299 '--enable-aqua',
300 '--enable-shared',
301 '--enable-threads',
302 '--libdir=/Library/Frameworks/Python.framework/Versions/%s/lib'%(getVersion(),),
306 "DESTDIR": shellQuote(os.path.join(WORKDIR, 'libraries')),
317 url="http://tukaani.org/xz/xz-5.2.3.tar.gz",
320 '--disable-dependency-tracking',
328 url="http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz",
331 "--enable-widec",
332 "--without-cxx",
333 "--without-cxx-binding",
334 "--without-ada",
335 "--without-curses-h",
336 "--enable-shared",
337 "--with-shared",
338 "--without-debug",
339 "--without-normal",
340 "--without-tests",
341 "--without-manpages",
342 "--datadir=/usr/share",
343 "--sysconfdir=/etc",
344 "--sharedstatedir=/usr/com",
345 "--with-terminfo-dirs=/usr/share/terminfo",
346 "--with-default-terminfo-dir=/usr/share/terminfo",
347 "--libdir=/Library/Frameworks/Python.framework/Versions/%s/lib"%(getVersion(),),
350 ("ftp://ftp.invisible-island.net/ncurses//5.9/ncurses-5.9-20120616-patch.sh.bz2",
354 …install='make && make install DESTDIR=%s && cd %s/usr/local/lib && ln -fs ../../../Library/Framewo…
355 shellQuote(os.path.join(WORKDIR, 'libraries')),
356 shellQuote(os.path.join(WORKDIR, 'libraries')),
362 url="https://sqlite.org/2021/sqlite-autoconf-3350500.tar.gz",
364 extra_cflags=('-Os '
365 '-DSQLITE_ENABLE_FTS5 '
366 '-DSQLITE_ENABLE_FTS4 '
367 '-DSQLITE_ENABLE_FTS3_PARENTHESIS '
368 '-DSQLITE_ENABLE_JSON1 '
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',
387 url="http://download.oracle.com/berkeley-db/db-4.7.25.tar.gz",
392 '--includedir=/usr/local/include/db4',
403 # bpo-42235: The version check is pretty conservative, can be
439 long_name="UNIX command-line tools",
474 postflight="scripts/postflight.patch-profile",
476 source="/empty-dir",
489 source="/empty-dir",
571 # 1. there is a user-installed framework (usually ActiveTcl) in (or linked
573 # enforce that the version of the user-installed framework also
574 # exists in the system-supplied Tcl/Tk frameworks. Time to support
594 print(" -- Building with external Tcl/Tk %s frameworks"
605 print(" -- Building private copy of Tcl/Tk")
633 global WORKDIR, DEPSRC, SRCDIR, DEPTARGET
643 [ 'build-dir=', 'third-party=', 'sdk-path=' , 'src-dir=',
644 'dep-target=', 'universal-archs=', 'help' ])
655 if k in ('-h', '-?', '--help'):
659 elif k in ('-d', '--build-dir'):
660 WORKDIR=v
662 elif k in ('--third-party',):
665 elif k in ('--sdk-path',):
666 print(" WARNING: --sdk-path is no longer supported")
668 elif k in ('--src-dir',):
671 elif k in ('--dep-target', ):
675 elif k in ('--universal-archs', ):
690 WORKDIR=os.path.abspath(WORKDIR)
698 print("-- Settings:")
700 print(" * Build directory: %s" % WORKDIR)
701 print(" * Third-party source: %s" % DEPSRC)
707 print(" -- Building a Python %s framework at patch level %s"
720 the archive ends with "-src" but the uncompressed directory does not.
727 retval = os.path.basename(archiveName[:-7])
729 and retval.endswith('-src')):
730 retval = retval[:-4]
736 retval = os.path.basename(archiveName[:-8])
742 retval = os.path.basename(archiveName[:-4])
748 retval = os.path.basename(archiveName[:-4])
818 "i386": ["darwin-i386-cc"],
819 "x86_64": ["darwin64-x86_64-cc", "enable-ec_nistp_64_gcc_128"],
820 "arm64": ["darwin64-arm64-cc"],
821 "ppc": ["darwin-ppc-cc"],
822 "ppc64": ["darwin64-ppc-cc"],
826 # "enable-ec_nistp_64_gcc_128" option to get compile errors when
827 # building on our 10.6 gcc-4.2 environment. There have been other
829 # So, for now, do not try to use "enable-ec_nistp_64_gcc_128" when
832 arch_opts['x86_64'].remove('enable-ec_nistp_64_gcc_128')
835 "no-idea",
836 "no-mdc2",
837 "no-rc5",
838 "no-zlib",
839 "no-ssl3",
840 # "enable-unit-test",
842 "--prefix=%s"%os.path.join("/", *FW_VERSION_PREFIX),
843 "--openssldir=%s"%os.path.join("/", *FW_SSL_DIRECTORY),
846 configure_opts.append("no-asm")
857 os.path.basename(srcdir) + "-universal")
879 # copy arch-independent files from last build into the basedir framework
888 # e.g. -> "1.0.0"
891 # e.g. -> "libcrypto.1.0.0.dylib"
894 # e.g. -> "libssl.1.0.0.dylib"
901 # merge the individual arch-dependent shared libs into a fat shared lib
907 runCommand("lipo -create -output " +
916 # and the versioned links so that the setup.py post-build import test
937 to customize this process, basically a poor-mans DarwinPorts.
949 archiveName = os.path.split(url)[-1]
957 buildDir=os.path.join(WORKDIR, '_bld')
961 workDir = extractArchive(buildDir, sourceArchive)
962 os.chdir(workDir)
972 runCommand('patch -p%s < %s'%(recipe.get('patchlevel', 1),
984 runCommand('bunzip2 -fk %s' % shellQuote(fn))
985 fn = fn[:-4]
994 "--prefix=/usr/local",
995 "--enable-static",
996 "--disable-shared",
997 #"CPP=gcc -arch %s -E"%(' -arch '.join(archList,),),
1002 if '--disable-static' in args:
1003 configure_args.remove('--enable-static')
1004 if '--enable-shared' in args:
1005 configure_args.remove('--disable-shared')
1010 "CFLAGS=%s-mmacosx-version-min=%s -arch %s "
1011 "-I%s/usr/local/include"%(
1014 ' -arch '.join(archList),
1015 shellQuote(basedir)[1:-1],),
1016 "LDFLAGS=-mmacosx-version-min=%s -L%s/usr/local/lib -arch %s"%(
1018 shellQuote(basedir)[1:-1],
1019 ' -arch '.join(archList)),
1023 "CFLAGS=%s-mmacosx-version-min=%s -arch %s "
1024 "-I%s/usr/local/include"%(
1027 ' -arch '.join(archList),
1028 shellQuote(basedir)[1:-1],),
1041 # call special-case build recipe, e.g. for openssl
1055 Build our dependencies into $WORKDIR/libraries/usr/local
1060 universal = os.path.join(WORKDIR, 'libraries')
1074 rootDir = os.path.join(WORKDIR, '_root')
1081 # Search third-party source directory for a pre-built version of the docs.
1083 # python-3.9.0b1-docs-html.tar.bz2
1085 if f.startswith('python-'+getFullVersion())
1086 if f.endswith('-docs-html.tar.bz2') ]
1095 # see if tar extracted a directory ending in -docs-html
1097 if f.endswith('-docs-html')
1102 print(' -- using pre-built python documentation from %s'%archivefile)
1118 buildDir = os.path.join(WORKDIR, '_bld', 'python')
1119 rootDir = os.path.join(WORKDIR, '_root')
1127 os.makedirs(os.path.join(rootDir, 'empty-dir'))
1140 runCommand("%s -C --enable-framework --enable-universalsdk=/ "
1141 "--with-universal-archs=%s "
1148 "LDFLAGS='-g -L%s/libraries/usr/local/lib' "
1149 "CFLAGS='-g -I%s/libraries/usr/local/include' 2>&1"%(
1152 (' ', '--with-computed-gotos ')[PYTHON_3],
1153 (' ', '--without-ensurepip ')[PYTHON_3],
1154 (' ', "--with-openssl='%s/libraries/usr/local'"%(
1155 shellQuote(WORKDIR)[1:-1],))[PYTHON_3],
1156 (' ', "--with-tcltk-includes='-I%s/libraries/usr/local/include'"%(
1157 shellQuote(WORKDIR)[1:-1],))[internalTk()],
1158 (' ', "--with-tcltk-libs='-L%s/libraries/usr/local/lib -ltcl8.6 -ltk8.6'"%(
1159 shellQuote(WORKDIR)[1:-1],))[internalTk()],
1160 (' ', "--enable-optimizations --with-lto")[compilerCanOptimize()],
1161 shellQuote(WORKDIR)[1:-1],
1162 shellQuote(WORKDIR)[1:-1]))
1167 # DYLD_LIBRARY_PATH, pointing to the third-party libs,
1168 # in build-installer.py's process environment and it was
1179 os.path.join(WORKDIR, 'libraries', 'usr', 'local', 'lib'),
1215 if os.path.exists(os.path.join(WORKDIR, 'libraries', 'Library')):
1217 WORKDIR, 'libraries', 'Library', 'Frameworks',
1220 WORKDIR, '_root', 'Library', 'Frameworks',
1227 runCommand("rm -r %s/pkgconfig"%(
1247 os.chown(os.path.join(dirpath, dn), -1, gid)
1257 os.chown(p, -1, gid)
1262 data = captureCommand("otool -L %s" % shellQuote(p))
1290 config_suffix = '-' + LDVERSION
1292 config_suffix = config_suffix + '-darwin'
1298 # the end-users system. Also remove the directories from _sysconfigdata.py
1301 include_path = '-I%s/libraries/usr/local/include' % (WORKDIR,)
1302 lib_path = '-L%s/libraries/usr/local/lib' % (WORKDIR,)
1333 # XXX this is extra-fragile
1412 pkgname = '%s-%s'%(recipe['name'], getVersion())
1419 print("- building package %s"%(pkgname,))
1434 srcdir = os.path.join(WORKDIR, '_root', srcdir[1:])
1445 … runCommand("pax -wf %s . 2>&1"%(shellQuote(os.path.join(packageContents, 'Archive.pax')),))
1446 … runCommand("gzip -9 %s 2>&1"%(shellQuote(os.path.join(packageContents, 'Archive.pax')),))
1513 IFPkgFlagPackageLocation='%s-%s.pkg'%(item['name'], getVersion()),
1530 for dirpath, _, filenames in os.walk(os.path.join(WORKDIR, '_root')):
1535 outdir = os.path.join(WORKDIR, 'installer')
1574 data = captureCommand("du -ks %s"%(
1575 shellQuote(os.path.join(WORKDIR, '_root'))))
1584 outdir = os.path.join(WORKDIR, 'diskimage')
1606 # python-3.x.y-macosx10.z.{dmg->pkg}
1607 # e.g. python-3.9.4-macosx10.9.{dmg->pkg}
1609 # python-3.x.y-macosz.{dmg->pkg}
1610 # e.g. python-3.9.4-macos11.{dmg->pkg}
1620 'python-%s-%s%s'%(getFullVersion(),os_name,build_system_version))
1622 imagepath = imagepath + '-%04d-%02d-%02d'%(time.localtime()[:3])
1632 cmd = ("hdiutil create -format UDRW -volname %s -srcfolder %s -size 100m %s"%(
1634 shellQuote(os.path.join(WORKDIR, 'installer')),
1643 print(" -- retrying hdiutil create")
1648 if not os.path.exists(os.path.join(WORKDIR, "mnt")):
1649 os.mkdir(os.path.join(WORKDIR, "mnt"))
1650 runCommand("hdiutil attach %s -mountroot %s"%(
1651 shellQuote(imagepath + ".tmp.dmg"), shellQuote(os.path.join(WORKDIR, "mnt"))))
1655 os.path.join(WORKDIR, "mnt", volname, ".VolumeIcon.icns"))
1656 runCommand("SetFile -a C %s/"%(
1657 shellQuote(os.path.join(WORKDIR, "mnt", volname)),))
1659 runCommand("hdiutil detach %s"%(shellQuote(os.path.join(WORKDIR, "mnt", volname))))
1662 runCommand("hdiutil convert %s -format UDZO -o %s"%(
1684 runCommand("cc -o %s %s/seticon.m -framework Cocoa"%(
1699 if os.path.exists(WORKDIR):
1700 shutil.rmtree(WORKDIR)
1701 os.mkdir(WORKDIR)
1705 # Then build third-party libraries such as sleepycat DB4.
1716 # be (re-)installed.
1722 folder = os.path.join(WORKDIR, "_root", "Applications", "Python %s"%(
1729 patchScript("scripts/postflight.patch-profile", fn)
1740 os.path.join(WORKDIR, 'installer', 'ReadMe.rtf'))
1744 os.path.join(WORKDIR, 'installer', 'License.rtf'))
1746 fp = open(os.path.join(WORKDIR, 'installer', 'Build.txt'), 'w')