• Home
  • Raw
  • Download

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

6 - support Intel 64-bit-only () and 32-bit-only installer builds
7 - build and link with private Tcl/Tk 8.6 for 10.9+ builds
8 - deprecate use of explicit SDK (--sdk-path=) since all but the oldest
13 supported with build-installer.
14 - use generic "gcc" as compiler (CC env var) rather than "gcc-4.2"
21 Sphinx, build-installer.py should also be converted to use python3!
23 For 10.9 or greater deployment targets, build-installer builds and links
25 apply. Otherwise, build-installer requires an installed third-party version
73 QUOTED_VALUE='quotes' -> str('quotes')
74 UNQUOTED_VALUE=noquotes -> str('noquotes')
81 raise RuntimeError("Cannot find variable %s" % variable[:-1])
104 _cache_getFullVersion = ln.split()[-1][1:-1]
109 FW_VERSION_PREFIX = "--undefined--" # initialized in parseOptions
110 FW_SSL_DIRECTORY = "--undefined--" # initialized in parseOptions
113 WORKDIR = "/tmp/_py" variable
115 # The directory we'll use to store third-party sources. Set this to something
116 # else if you don't want to re-fetch required libraries every time.
117 DEPSRC = os.path.join(WORKDIR, 'third-party')
118 DEPSRC = os.path.expanduser('~/Universal/other-sources')
120 universal_opts_map = { '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'),
128 '64-bit': '10.5',
129 '3-way': '10.5',
131 'intel-32': '10.4',
132 'intel-64': '10.5',
138 UNIVERSALARCHS = '32-bit'
149 # $MACOSX_DEPLOYMENT_TARGET -> minimum OS X level
157 '10.4': ('gcc-4.0', 'g++-4.0'),
172 -? or -h: Show this message
173 -b DIR
174 --build-dir=DIR: Create build here (default: %(WORKDIR)r)
175 --third-party=DIR: Store third-party sources here (default: %(DEPSRC)r)
176 --sdk-path=DIR: Location of the SDK (deprecated, use SDKROOT env variable)
177 --src-dir=DIR: Location of the Python sources (default: %(SRCDIR)r)
178 --dep-target=10.n macOS deployment target (default: %(DEPTARGET)r)
179--universal-archs=x universal architectures (options: %(UNIVERSALOPTS)r, default: %(UNIVERSALARCH…
215 url="https://www.openssl.org/source/openssl-1.0.2p.tar.gz",
227 url="ftp://ftp.tcl.tk/pub/tcl//tcl8_6/tcl8.6.8-src.tar.gz",
231 '--enable-shared',
232 '--enable-threads',
233 '--libdir=/Library/Frameworks/Python.framework/Versions/%s/lib'%(getVersion(),),
237 "DESTDIR": shellQuote(os.path.join(WORKDIR, 'libraries')),
243 url="ftp://ftp.tcl.tk/pub/tcl//tcl8_6/tk8.6.8-src.tar.gz",
250 '--enable-aqua',
251 '--enable-shared',
252 '--enable-threads',
253 '--libdir=/Library/Frameworks/Python.framework/Versions/%s/lib'%(getVersion(),),
257 "DESTDIR": shellQuote(os.path.join(WORKDIR, 'libraries')),
268 url="http://tukaani.org/xz/xz-5.2.3.tar.gz",
271 '--disable-dependency-tracking',
279 url="http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz",
282 "--enable-widec",
283 "--without-cxx",
284 "--without-cxx-binding",
285 "--without-ada",
286 "--without-curses-h",
287 "--enable-shared",
288 "--with-shared",
289 "--without-debug",
290 "--without-normal",
291 "--without-tests",
292 "--without-manpages",
293 "--datadir=/usr/share",
294 "--sysconfdir=/etc",
295 "--sharedstatedir=/usr/com",
296 "--with-terminfo-dirs=/usr/share/terminfo",
297 "--with-default-terminfo-dir=/usr/share/terminfo",
298 "--libdir=/Library/Frameworks/Python.framework/Versions/%s/lib"%(getVersion(),),
301 ("ftp://invisible-island.net/ncurses//5.9/ncurses-5.9-20120616-patch.sh.bz2",
305 …install='make && make install DESTDIR=%s && cd %s/usr/local/lib && ln -fs ../../../Library/Framewo…
306 shellQuote(os.path.join(WORKDIR, 'libraries')),
307 shellQuote(os.path.join(WORKDIR, 'libraries')),
313 url="https://www.sqlite.org/2018/sqlite-autoconf-3220000.tar.gz",
315 extra_cflags=('-Os '
316 '-DSQLITE_ENABLE_FTS5 '
317 '-DSQLITE_ENABLE_FTS4 '
318 '-DSQLITE_ENABLE_FTS3_PARENTHESIS '
319 '-DSQLITE_ENABLE_JSON1 '
320 '-DSQLITE_ENABLE_RTREE '
321 '-DSQLITE_TCL=0 '
322 '%s' % ('','-DSQLITE_WITHOUT_ZONEMALLOC ')[LT_10_5]),
324 '--enable-threadsafe',
325 '--enable-shared=no',
326 '--enable-static=yes',
327 '--disable-readline',
328 '--disable-dependency-tracking',
337 url="http://bzip.org/1.0.6/bzip2-1.0.6.tar.gz",
340 install='make install CC=%s CXX=%s, PREFIX=%s/usr/local/ CFLAGS="-arch %s"'%(
342 shellQuote(os.path.join(WORKDIR, 'libraries')),
343 ' -arch '.join(ARCHLIST),
348 url="http://www.gzip.org/zlib/zlib-1.2.3.tar.gz",
351 install='make install CC=%s CXX=%s, prefix=%s/usr/local/ CFLAGS="-arch %s"'%(
353 shellQuote(os.path.join(WORKDIR, 'libraries')),
354 ' -arch '.join(ARCHLIST),
360 url="http://ftp.gnu.org/pub/gnu/readline/readline-6.1.tar.gz" ,
366 ('http://ftp.gnu.org/pub/gnu/readline/readline-6.1-patches/readline61-001',
368 ('http://ftp.gnu.org/pub/gnu/readline/readline-6.1-patches/readline61-002',
378 url="http://download.oracle.com/berkeley-db/db-4.7.25.tar.gz",
383 '--includedir=/usr/local/include/db4',
422 long_name="UNIX command-line tools",
457 postflight="scripts/postflight.patch-profile",
459 source="/empty-dir",
472 source="/empty-dir",
554 # 1. there is a user-installed framework (usually ActiveTcl) in (or linked
556 # enforce that the version of the user-installed framework also
557 # exists in the system-supplied Tcl/Tk frameworks. Time to support
577 print(" -- Building with external Tcl/Tk %s frameworks"
588 print(" -- Building private copy of Tcl/Tk")
612 # Ensure we have access to sphinx-build.
614 runCommand('sphinx-build --version')
620 global WORKDIR, DEPSRC, SRCDIR, DEPTARGET
630 [ 'build-dir=', 'third-party=', 'sdk-path=' , 'src-dir=',
631 'dep-target=', 'universal-archs=', 'help' ])
642 if k in ('-h', '-?', '--help'):
646 elif k in ('-d', '--build-dir'):
647 WORKDIR=v
649 elif k in ('--third-party',):
652 elif k in ('--sdk-path',):
653 print(" WARNING: --sdk-path is no longer supported")
655 elif k in ('--src-dir',):
658 elif k in ('--dep-target', ):
662 elif k in ('--universal-archs', ):
677 WORKDIR=os.path.abspath(WORKDIR)
685 print("-- Settings:")
687 print(" * Build directory: %s" % WORKDIR)
688 print(" * Third-party source: %s" % DEPSRC)
694 print(" -- Building a Python %s framework at patch level %s"
707 the archive ends with "-src" but the uncompressed directory does not.
714 retval = os.path.basename(archiveName[:-7])
716 and retval.endswith('-src')):
717 retval = retval[:-4]
723 retval = os.path.basename(archiveName[:-8])
729 retval = os.path.basename(archiveName[:-4])
735 retval = os.path.basename(archiveName[:-4])
805 "i386": ["darwin-i386-cc"],
806 "x86_64": ["darwin64-x86_64-cc", "enable-ec_nistp_64_gcc_128"],
807 "ppc": ["darwin-ppc-cc"],
808 "ppc64": ["darwin64-ppc-cc"],
811 "no-krb5",
812 "no-idea",
813 "no-mdc2",
814 "no-rc5",
815 "no-zlib",
816 "enable-tlsext",
817 "no-ssl2",
818 "no-ssl3",
819 # "enable-unit-test",
821 "--install_prefix=%s"%shellQuote(archbase),
822 "--prefix=%s"%os.path.join("/", *FW_VERSION_PREFIX),
823 "--openssldir=%s"%os.path.join("/", *FW_SSL_DIRECTORY),
826 configure_opts.append("no-asm")
828 # in use supports dependency rule generation (cc -M) with gcc-4.2
830 # force use of "cc -M" rather than "makedepend".
832 """sed -i "" 's|my $cc_as_makedepend = 0|my $cc_as_makedepend = 1|g' Configure""")
844 os.path.basename(srcdir) + "-universal")
866 # copy arch-independent files from last build into the basedir framework
875 # e.g. -> "1.0.0"
878 # e.g. -> "libcrypto.1.0.0.dylib"
881 # e.g. -> "libssl.1.0.0.dylib"
888 # merge the individual arch-dependent shared libs into a fat shared lib
894 runCommand("lipo -create -output " +
903 # and the versioned links so that the setup.py post-build import test
924 to customize this process, basically a poor-mans DarwinPorts.
936 archiveName = os.path.split(url)[-1]
944 buildDir=os.path.join(WORKDIR, '_bld')
948 workDir = extractArchive(buildDir, sourceArchive)
949 os.chdir(workDir)
959 runCommand('patch -p%s < %s'%(recipe.get('patchlevel', 1),
971 runCommand('bunzip2 -fk %s' % shellQuote(fn))
972 fn = fn[:-4]
981 "--prefix=/usr/local",
982 "--enable-static",
983 "--disable-shared",
984 #"CPP=gcc -arch %s -E"%(' -arch '.join(archList,),),
989 if '--disable-static' in args:
990 configure_args.remove('--enable-static')
991 if '--enable-shared' in args:
992 configure_args.remove('--disable-shared')
997 "CFLAGS=%s-mmacosx-version-min=%s -arch %s "
998 "-I%s/usr/local/include"%(
1001 ' -arch '.join(archList),
1002 shellQuote(basedir)[1:-1],),
1003 "LDFLAGS=-mmacosx-version-min=%s -L%s/usr/local/lib -arch %s"%(
1005 shellQuote(basedir)[1:-1],
1006 ' -arch '.join(archList)),
1010 "CFLAGS=%s-mmacosx-version-min=%s -arch %s "
1011 "-I%s/usr/local/include"%(
1014 ' -arch '.join(archList),
1015 shellQuote(basedir)[1:-1],),
1028 # call special-case build recipe, e.g. for openssl
1042 Build our dependencies into $WORKDIR/libraries/usr/local
1047 universal = os.path.join(WORKDIR, 'libraries')
1061 rootDir = os.path.join(WORKDIR, '_root')
1069 # Assume sphinx-build is on our PATH, checked in checkEnvironment
1084 buildDir = os.path.join(WORKDIR, '_bld', 'python')
1085 rootDir = os.path.join(WORKDIR, '_root')
1093 os.makedirs(os.path.join(rootDir, 'empty-dir'))
1104 os.environ['DYLD_LIBRARY_PATH'] = os.path.join(WORKDIR,
1107 runCommand("%s -C --enable-framework --enable-universalsdk=/ "
1108 "--with-universal-archs=%s "
1113 "LDFLAGS='-g -L%s/libraries/usr/local/lib' "
1114 "CFLAGS='-g -I%s/libraries/usr/local/include' 2>&1"%(
1117 (' ', '--with-computed-gotos ')[PYTHON_3],
1118 (' ', '--without-ensurepip ')[PYTHON_3],
1119 (' ', "--with-tcltk-includes='-I%s/libraries/usr/local/include'"%(
1120 shellQuote(WORKDIR)[1:-1],))[internalTk()],
1121 (' ', "--with-tcltk-libs='-L%s/libraries/usr/local/lib -ltcl8.6 -ltk8.6'"%(
1122 shellQuote(WORKDIR)[1:-1],))[internalTk()],
1123 shellQuote(WORKDIR)[1:-1],
1124 shellQuote(WORKDIR)[1:-1]))
1156 if os.path.exists(os.path.join(WORKDIR, 'libraries', 'Library')):
1158 WORKDIR, 'libraries', 'Library', 'Frameworks',
1161 WORKDIR, '_root', 'Library', 'Frameworks',
1168 runCommand("rm -r %s/pkgconfig"%(
1188 os.chown(os.path.join(dirpath, dn), -1, gid)
1198 os.chown(p, -1, gid)
1203 data = captureCommand("otool -L %s" % shellQuote(p))
1230 config_suffix = '-' + LDVERSION
1232 config_suffix = config_suffix + '-darwin'
1238 # the end-users system. Also remove the directories from _sysconfigdata.py
1241 include_path = '-I%s/libraries/usr/local/include' % (WORKDIR,)
1242 lib_path = '-L%s/libraries/usr/local/lib' % (WORKDIR,)
1273 # XXX this is extra-fragile
1351 pkgname = '%s-%s'%(recipe['name'], getVersion())
1358 print("- building package %s"%(pkgname,))
1373 srcdir = os.path.join(WORKDIR, '_root', srcdir[1:])
1384 … runCommand("pax -wf %s . 2>&1"%(shellQuote(os.path.join(packageContents, 'Archive.pax')),))
1385 … runCommand("gzip -9 %s 2>&1"%(shellQuote(os.path.join(packageContents, 'Archive.pax')),))
1452 IFPkgFlagPackageLocation='%s-%s.pkg'%(item['name'], getVersion()),
1469 for dirpath, _, filenames in os.walk(os.path.join(WORKDIR, '_root')):
1474 outdir = os.path.join(WORKDIR, 'installer')
1513 data = captureCommand("du -ks %s"%(
1514 shellQuote(os.path.join(WORKDIR, '_root'))))
1523 outdir = os.path.join(WORKDIR, 'diskimage')
1528 'python-%s-macosx%s'%(getFullVersion(),DEPTARGET))
1530 imagepath = imagepath + '-%04d-%02d-%02d'%(time.localtime()[:3])
1535 runCommand("hdiutil create -format UDRW -volname %s -srcfolder %s %s"%(
1537 shellQuote(os.path.join(WORKDIR, 'installer')),
1545 if not os.path.exists(os.path.join(WORKDIR, "mnt")):
1546 os.mkdir(os.path.join(WORKDIR, "mnt"))
1547 runCommand("hdiutil attach %s -mountroot %s"%(
1548 shellQuote(imagepath + ".tmp.dmg"), shellQuote(os.path.join(WORKDIR, "mnt"))))
1552 os.path.join(WORKDIR, "mnt", volname, ".VolumeIcon.icns"))
1553 runCommand("SetFile -a C %s/"%(
1554 shellQuote(os.path.join(WORKDIR, "mnt", volname)),))
1556 runCommand("hdiutil detach %s"%(shellQuote(os.path.join(WORKDIR, "mnt", volname))))
1559 runCommand("hdiutil convert %s -format UDZO -o %s"%(
1581 runCommand("cc -o %s %s/seticon.m -framework Cocoa"%(
1596 if os.path.exists(WORKDIR):
1597 shutil.rmtree(WORKDIR)
1598 os.mkdir(WORKDIR)
1602 # Then build third-party libraries such as sleepycat DB4.
1613 # be (re-)installed.
1619 folder = os.path.join(WORKDIR, "_root", "Applications", "Python %s"%(
1626 patchScript("scripts/postflight.patch-profile", fn)
1637 os.path.join(WORKDIR, 'installer', 'ReadMe.rtf'))
1641 os.path.join(WORKDIR, 'installer', 'License.rtf'))
1643 fp = open(os.path.join(WORKDIR, 'installer', 'Build.txt'), 'w')