Lines Matching refs:os
37 import platform, os, sys, getopt, textwrap, shutil, stat, time, pwd, grp
89 os.path.join(SRCDIR, 'configure'), 'PACKAGE_VERSION')
101 fn = os.path.join(SRCDIR, 'Include', 'patchlevel.h')
117 DEPSRC = os.path.join(WORKDIR, 'third-party')
118 DEPSRC = os.path.expanduser('~/Universal/other-sources')
143 SRCDIR = os.path.dirname(
144 os.path.dirname(
145 os.path.dirname(
146 os.path.abspath(__file__
237 "DESTDIR": shellQuote(os.path.join(WORKDIR, 'libraries')),
257 "DESTDIR": shellQuote(os.path.join(WORKDIR, 'libraries')),
306 shellQuote(os.path.join(WORKDIR, 'libraries')),
307 shellQuote(os.path.join(WORKDIR, 'libraries')),
342 shellQuote(os.path.join(WORKDIR, 'libraries')),
353 shellQuote(os.path.join(WORKDIR, 'libraries')),
500 fd = os.popen(commandline, 'r')
511 fd = os.popen(commandline, 'r')
563 libfw = os.path.join('/', fwpth)
564 usrfw = os.path.join(os.getenv('HOME'), fwpth)
565 frameworks[framework] = os.readlink(libfw)
566 if not os.path.exists(libfw):
570 if os.path.exists(usrfw):
594 for ev in list(os.environ):
598 ev, os.environ[ev]))
599 del os.environ[ev]
602 if 'SDK_TOOLS_BIN' in os.environ:
603 base_path = os.environ['SDK_TOOLS_BIN'] + ':' + base_path
607 if os.path.isdir(OLD_DEVELOPER_TOOLS):
609 os.environ['PATH'] = base_path
610 print("Setting default PATH: %s"%(os.environ['PATH']))
676 SRCDIR=os.path.abspath(SRCDIR)
677 WORKDIR=os.path.abspath(WORKDIR)
678 DEPSRC=os.path.abspath(DEPSRC)
710 curdir = os.getcwd()
712 os.chdir(builddir)
714 retval = os.path.basename(archiveName[:-7])
718 if os.path.exists(retval):
720 fp = os.popen("tar zxf %s 2>&1"%(shellQuote(archiveName),), 'r')
723 retval = os.path.basename(archiveName[:-8])
724 if os.path.exists(retval):
726 fp = os.popen("tar jxf %s 2>&1"%(shellQuote(archiveName),), 'r')
729 retval = os.path.basename(archiveName[:-4])
730 if os.path.exists(retval):
732 fp = os.popen("tar xf %s 2>&1"%(shellQuote(archiveName),), 'r')
735 retval = os.path.basename(archiveName[:-4])
736 if os.path.exists(retval):
738 fp = os.popen("unzip %s 2>&1"%(shellQuote(archiveName),), 'r')
746 return os.path.join(builddir, retval)
749 os.chdir(curdir)
766 os.unlink(fname)
775 name = os.path.basename(fname)
776 if os.path.exists(fname):
783 if os.system(
822 "--prefix=%s"%os.path.join("/", *FW_VERSION_PREFIX),
823 "--openssldir=%s"%os.path.join("/", *FW_SSL_DIRECTORY),
842 srcdir = os.getcwd()
843 universalbase = os.path.join(srcdir, "..",
844 os.path.basename(srcdir) + "-universal")
845 os.mkdir(universalbase)
849 archsrc = os.path.join(universalbase, arch, "src")
852 archbase = os.path.join(universalbase, arch, "root")
853 os.mkdir(archbase)
858 archbasefw = os.path.join(archbase, *FW_VERSION_PREFIX)
861 os.chdir(archsrc)
863 os.chdir(srcdir)
867 basefw = os.path.join(basedir, *FW_VERSION_PREFIX)
869 os.path.join(archbasefw, "include", "openssl"),
870 os.path.join(basefw, "include", "openssl")
873 shlib_version_number = grepValue(os.path.join(archsrc, "Makefile"),
884 os.mkdir(os.path.join(basefw, "lib"))
896 os.path.join(fw, "lib", lib_versioned))
899 os.symlink(lib_versioned, os.path.join(basefw, "lib", lib_unversioned))
905 relative_path = os.path.join("..", "..", "..", *FW_VERSION_PREFIX)
913 os.symlink(
914 os.path.join(relative_path, *fn),
915 os.path.join(basedir, "usr", "local", *fn)
926 curdir = os.getcwd()
936 archiveName = os.path.split(url)[-1]
937 sourceArchive = os.path.join(DEPSRC, archiveName)
939 if not os.path.exists(DEPSRC):
940 os.mkdir(DEPSRC)
944 buildDir=os.path.join(WORKDIR, '_bld')
945 if not os.path.exists(buildDir):
946 os.mkdir(buildDir)
949 os.chdir(workDir)
954 fn = os.path.join(DEPSRC, os.path.basename(url))
958 fn = os.path.join(curdir, patch)
965 fn = os.path.join(DEPSRC, os.path.basename(url))
969 fn = os.path.join(curdir, patchscript)
974 os.unlink(fn)
977 os.chdir(recipe['buildDir'])
1038 os.chdir(curdir)
1047 universal = os.path.join(WORKDIR, 'libraries')
1048 os.mkdir(universal)
1049 os.makedirs(os.path.join(universal, 'usr', 'local', 'lib'))
1050 os.makedirs(os.path.join(universal, 'usr', 'local', 'include'))
1061 rootDir = os.path.join(WORKDIR, '_root')
1062 buildDir = os.path.join('../../Doc')
1063 docdir = os.path.join(rootDir, 'pydocs')
1064 curDir = os.getcwd()
1065 os.chdir(buildDir)
1075 os.chdir(curDir)
1076 if not os.path.exists(docdir):
1077 os.mkdir(docdir)
1078 os.rename(os.path.join(buildDir, 'build', 'html'), docdir)
1084 buildDir = os.path.join(WORKDIR, '_bld', 'python')
1085 rootDir = os.path.join(WORKDIR, '_root')
1087 if os.path.exists(buildDir):
1089 if os.path.exists(rootDir):
1091 os.makedirs(buildDir)
1092 os.makedirs(rootDir)
1093 os.makedirs(os.path.join(rootDir, 'empty-dir'))
1094 curdir = os.getcwd()
1095 os.chdir(buildDir)
1104 os.environ['DYLD_LIBRARY_PATH'] = os.path.join(WORKDIR,
1115 shellQuote(os.path.join(SRCDIR, 'configure')),
1138 make_extras = os.getenv("BUILDINSTALLER_BUILDPYTHON_MAKE_EXTRAS")
1154 del os.environ['DYLD_LIBRARY_PATH']
1156 if os.path.exists(os.path.join(WORKDIR, 'libraries', 'Library')):
1157 build_lib_dir = os.path.join(
1160 fw_lib_dir = os.path.join(
1174 frmDir = os.path.join(rootDir, 'Library', 'Frameworks', 'Python.framework')
1175 frmDirVersioned = os.path.join(frmDir, 'Versions', version)
1176 path_to_lib = os.path.join(frmDirVersioned, 'lib', 'python%s'%(version,))
1178 sslDir = os.path.join(frmDirVersioned, 'etc', 'openssl')
1179 os.makedirs(sslDir)
1185 for dirpath, dirnames, filenames in os.walk(frmDir):
1187 os.chmod(os.path.join(dirpath, dn), STAT_0o775)
1188 os.chown(os.path.join(dirpath, dn), -1, gid)
1191 if os.path.islink(fn):
1195 p = os.path.join(dirpath, fn)
1196 st = os.stat(p)
1197 os.chmod(p, stat.S_IMODE(st.st_mode) | stat.S_IWGRP)
1198 os.chown(p, -1, gid)
1218 fp = open(os.path.join(buildDir, 'Makefile'), 'r')
1245 path = os.path.join(path_to_lib, 'config' + config_suffix, 'Makefile')
1274 path = os.path.join(path_to_lib, '_sysconfigdata_m_darwin_darwin.py')
1276 path = os.path.join(path_to_lib, '_sysconfigdata.py')
1299 usr_local_bin = os.path.join(rootDir, 'usr', 'local', 'bin')
1300 to_framework = os.path.join('..', '..', '..', 'Library', 'Frameworks',
1302 if os.path.exists(usr_local_bin):
1304 os.makedirs(usr_local_bin)
1305 for fn in os.listdir(
1306 os.path.join(frmDir, 'Versions', version, 'bin')):
1307 os.symlink(os.path.join(to_framework, fn),
1308 os.path.join(usr_local_bin, fn))
1310 os.chdir(curdir)
1315 os.unlink(os.path.join(rootDir, 'Library', 'Frameworks',
1341 os.chmod(outPath, STAT_0o755)
1346 curdir = os.getcwd()
1373 srcdir = os.path.join(WORKDIR, '_root', srcdir[1:])
1377 postflight = os.path.abspath(postflight)
1379 packageContents = os.path.join(targetDir, pkgname + '.pkg', 'Contents')
1380 os.makedirs(packageContents)
1383 os.chdir(srcdir)
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')),))
1386 … runCommand("mkbom . %s 2>&1"%(shellQuote(os.path.join(packageContents, 'Archive.bom')),))
1388 fn = os.path.join(packageContents, 'PkgInfo')
1393 rsrcDir = os.path.join(packageContents, "Resources")
1394 os.mkdir(rsrcDir)
1395 fp = open(os.path.join(rsrcDir, 'ReadMe.txt'), 'w')
1400 patchScript(postflight, os.path.join(rsrcDir, 'postflight'))
1424 writePlist(pl, os.path.join(packageContents, 'Info.plist'))
1431 writePlist(pl, os.path.join(packageContents, 'Resources', 'Description.plist'))
1434 os.chdir(curdir)
1469 for dirpath, _, filenames in os.walk(os.path.join(WORKDIR, '_root')):
1472 os.unlink(os.path.join(dirpath, fn))
1474 outdir = os.path.join(WORKDIR, 'installer')
1475 if os.path.exists(outdir):
1477 os.mkdir(outdir)
1479 pkgroot = os.path.join(outdir, 'Python.mpkg', 'Contents')
1480 pkgcontents = os.path.join(pkgroot, 'Packages')
1481 os.makedirs(pkgcontents)
1485 rsrcDir = os.path.join(pkgroot, 'Resources')
1487 fn = os.path.join(pkgroot, 'PkgInfo')
1492 os.mkdir(rsrcDir)
1494 makeMpkgPlist(os.path.join(pkgroot, 'Info.plist'))
1500 writePlist(pl, os.path.join(pkgroot, 'Resources', 'Description.plist'))
1501 for fn in os.listdir('resources'):
1504 shutil.copy(os.path.join('resources', fn), os.path.join(rsrcDir, fn))
1506 patchFile(os.path.join('resources', fn), os.path.join(rsrcDir, fn))
1514 shellQuote(os.path.join(WORKDIR, '_root'))))
1523 outdir = os.path.join(WORKDIR, 'diskimage')
1524 if os.path.exists(outdir):
1527 imagepath = os.path.join(outdir,
1533 os.mkdir(outdir)
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"))
1548 shellQuote(imagepath + ".tmp.dmg"), shellQuote(os.path.join(WORKDIR, "mnt"))))
1552 os.path.join(WORKDIR, "mnt", volname, ".VolumeIcon.icns"))
1554 shellQuote(os.path.join(WORKDIR, "mnt", volname)),))
1556 runCommand("hdiutil detach %s"%(shellQuote(os.path.join(WORKDIR, "mnt", volname))))
1563 os.unlink(imagepath + ".tmp.dmg")
1573 dirPath = os.path.normpath(os.path.dirname(__file__))
1574 toolPath = os.path.join(dirPath, "seticon.app/Contents/MacOS/seticon")
1575 …if not os.path.exists(toolPath) or os.stat(toolPath).st_mtime < os.stat(dirPath + '/seticon.m').st…
1578 appPath = os.path.join(dirPath, "seticon.app/Contents/MacOS")
1579 if not os.path.exists(appPath):
1580 os.makedirs(appPath)
1584 runCommand("%s %s %s"%(shellQuote(os.path.abspath(toolPath)), shellQuote(icnsPath),
1592 os.environ['MACOSX_DEPLOYMENT_TARGET'] = DEPTARGET
1593 os.environ['CC'] = CC
1594 os.environ['CXX'] = CXX
1596 if os.path.exists(WORKDIR):
1598 os.mkdir(WORKDIR)
1600 os.environ['LC_ALL'] = 'C'
1614 del os.environ['MACOSX_DEPLOYMENT_TARGET']
1619 folder = os.path.join(WORKDIR, "_root", "Applications", "Python %s"%(
1621 fn = os.path.join(folder, "License.rtf")
1623 fn = os.path.join(folder, "ReadMe.rtf")
1625 fn = os.path.join(folder, "Update Shell Profile.command")
1627 fn = os.path.join(folder, "Install Certificates.command")
1629 os.chmod(folder, STAT_0o755)
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')
1646 fp.write("# By: %s\n" % pwd.getpwuid(os.getuid()).pw_gecos)