• Home
  • Raw
  • Download

Lines Matching refs:os

42 import platform, os, sys, getopt, textwrap, shutil, stat, time, pwd, grp
94 os.path.join(SRCDIR, 'configure'), 'PACKAGE_VERSION')
106 fn = os.path.join(SRCDIR, 'Include', 'patchlevel.h')
122 DEPSRC = os.path.join(WORKDIR, 'third-party')
123 DEPSRC = os.path.expanduser('~/Universal/other-sources')
148 SRCDIR = os.path.dirname(
149 os.path.dirname(
150 os.path.dirname(
151 os.path.abspath(__file__
241 "DESTDIR": shellQuote(os.path.join(WORKDIR, 'libraries')),
261 "DESTDIR": shellQuote(os.path.join(WORKDIR, 'libraries')),
310 shellQuote(os.path.join(WORKDIR, 'libraries')),
311 shellQuote(os.path.join(WORKDIR, 'libraries')),
346 shellQuote(os.path.join(WORKDIR, 'libraries')),
357 shellQuote(os.path.join(WORKDIR, 'libraries')),
504 fd = os.popen(commandline, 'r')
515 fd = os.popen(commandline, 'r')
567 libfw = os.path.join('/', fwpth)
568 usrfw = os.path.join(os.getenv('HOME'), fwpth)
569 frameworks[framework] = os.readlink(libfw)
570 if not os.path.exists(libfw):
574 if os.path.exists(usrfw):
598 for ev in list(os.environ):
602 ev, os.environ[ev]))
603 del os.environ[ev]
606 if 'SDK_TOOLS_BIN' in os.environ:
607 base_path = os.environ['SDK_TOOLS_BIN'] + ':' + base_path
611 if os.path.isdir(OLD_DEVELOPER_TOOLS):
613 os.environ['PATH'] = base_path
614 print("Setting default PATH: %s"%(os.environ['PATH']))
679 SRCDIR=os.path.abspath(SRCDIR)
680 WORKDIR=os.path.abspath(WORKDIR)
681 DEPSRC=os.path.abspath(DEPSRC)
713 curdir = os.getcwd()
715 os.chdir(builddir)
717 retval = os.path.basename(archiveName[:-7])
721 if os.path.exists(retval):
723 fp = os.popen("tar zxf %s 2>&1"%(shellQuote(archiveName),), 'r')
726 retval = os.path.basename(archiveName[:-8])
727 if os.path.exists(retval):
729 fp = os.popen("tar jxf %s 2>&1"%(shellQuote(archiveName),), 'r')
732 retval = os.path.basename(archiveName[:-4])
733 if os.path.exists(retval):
735 fp = os.popen("tar xf %s 2>&1"%(shellQuote(archiveName),), 'r')
738 retval = os.path.basename(archiveName[:-4])
739 if os.path.exists(retval):
741 fp = os.popen("unzip %s 2>&1"%(shellQuote(archiveName),), 'r')
749 return os.path.join(builddir, retval)
752 os.chdir(curdir)
769 os.unlink(fname)
778 name = os.path.basename(fname)
779 if os.path.exists(fname):
786 if os.system(
821 "--prefix=%s"%os.path.join("/", *FW_VERSION_PREFIX),
822 "--openssldir=%s"%os.path.join("/", *FW_SSL_DIRECTORY),
834 srcdir = os.getcwd()
835 universalbase = os.path.join(srcdir, "..",
836 os.path.basename(srcdir) + "-universal")
837 os.mkdir(universalbase)
841 archsrc = os.path.join(universalbase, arch, "src")
844 archbase = os.path.join(universalbase, arch, "root")
845 os.mkdir(archbase)
850 archbasefw = os.path.join(archbase, *FW_VERSION_PREFIX)
853 os.chdir(archsrc)
855 os.chdir(srcdir)
859 basefw = os.path.join(basedir, *FW_VERSION_PREFIX)
861 os.path.join(archbasefw, "include", "openssl"),
862 os.path.join(basefw, "include", "openssl")
865 shlib_version_number = grepValue(os.path.join(archsrc, "Makefile"),
876 os.mkdir(os.path.join(basefw, "lib"))
888 os.path.join(fw, "lib", lib_versioned))
891 os.symlink(lib_versioned, os.path.join(basefw, "lib", lib_unversioned))
897 relative_path = os.path.join("..", "..", "..", *FW_VERSION_PREFIX)
905 os.symlink(
906 os.path.join(relative_path, *fn),
907 os.path.join(basedir, "usr", "local", *fn)
918 curdir = os.getcwd()
928 archiveName = os.path.split(url)[-1]
929 sourceArchive = os.path.join(DEPSRC, archiveName)
931 if not os.path.exists(DEPSRC):
932 os.mkdir(DEPSRC)
936 buildDir=os.path.join(WORKDIR, '_bld')
937 if not os.path.exists(buildDir):
938 os.mkdir(buildDir)
941 os.chdir(workDir)
946 fn = os.path.join(DEPSRC, os.path.basename(url))
950 fn = os.path.join(curdir, patch)
957 fn = os.path.join(DEPSRC, os.path.basename(url))
961 fn = os.path.join(curdir, patchscript)
966 os.unlink(fn)
969 os.chdir(recipe['buildDir'])
1030 os.chdir(curdir)
1039 universal = os.path.join(WORKDIR, 'libraries')
1040 os.mkdir(universal)
1041 os.makedirs(os.path.join(universal, 'usr', 'local', 'lib'))
1042 os.makedirs(os.path.join(universal, 'usr', 'local', 'include'))
1053 rootDir = os.path.join(WORKDIR, '_root')
1054 buildDir = os.path.join('../../Doc')
1055 docdir = os.path.join(rootDir, 'pydocs')
1056 curDir = os.getcwd()
1057 os.chdir(buildDir)
1062 os.chdir(curDir)
1063 if not os.path.exists(docdir):
1064 os.mkdir(docdir)
1065 os.rename(os.path.join(buildDir, 'build', 'html'), docdir)
1071 buildDir = os.path.join(WORKDIR, '_bld', 'python')
1072 rootDir = os.path.join(WORKDIR, '_root')
1074 if os.path.exists(buildDir):
1076 if os.path.exists(rootDir):
1078 os.makedirs(buildDir)
1079 os.makedirs(rootDir)
1080 os.makedirs(os.path.join(rootDir, 'empty-dir'))
1081 curdir = os.getcwd()
1082 os.chdir(buildDir)
1091 os.environ['DYLD_LIBRARY_PATH'] = os.path.join(WORKDIR,
1102 shellQuote(os.path.join(SRCDIR, 'configure')),
1125 make_extras = os.getenv("BUILDINSTALLER_BUILDPYTHON_MAKE_EXTRAS")
1141 del os.environ['DYLD_LIBRARY_PATH']
1143 if os.path.exists(os.path.join(WORKDIR, 'libraries', 'Library')):
1144 build_lib_dir = os.path.join(
1147 fw_lib_dir = os.path.join(
1161 frmDir = os.path.join(rootDir, 'Library', 'Frameworks', 'Python.framework')
1162 frmDirVersioned = os.path.join(frmDir, 'Versions', version)
1163 path_to_lib = os.path.join(frmDirVersioned, 'lib', 'python%s'%(version,))
1165 sslDir = os.path.join(frmDirVersioned, 'etc', 'openssl')
1166 os.makedirs(sslDir)
1172 for dirpath, dirnames, filenames in os.walk(frmDir):
1174 os.chmod(os.path.join(dirpath, dn), STAT_0o775)
1175 os.chown(os.path.join(dirpath, dn), -1, gid)
1178 if os.path.islink(fn):
1182 p = os.path.join(dirpath, fn)
1183 st = os.stat(p)
1184 os.chmod(p, stat.S_IMODE(st.st_mode) | stat.S_IWGRP)
1185 os.chown(p, -1, gid)
1205 fp = open(os.path.join(buildDir, 'Makefile'), 'r')
1232 path = os.path.join(path_to_lib, 'config' + config_suffix, 'Makefile')
1261 path = os.path.join(path_to_lib, '_sysconfigdata_m_darwin_darwin.py')
1263 path = os.path.join(path_to_lib, '_sysconfigdata.py')
1286 usr_local_bin = os.path.join(rootDir, 'usr', 'local', 'bin')
1287 to_framework = os.path.join('..', '..', '..', 'Library', 'Frameworks',
1289 if os.path.exists(usr_local_bin):
1291 os.makedirs(usr_local_bin)
1292 for fn in os.listdir(
1293 os.path.join(frmDir, 'Versions', version, 'bin')):
1294 os.symlink(os.path.join(to_framework, fn),
1295 os.path.join(usr_local_bin, fn))
1297 os.chdir(curdir)
1302 os.unlink(os.path.join(rootDir, 'Library', 'Frameworks',
1328 os.chmod(outPath, STAT_0o755)
1333 curdir = os.getcwd()
1360 srcdir = os.path.join(WORKDIR, '_root', srcdir[1:])
1364 postflight = os.path.abspath(postflight)
1366 packageContents = os.path.join(targetDir, pkgname + '.pkg', 'Contents')
1367 os.makedirs(packageContents)
1370 os.chdir(srcdir)
1371 … runCommand("pax -wf %s . 2>&1"%(shellQuote(os.path.join(packageContents, 'Archive.pax')),))
1372 … runCommand("gzip -9 %s 2>&1"%(shellQuote(os.path.join(packageContents, 'Archive.pax')),))
1373 … runCommand("mkbom . %s 2>&1"%(shellQuote(os.path.join(packageContents, 'Archive.bom')),))
1375 fn = os.path.join(packageContents, 'PkgInfo')
1380 rsrcDir = os.path.join(packageContents, "Resources")
1381 os.mkdir(rsrcDir)
1382 fp = open(os.path.join(rsrcDir, 'ReadMe.txt'), 'w')
1387 patchScript(postflight, os.path.join(rsrcDir, 'postflight'))
1411 writePlist(pl, os.path.join(packageContents, 'Info.plist'))
1418 writePlist(pl, os.path.join(packageContents, 'Resources', 'Description.plist'))
1421 os.chdir(curdir)
1456 for dirpath, _, filenames in os.walk(os.path.join(WORKDIR, '_root')):
1459 os.unlink(os.path.join(dirpath, fn))
1461 outdir = os.path.join(WORKDIR, 'installer')
1462 if os.path.exists(outdir):
1464 os.mkdir(outdir)
1466 pkgroot = os.path.join(outdir, 'Python.mpkg', 'Contents')
1467 pkgcontents = os.path.join(pkgroot, 'Packages')
1468 os.makedirs(pkgcontents)
1472 rsrcDir = os.path.join(pkgroot, 'Resources')
1474 fn = os.path.join(pkgroot, 'PkgInfo')
1479 os.mkdir(rsrcDir)
1481 makeMpkgPlist(os.path.join(pkgroot, 'Info.plist'))
1487 writePlist(pl, os.path.join(pkgroot, 'Resources', 'Description.plist'))
1488 for fn in os.listdir('resources'):
1491 shutil.copy(os.path.join('resources', fn), os.path.join(rsrcDir, fn))
1493 patchFile(os.path.join('resources', fn), os.path.join(rsrcDir, fn))
1501 shellQuote(os.path.join(WORKDIR, '_root'))))
1510 outdir = os.path.join(WORKDIR, 'diskimage')
1511 if os.path.exists(outdir):
1514 imagepath = os.path.join(outdir,
1520 os.mkdir(outdir)
1529 shellQuote(os.path.join(WORKDIR, 'installer')),
1532 fd = os.popen(cmd, 'r')
1543 if not os.path.exists(os.path.join(WORKDIR, "mnt")):
1544 os.mkdir(os.path.join(WORKDIR, "mnt"))
1546 shellQuote(imagepath + ".tmp.dmg"), shellQuote(os.path.join(WORKDIR, "mnt"))))
1550 os.path.join(WORKDIR, "mnt", volname, ".VolumeIcon.icns"))
1552 shellQuote(os.path.join(WORKDIR, "mnt", volname)),))
1554 runCommand("hdiutil detach %s"%(shellQuote(os.path.join(WORKDIR, "mnt", volname))))
1561 os.unlink(imagepath + ".tmp.dmg")
1571 dirPath = os.path.normpath(os.path.dirname(__file__))
1572 toolPath = os.path.join(dirPath, "seticon.app/Contents/MacOS/seticon")
1573 …if not os.path.exists(toolPath) or os.stat(toolPath).st_mtime < os.stat(dirPath + '/seticon.m').st…
1576 appPath = os.path.join(dirPath, "seticon.app/Contents/MacOS")
1577 if not os.path.exists(appPath):
1578 os.makedirs(appPath)
1582 runCommand("%s %s %s"%(shellQuote(os.path.abspath(toolPath)), shellQuote(icnsPath),
1590 os.environ['MACOSX_DEPLOYMENT_TARGET'] = DEPTARGET
1591 os.environ['CC'] = CC
1592 os.environ['CXX'] = CXX
1594 if os.path.exists(WORKDIR):
1596 os.mkdir(WORKDIR)
1598 os.environ['LC_ALL'] = 'C'
1612 del os.environ['MACOSX_DEPLOYMENT_TARGET']
1617 folder = os.path.join(WORKDIR, "_root", "Applications", "Python %s"%(
1619 fn = os.path.join(folder, "License.rtf")
1621 fn = os.path.join(folder, "ReadMe.rtf")
1623 fn = os.path.join(folder, "Update Shell Profile.command")
1625 fn = os.path.join(folder, "Install Certificates.command")
1627 os.chmod(folder, STAT_0o755)
1635 os.path.join(WORKDIR, 'installer', 'ReadMe.rtf'))
1639 os.path.join(WORKDIR, 'installer', 'License.rtf'))
1641 fp = open(os.path.join(WORKDIR, 'installer', 'Build.txt'), 'w')
1644 fp.write("# By: %s\n" % pwd.getpwuid(os.getuid()).pw_gecos)