Lines Matching refs:os
39 import platform, os, sys, getopt, textwrap, shutil, stat, time, pwd, grp
92 os.path.join(SRCDIR, 'configure'), 'PACKAGE_VERSION')
104 fn = os.path.join(SRCDIR, 'Include', 'patchlevel.h')
120 DEPSRC = os.path.join(WORKDIR, 'third-party')
121 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__
288 "DESTDIR": shellQuote(os.path.join(WORKDIR, 'libraries')),
306 "DESTDIR": shellQuote(os.path.join(WORKDIR, 'libraries')),
355 shellQuote(os.path.join(WORKDIR, 'libraries')),
356 shellQuote(os.path.join(WORKDIR, 'libraries')),
517 fd = os.popen(commandline, 'r')
528 fd = os.popen(commandline, 'r')
580 libfw = os.path.join('/', fwpth)
581 usrfw = os.path.join(os.getenv('HOME'), fwpth)
582 frameworks[framework] = os.readlink(libfw)
583 if not os.path.exists(libfw):
587 if os.path.exists(usrfw):
611 for ev in list(os.environ):
615 ev, os.environ[ev]))
616 del os.environ[ev]
619 if 'SDK_TOOLS_BIN' in os.environ:
620 base_path = os.environ['SDK_TOOLS_BIN'] + ':' + base_path
624 if os.path.isdir(OLD_DEVELOPER_TOOLS):
626 os.environ['PATH'] = base_path
627 print("Setting default PATH: %s"%(os.environ['PATH']))
689 SRCDIR=os.path.abspath(SRCDIR)
690 WORKDIR=os.path.abspath(WORKDIR)
691 DEPSRC=os.path.abspath(DEPSRC)
723 curdir = os.getcwd()
725 os.chdir(builddir)
727 retval = os.path.basename(archiveName[:-7])
731 if os.path.exists(retval):
733 fp = os.popen("tar zxf %s 2>&1"%(shellQuote(archiveName),), 'r')
736 retval = os.path.basename(archiveName[:-8])
737 if os.path.exists(retval):
739 fp = os.popen("tar jxf %s 2>&1"%(shellQuote(archiveName),), 'r')
742 retval = os.path.basename(archiveName[:-4])
743 if os.path.exists(retval):
745 fp = os.popen("tar xf %s 2>&1"%(shellQuote(archiveName),), 'r')
748 retval = os.path.basename(archiveName[:-4])
749 if os.path.exists(retval):
751 fp = os.popen("unzip %s 2>&1"%(shellQuote(archiveName),), 'r')
759 return os.path.join(builddir, retval)
762 os.chdir(curdir)
779 os.unlink(fname)
788 name = os.path.basename(fname)
789 if os.path.exists(fname):
796 if os.system(
842 "--prefix=%s"%os.path.join("/", *FW_VERSION_PREFIX),
843 "--openssldir=%s"%os.path.join("/", *FW_SSL_DIRECTORY),
855 srcdir = os.getcwd()
856 universalbase = os.path.join(srcdir, "..",
857 os.path.basename(srcdir) + "-universal")
858 os.mkdir(universalbase)
862 archsrc = os.path.join(universalbase, arch, "src")
865 archbase = os.path.join(universalbase, arch, "root")
866 os.mkdir(archbase)
871 archbasefw = os.path.join(archbase, *FW_VERSION_PREFIX)
874 os.chdir(archsrc)
876 os.chdir(srcdir)
880 basefw = os.path.join(basedir, *FW_VERSION_PREFIX)
882 os.path.join(archbasefw, "include", "openssl"),
883 os.path.join(basefw, "include", "openssl")
886 shlib_version_number = grepValue(os.path.join(archsrc, "Makefile"),
897 os.mkdir(os.path.join(basefw, "lib"))
909 os.path.join(fw, "lib", lib_versioned))
912 os.symlink(lib_versioned, os.path.join(basefw, "lib", lib_unversioned))
918 relative_path = os.path.join("..", "..", "..", *FW_VERSION_PREFIX)
926 os.symlink(
927 os.path.join(relative_path, *fn),
928 os.path.join(basedir, "usr", "local", *fn)
939 curdir = os.getcwd()
949 archiveName = os.path.split(url)[-1]
950 sourceArchive = os.path.join(DEPSRC, archiveName)
952 if not os.path.exists(DEPSRC):
953 os.mkdir(DEPSRC)
957 buildDir=os.path.join(WORKDIR, '_bld')
958 if not os.path.exists(buildDir):
959 os.mkdir(buildDir)
962 os.chdir(workDir)
967 fn = os.path.join(DEPSRC, os.path.basename(url))
971 fn = os.path.join(curdir, patch)
978 fn = os.path.join(DEPSRC, os.path.basename(url))
982 fn = os.path.join(curdir, patchscript)
987 os.unlink(fn)
990 os.chdir(recipe['buildDir'])
1051 os.chdir(curdir)
1060 universal = os.path.join(WORKDIR, 'libraries')
1061 os.mkdir(universal)
1062 os.makedirs(os.path.join(universal, 'usr', 'local', 'lib'))
1063 os.makedirs(os.path.join(universal, 'usr', 'local', 'include'))
1074 rootDir = os.path.join(WORKDIR, '_root')
1075 buildDir = os.path.join('../../Doc')
1076 docdir = os.path.join(rootDir, 'pydocs')
1077 curDir = os.getcwd()
1078 os.chdir(buildDir)
1084 doctarfiles = [ f for f in os.listdir(DEPSRC)
1089 if not os.path.exists('build'):
1090 os.mkdir('build')
1092 os.chdir('build')
1094 runCommand('tar xjf %s'%shellQuote(os.path.join(DEPSRC, doctarfile)))
1096 archivefiles = [ f for f in os.listdir('.')
1098 if os.path.isdir(f) ]
1103 os.rename(archivefile, 'html')
1104 os.chdir(buildDir)
1106 htmlDir = os.path.join('build', 'html')
1107 if not os.path.exists(htmlDir):
1111 os.rename(htmlDir, docdir)
1112 os.chdir(curDir)
1118 buildDir = os.path.join(WORKDIR, '_bld', 'python')
1119 rootDir = os.path.join(WORKDIR, '_root')
1121 if os.path.exists(buildDir):
1123 if os.path.exists(rootDir):
1125 os.makedirs(buildDir)
1126 os.makedirs(rootDir)
1127 os.makedirs(os.path.join(rootDir, 'empty-dir'))
1128 curdir = os.getcwd()
1129 os.chdir(buildDir)
1150 shellQuote(os.path.join(SRCDIR, 'configure')),
1179 os.path.join(WORKDIR, 'libraries', 'usr', 'local', 'lib'),
1194 make_extras = os.getenv("BUILDINSTALLER_BUILDPYTHON_MAKE_EXTRAS")
1215 if os.path.exists(os.path.join(WORKDIR, 'libraries', 'Library')):
1216 build_lib_dir = os.path.join(
1219 fw_lib_dir = os.path.join(
1233 frmDir = os.path.join(rootDir, 'Library', 'Frameworks', 'Python.framework')
1234 frmDirVersioned = os.path.join(frmDir, 'Versions', version)
1235 path_to_lib = os.path.join(frmDirVersioned, 'lib', 'python%s'%(version,))
1237 sslDir = os.path.join(frmDirVersioned, 'etc', 'openssl')
1238 os.makedirs(sslDir)
1244 for dirpath, dirnames, filenames in os.walk(frmDir):
1246 os.chmod(os.path.join(dirpath, dn), STAT_0o775)
1247 os.chown(os.path.join(dirpath, dn), -1, gid)
1250 if os.path.islink(fn):
1254 p = os.path.join(dirpath, fn)
1255 st = os.stat(p)
1256 os.chmod(p, stat.S_IMODE(st.st_mode) | stat.S_IWGRP)
1257 os.chown(p, -1, gid)
1277 fp = open(os.path.join(buildDir, 'Makefile'), 'r')
1305 path = os.path.join(path_to_lib, 'config' + config_suffix, 'Makefile')
1334 path = os.path.join(path_to_lib,
1337 path = os.path.join(path_to_lib, '_sysconfigdata.py')
1366 usr_local_bin = os.path.join(rootDir, 'usr', 'local', 'bin')
1367 to_framework = os.path.join('..', '..', '..', 'Library', 'Frameworks',
1369 if os.path.exists(usr_local_bin):
1371 os.makedirs(usr_local_bin)
1372 for fn in os.listdir(
1373 os.path.join(frmDir, 'Versions', version, 'bin')):
1374 os.symlink(os.path.join(to_framework, fn),
1375 os.path.join(usr_local_bin, fn))
1377 os.chdir(curdir)
1402 os.chmod(outPath, STAT_0o755)
1407 curdir = os.getcwd()
1434 srcdir = os.path.join(WORKDIR, '_root', srcdir[1:])
1438 postflight = os.path.abspath(postflight)
1440 packageContents = os.path.join(targetDir, pkgname + '.pkg', 'Contents')
1441 os.makedirs(packageContents)
1444 os.chdir(srcdir)
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')),))
1447 … runCommand("mkbom . %s 2>&1"%(shellQuote(os.path.join(packageContents, 'Archive.bom')),))
1449 fn = os.path.join(packageContents, 'PkgInfo')
1454 rsrcDir = os.path.join(packageContents, "Resources")
1455 os.mkdir(rsrcDir)
1456 fp = open(os.path.join(rsrcDir, 'ReadMe.txt'), 'w')
1461 patchScript(postflight, os.path.join(rsrcDir, 'postflight'))
1485 writePlist(pl, os.path.join(packageContents, 'Info.plist'))
1492 writePlist(pl, os.path.join(packageContents, 'Resources', 'Description.plist'))
1495 os.chdir(curdir)
1530 for dirpath, _, filenames in os.walk(os.path.join(WORKDIR, '_root')):
1533 os.unlink(os.path.join(dirpath, fn))
1535 outdir = os.path.join(WORKDIR, 'installer')
1536 if os.path.exists(outdir):
1538 os.mkdir(outdir)
1540 pkgroot = os.path.join(outdir, 'Python.mpkg', 'Contents')
1541 pkgcontents = os.path.join(pkgroot, 'Packages')
1542 os.makedirs(pkgcontents)
1546 rsrcDir = os.path.join(pkgroot, 'Resources')
1548 fn = os.path.join(pkgroot, 'PkgInfo')
1553 os.mkdir(rsrcDir)
1555 makeMpkgPlist(os.path.join(pkgroot, 'Info.plist'))
1561 writePlist(pl, os.path.join(pkgroot, 'Resources', 'Description.plist'))
1562 for fn in os.listdir('resources'):
1565 shutil.copy(os.path.join('resources', fn), os.path.join(rsrcDir, fn))
1567 patchFile(os.path.join('resources', fn), os.path.join(rsrcDir, fn))
1575 shellQuote(os.path.join(WORKDIR, '_root'))))
1584 outdir = os.path.join(WORKDIR, 'diskimage')
1585 if os.path.exists(outdir):
1619 imagepath = os.path.join(outdir,
1625 os.mkdir(outdir)
1634 shellQuote(os.path.join(WORKDIR, 'installer')),
1637 fd = os.popen(cmd, 'r')
1648 if not os.path.exists(os.path.join(WORKDIR, "mnt")):
1649 os.mkdir(os.path.join(WORKDIR, "mnt"))
1651 shellQuote(imagepath + ".tmp.dmg"), shellQuote(os.path.join(WORKDIR, "mnt"))))
1655 os.path.join(WORKDIR, "mnt", volname, ".VolumeIcon.icns"))
1657 shellQuote(os.path.join(WORKDIR, "mnt", volname)),))
1659 runCommand("hdiutil detach %s"%(shellQuote(os.path.join(WORKDIR, "mnt", volname))))
1666 os.unlink(imagepath + ".tmp.dmg")
1676 dirPath = os.path.normpath(os.path.dirname(__file__))
1677 toolPath = os.path.join(dirPath, "seticon.app/Contents/MacOS/seticon")
1678 …if not os.path.exists(toolPath) or os.stat(toolPath).st_mtime < os.stat(dirPath + '/seticon.m').st…
1681 appPath = os.path.join(dirPath, "seticon.app/Contents/MacOS")
1682 if not os.path.exists(appPath):
1683 os.makedirs(appPath)
1687 runCommand("%s %s %s"%(shellQuote(os.path.abspath(toolPath)), shellQuote(icnsPath),
1695 os.environ['MACOSX_DEPLOYMENT_TARGET'] = DEPTARGET
1696 os.environ['CC'] = CC
1697 os.environ['CXX'] = CXX
1699 if os.path.exists(WORKDIR):
1701 os.mkdir(WORKDIR)
1703 os.environ['LC_ALL'] = 'C'
1717 del os.environ['MACOSX_DEPLOYMENT_TARGET']
1722 folder = os.path.join(WORKDIR, "_root", "Applications", "Python %s"%(
1724 fn = os.path.join(folder, "License.rtf")
1726 fn = os.path.join(folder, "ReadMe.rtf")
1728 fn = os.path.join(folder, "Update Shell Profile.command")
1730 fn = os.path.join(folder, "Install Certificates.command")
1732 os.chmod(folder, STAT_0o755)
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')
1749 fp.write("# By: %s\n" % pwd.getpwuid(os.getuid()).pw_gecos)