• Home
  • Raw
  • Download

Lines Matching +full:- +full:- +full:workdir

6 - 2.7 end-of-life issues:
7 - Python 3 installs now update the Current version link
9 - fully support running under Python 3 as well as 2.7
10 - support building on newer macOS systems with SIP
11 - fully support building on macOS 10.9+
12 - support 10.6+ on best effort
13 - support bypassing docs build by supplying a prebuilt
14 docs html tarball in the third-party source library,
17 python-3.x.y-docs-html.tar.bz2
20 - support Intel 64-bit-only () and 32-bit-only installer builds
21 - build and use internal Tcl/Tk 8.6 for 10.6+ builds
22 - deprecate use of explicit SDK (--sdk-path=) since all but the oldest
27 supported with build-installer.
28 - use generic "gcc" as compiler (CC env var) rather than "gcc-4.2"
31 - test building with SDKROOT and DEVELOPER_DIR xcrun env variables
72 QUOTED_VALUE='quotes' -> str('quotes')
73 UNQUOTED_VALUE=noquotes -> str('noquotes')
80 raise RuntimeError("Cannot find variable %s" % variable[:-1])
103 _cache_getFullVersion = ln.split()[-1][1:-1]
108 FW_VERSION_PREFIX = "--undefined--" # initialized in parseOptions
109 FW_SSL_DIRECTORY = "--undefined--" # initialized in parseOptions
112 WORKDIR = "/tmp/_py" variable
114 # The directory we'll use to store third-party sources. Set this to something
115 # else if you don't want to re-fetch required libraries every time.
116 DEPSRC = os.path.join(WORKDIR, 'third-party')
117 DEPSRC = os.path.expanduser('~/Universal/other-sources')
120 '32-bit': ('i386', 'ppc',),
121 '64-bit': ('x86_64', 'ppc64',),
123 'intel-32': ('i386',),
124 'intel-64': ('x86_64',),
125 '3-way': ('ppc', 'i386', 'x86_64'),
129 '64-bit': '10.5',
130 '3-way': '10.5',
132 'intel-32': '10.4',
133 'intel-64': '10.5',
139 UNIVERSALARCHS = '32-bit'
150 # $MACOSX_DEPLOYMENT_TARGET -> minimum OS X level
161 '10.4': ('gcc-4.0', 'g++-4.0'),
175 -? or -h: Show this message
176 -b DIR
177 --build-dir=DIR: Create build here (default: %(WORKDIR)r)
178 --third-party=DIR: Store third-party sources here (default: %(DEPSRC)r)
179 --sdk-path=DIR: Location of the SDK (deprecated, use SDKROOT env variable)
180 --src-dir=DIR: Location of the Python sources (default: %(SRCDIR)r)
181 --dep-target=10.n macOS deployment target (default: %(DEPTARGET)r)
182--universal-archs=x universal architectures (options: %(UNIVERSALOPTS)r, default: %(UNIVERSALARCH…
246 url="https://www.openssl.org/source/openssl-1.1.1g.tar.gz",
252 "openssl-mac-arm64.patch",
276 url="ftp://ftp.tcl.tk/pub/tcl//tcl8_6/tcl%s-src.tar.gz"%(tcl_tk_ver,),
280 '--enable-shared',
281 '--enable-threads',
282 '--libdir=/Library/Frameworks/Python.framework/Versions/%s/lib'%(getVersion(),),
287 "DESTDIR": shellQuote(os.path.join(WORKDIR, 'libraries')),
293 url="ftp://ftp.tcl.tk/pub/tcl//tcl8_6/tk%s-src.tar.gz"%(tcl_tk_ver,),
298 '--enable-aqua',
299 '--enable-shared',
300 '--enable-threads',
301 '--libdir=/Library/Frameworks/Python.framework/Versions/%s/lib'%(getVersion(),),
305 "DESTDIR": shellQuote(os.path.join(WORKDIR, 'libraries')),
316 url="http://tukaani.org/xz/xz-5.2.3.tar.gz",
319 '--disable-dependency-tracking',
327 url="http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz",
330 "--enable-widec",
331 "--without-cxx",
332 "--without-cxx-binding",
333 "--without-ada",
334 "--without-curses-h",
335 "--enable-shared",
336 "--with-shared",
337 "--without-debug",
338 "--without-normal",
339 "--without-tests",
340 "--without-manpages",
341 "--datadir=/usr/share",
342 "--sysconfdir=/etc",
343 "--sharedstatedir=/usr/com",
344 "--with-terminfo-dirs=/usr/share/terminfo",
345 "--with-default-terminfo-dir=/usr/share/terminfo",
346 "--libdir=/Library/Frameworks/Python.framework/Versions/%s/lib"%(getVersion(),),
349 ("ftp://ftp.invisible-island.net/ncurses//5.9/ncurses-5.9-20120616-patch.sh.bz2",
353 …install='make && make install DESTDIR=%s && cd %s/usr/local/lib && ln -fs ../../../Library/Framewo…
354 shellQuote(os.path.join(WORKDIR, 'libraries')),
355 shellQuote(os.path.join(WORKDIR, 'libraries')),
361 url="https://sqlite.org/2020/sqlite-autoconf-3330000.tar.gz",
363 extra_cflags=('-Os '
364 '-DSQLITE_ENABLE_FTS5 '
365 '-DSQLITE_ENABLE_FTS4 '
366 '-DSQLITE_ENABLE_FTS3_PARENTHESIS '
367 '-DSQLITE_ENABLE_JSON1 '
368 '-DSQLITE_ENABLE_RTREE '
369 '-DSQLITE_TCL=0 '
370 '%s' % ('','-DSQLITE_WITHOUT_ZONEMALLOC ')[LT_10_5]),
372 '--enable-threadsafe',
373 '--enable-shared=no',
374 '--enable-static=yes',
375 '--disable-readline',
376 '--disable-dependency-tracking',
385 url="http://bzip.org/1.0.6/bzip2-1.0.6.tar.gz",
388 install='make install CC=%s CXX=%s, PREFIX=%s/usr/local/ CFLAGS="-arch %s"'%(
390 shellQuote(os.path.join(WORKDIR, 'libraries')),
391 ' -arch '.join(ARCHLIST),
396 url="http://www.gzip.org/zlib/zlib-1.2.3.tar.gz",
399 install='make install CC=%s CXX=%s, prefix=%s/usr/local/ CFLAGS="-arch %s"'%(
401 shellQuote(os.path.join(WORKDIR, 'libraries')),
402 ' -arch '.join(ARCHLIST),
408 url="http://ftp.gnu.org/pub/gnu/readline/readline-6.1.tar.gz" ,
414 ('http://ftp.gnu.org/pub/gnu/readline/readline-6.1-patches/readline61-001',
416 ('http://ftp.gnu.org/pub/gnu/readline/readline-6.1-patches/readline61-002',
426 url="http://download.oracle.com/berkeley-db/db-4.7.25.tar.gz",
431 '--includedir=/usr/local/include/db4',
470 long_name="UNIX command-line tools",
505 postflight="scripts/postflight.patch-profile",
507 source="/empty-dir",
520 source="/empty-dir",
602 # 1. there is a user-installed framework (usually ActiveTcl) in (or linked
604 # enforce that the version of the user-installed framework also
605 # exists in the system-supplied Tcl/Tk frameworks. Time to support
625 print(" -- Building with external Tcl/Tk %s frameworks"
636 print(" -- Building private copy of Tcl/Tk")
664 global WORKDIR, DEPSRC, SRCDIR, DEPTARGET
674 [ 'build-dir=', 'third-party=', 'sdk-path=' , 'src-dir=',
675 'dep-target=', 'universal-archs=', 'help' ])
686 if k in ('-h', '-?', '--help'):
690 elif k in ('-d', '--build-dir'):
691 WORKDIR=v
693 elif k in ('--third-party',):
696 elif k in ('--sdk-path',):
697 print(" WARNING: --sdk-path is no longer supported")
699 elif k in ('--src-dir',):
702 elif k in ('--dep-target', ):
706 elif k in ('--universal-archs', ):
721 WORKDIR=os.path.abspath(WORKDIR)
729 print("-- Settings:")
731 print(" * Build directory: %s" % WORKDIR)
732 print(" * Third-party source: %s" % DEPSRC)
738 print(" -- Building a Python %s framework at patch level %s"
751 the archive ends with "-src" but the uncompressed directory does not.
758 retval = os.path.basename(archiveName[:-7])
760 and retval.endswith('-src')):
761 retval = retval[:-4]
767 retval = os.path.basename(archiveName[:-8])
773 retval = os.path.basename(archiveName[:-4])
779 retval = os.path.basename(archiveName[:-4])
849 "i386": ["darwin-i386-cc"],
850 "x86_64": ["darwin64-x86_64-cc", "enable-ec_nistp_64_gcc_128"],
851 "arm64": ["darwin64-arm64-cc"],
852 "ppc": ["darwin-ppc-cc"],
853 "ppc64": ["darwin64-ppc-cc"],
857 # "enable-ec_nistp_64_gcc_128" option to get compile errors when
858 # building on our 10.6 gcc-4.2 environment. There have been other
860 # So, for now, do not try to use "enable-ec_nistp_64_gcc_128" when
863 arch_opts['x86_64'].remove('enable-ec_nistp_64_gcc_128')
866 "no-idea",
867 "no-mdc2",
868 "no-rc5",
869 "no-zlib",
870 "no-ssl3",
871 # "enable-unit-test",
873 "--prefix=%s"%os.path.join("/", *FW_VERSION_PREFIX),
874 "--openssldir=%s"%os.path.join("/", *FW_SSL_DIRECTORY),
877 configure_opts.append("no-asm")
888 os.path.basename(srcdir) + "-universal")
910 # copy arch-independent files from last build into the basedir framework
919 # e.g. -> "1.0.0"
922 # e.g. -> "libcrypto.1.0.0.dylib"
925 # e.g. -> "libssl.1.0.0.dylib"
932 # merge the individual arch-dependent shared libs into a fat shared lib
938 runCommand("lipo -create -output " +
947 # and the versioned links so that the setup.py post-build import test
968 to customize this process, basically a poor-mans DarwinPorts.
980 archiveName = os.path.split(url)[-1]
988 buildDir=os.path.join(WORKDIR, '_bld')
992 workDir = extractArchive(buildDir, sourceArchive)
993 os.chdir(workDir)
1003 runCommand('patch -p%s < %s'%(recipe.get('patchlevel', 1),
1015 runCommand('bunzip2 -fk %s' % shellQuote(fn))
1016 fn = fn[:-4]
1025 "--prefix=/usr/local",
1026 "--enable-static",
1027 "--disable-shared",
1028 #"CPP=gcc -arch %s -E"%(' -arch '.join(archList,),),
1033 if '--disable-static' in args:
1034 configure_args.remove('--enable-static')
1035 if '--enable-shared' in args:
1036 configure_args.remove('--disable-shared')
1041 "CFLAGS=%s-mmacosx-version-min=%s -arch %s "
1042 "-I%s/usr/local/include"%(
1045 ' -arch '.join(archList),
1046 shellQuote(basedir)[1:-1],),
1047 "LDFLAGS=-mmacosx-version-min=%s -L%s/usr/local/lib -arch %s"%(
1049 shellQuote(basedir)[1:-1],
1050 ' -arch '.join(archList)),
1054 "CFLAGS=%s-mmacosx-version-min=%s -arch %s "
1055 "-I%s/usr/local/include"%(
1058 ' -arch '.join(archList),
1059 shellQuote(basedir)[1:-1],),
1072 # call special-case build recipe, e.g. for openssl
1086 Build our dependencies into $WORKDIR/libraries/usr/local
1091 universal = os.path.join(WORKDIR, 'libraries')
1105 rootDir = os.path.join(WORKDIR, '_root')
1112 # Search third-party source directory for a pre-built version of the docs.
1114 # python-3.9.0b1-docs-html.tar.bz2
1116 if f.startswith('python-'+getFullVersion())
1117 if f.endswith('-docs-html.tar.bz2') ]
1126 # see if tar extracted a directory ending in -docs-html
1128 if f.endswith('-docs-html')
1133 print(' -- using pre-built python documentation from %s'%archivefile)
1141 runCommand('venv/bin/python3 -m pip install -U Sphinx==2.3.1')
1150 buildDir = os.path.join(WORKDIR, '_bld', 'python')
1151 rootDir = os.path.join(WORKDIR, '_root')
1159 os.makedirs(os.path.join(rootDir, 'empty-dir'))
1172 runCommand("%s -C --enable-framework --enable-universalsdk=/ "
1173 "--with-universal-archs=%s "
1179 "LDFLAGS='-g -L%s/libraries/usr/local/lib' "
1180 "CFLAGS='-g -I%s/libraries/usr/local/include' 2>&1"%(
1183 (' ', '--with-computed-gotos ')[PYTHON_3],
1184 (' ', '--without-ensurepip ')[PYTHON_3],
1185 (' ', "--with-openssl='%s/libraries/usr/local'"%(
1186 shellQuote(WORKDIR)[1:-1],))[PYTHON_3],
1187 (' ', "--with-tcltk-includes='-I%s/libraries/usr/local/include'"%(
1188 shellQuote(WORKDIR)[1:-1],))[internalTk()],
1189 (' ', "--with-tcltk-libs='-L%s/libraries/usr/local/lib -ltcl8.6 -ltk8.6'"%(
1190 shellQuote(WORKDIR)[1:-1],))[internalTk()],
1191 shellQuote(WORKDIR)[1:-1],
1192 shellQuote(WORKDIR)[1:-1]))
1197 # DYLD_LIBRARY_PATH, pointing to the third-party libs,
1198 # in build-installer.py's process environment and it was
1209 os.path.join(WORKDIR, 'libraries', 'usr', 'local', 'lib'),
1245 if os.path.exists(os.path.join(WORKDIR, 'libraries', 'Library')):
1247 WORKDIR, 'libraries', 'Library', 'Frameworks',
1250 WORKDIR, '_root', 'Library', 'Frameworks',
1257 runCommand("rm -r %s/pkgconfig"%(
1277 os.chown(os.path.join(dirpath, dn), -1, gid)
1287 os.chown(p, -1, gid)
1292 data = captureCommand("otool -L %s" % shellQuote(p))
1320 config_suffix = '-' + LDVERSION
1322 config_suffix = config_suffix + '-darwin'
1328 # the end-users system. Also remove the directories from _sysconfigdata.py
1331 include_path = '-I%s/libraries/usr/local/include' % (WORKDIR,)
1332 lib_path = '-L%s/libraries/usr/local/lib' % (WORKDIR,)
1363 # XXX this is extra-fragile
1442 pkgname = '%s-%s'%(recipe['name'], getVersion())
1449 print("- building package %s"%(pkgname,))
1464 srcdir = os.path.join(WORKDIR, '_root', srcdir[1:])
1475 … runCommand("pax -wf %s . 2>&1"%(shellQuote(os.path.join(packageContents, 'Archive.pax')),))
1476 … runCommand("gzip -9 %s 2>&1"%(shellQuote(os.path.join(packageContents, 'Archive.pax')),))
1543 IFPkgFlagPackageLocation='%s-%s.pkg'%(item['name'], getVersion()),
1560 for dirpath, _, filenames in os.walk(os.path.join(WORKDIR, '_root')):
1565 outdir = os.path.join(WORKDIR, 'installer')
1604 data = captureCommand("du -ks %s"%(
1605 shellQuote(os.path.join(WORKDIR, '_root'))))
1614 outdir = os.path.join(WORKDIR, 'diskimage')
1623 # '10.9' as before for 10.9+ variant, '11.0' for universal2 11.0-.
1628 'python-%s-macosx%s'%(getFullVersion(),build_system_version))
1630 imagepath = imagepath + '-%04d-%02d-%02d'%(time.localtime()[:3])
1640 cmd = ("hdiutil create -format UDRW -volname %s -srcfolder %s -size 100m %s"%(
1642 shellQuote(os.path.join(WORKDIR, 'installer')),
1651 print(" -- retrying hdiutil create")
1656 if not os.path.exists(os.path.join(WORKDIR, "mnt")):
1657 os.mkdir(os.path.join(WORKDIR, "mnt"))
1658 runCommand("hdiutil attach %s -mountroot %s"%(
1659 shellQuote(imagepath + ".tmp.dmg"), shellQuote(os.path.join(WORKDIR, "mnt"))))
1663 os.path.join(WORKDIR, "mnt", volname, ".VolumeIcon.icns"))
1664 runCommand("SetFile -a C %s/"%(
1665 shellQuote(os.path.join(WORKDIR, "mnt", volname)),))
1667 runCommand("hdiutil detach %s"%(shellQuote(os.path.join(WORKDIR, "mnt", volname))))
1670 runCommand("hdiutil convert %s -format UDZO -o %s"%(
1692 runCommand("cc -o %s %s/seticon.m -framework Cocoa"%(
1707 if os.path.exists(WORKDIR):
1708 shutil.rmtree(WORKDIR)
1709 os.mkdir(WORKDIR)
1713 # Then build third-party libraries such as sleepycat DB4.
1724 # be (re-)installed.
1730 folder = os.path.join(WORKDIR, "_root", "Applications", "Python %s"%(
1737 patchScript("scripts/postflight.patch-profile", fn)
1748 os.path.join(WORKDIR, 'installer', 'ReadMe.rtf'))
1752 os.path.join(WORKDIR, 'installer', 'License.rtf'))
1754 fp = open(os.path.join(WORKDIR, 'installer', 'Build.txt'), 'w')