• 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(
831 "--prefix=%s"%os.path.join("/", *FW_VERSION_PREFIX),
832 "--openssldir=%s"%os.path.join("/", *FW_SSL_DIRECTORY),
844 srcdir = os.getcwd()
845 universalbase = os.path.join(srcdir, "..",
846 os.path.basename(srcdir) + "-universal")
847 os.mkdir(universalbase)
851 archsrc = os.path.join(universalbase, arch, "src")
854 archbase = os.path.join(universalbase, arch, "root")
855 os.mkdir(archbase)
860 archbasefw = os.path.join(archbase, *FW_VERSION_PREFIX)
863 os.chdir(archsrc)
865 os.chdir(srcdir)
869 basefw = os.path.join(basedir, *FW_VERSION_PREFIX)
871 os.path.join(archbasefw, "include", "openssl"),
872 os.path.join(basefw, "include", "openssl")
875 shlib_version_number = grepValue(os.path.join(archsrc, "Makefile"),
886 os.mkdir(os.path.join(basefw, "lib"))
898 os.path.join(fw, "lib", lib_versioned))
901 os.symlink(lib_versioned, os.path.join(basefw, "lib", lib_unversioned))
907 relative_path = os.path.join("..", "..", "..", *FW_VERSION_PREFIX)
915 os.symlink(
916 os.path.join(relative_path, *fn),
917 os.path.join(basedir, "usr", "local", *fn)
928 curdir = os.getcwd()
938 archiveName = os.path.split(url)[-1]
939 sourceArchive = os.path.join(DEPSRC, archiveName)
941 if not os.path.exists(DEPSRC):
942 os.mkdir(DEPSRC)
946 buildDir=os.path.join(WORKDIR, '_bld')
947 if not os.path.exists(buildDir):
948 os.mkdir(buildDir)
951 os.chdir(workDir)
956 fn = os.path.join(DEPSRC, os.path.basename(url))
960 fn = os.path.join(curdir, patch)
967 fn = os.path.join(DEPSRC, os.path.basename(url))
971 fn = os.path.join(curdir, patchscript)
976 os.unlink(fn)
979 os.chdir(recipe['buildDir'])
1040 os.chdir(curdir)
1049 universal = os.path.join(WORKDIR, 'libraries')
1050 os.mkdir(universal)
1051 os.makedirs(os.path.join(universal, 'usr', 'local', 'lib'))
1052 os.makedirs(os.path.join(universal, 'usr', 'local', 'include'))
1063 rootDir = os.path.join(WORKDIR, '_root')
1064 buildDir = os.path.join('../../Doc')
1065 docdir = os.path.join(rootDir, 'pydocs')
1066 curDir = os.getcwd()
1067 os.chdir(buildDir)
1073 os.chdir(curDir)
1074 if not os.path.exists(docdir):
1075 os.mkdir(docdir)
1076 os.rename(os.path.join(buildDir, 'build', 'html'), docdir)
1082 buildDir = os.path.join(WORKDIR, '_bld', 'python')
1083 rootDir = os.path.join(WORKDIR, '_root')
1085 if os.path.exists(buildDir):
1087 if os.path.exists(rootDir):
1089 os.makedirs(buildDir)
1090 os.makedirs(rootDir)
1091 os.makedirs(os.path.join(rootDir, 'empty-dir'))
1092 curdir = os.getcwd()
1093 os.chdir(buildDir)
1102 os.environ['DYLD_LIBRARY_PATH'] = os.path.join(WORKDIR,
1113 shellQuote(os.path.join(SRCDIR, 'configure')),
1136 make_extras = os.getenv("BUILDINSTALLER_BUILDPYTHON_MAKE_EXTRAS")
1152 del os.environ['DYLD_LIBRARY_PATH']
1154 if os.path.exists(os.path.join(WORKDIR, 'libraries', 'Library')):
1155 build_lib_dir = os.path.join(
1158 fw_lib_dir = os.path.join(
1172 frmDir = os.path.join(rootDir, 'Library', 'Frameworks', 'Python.framework')
1173 frmDirVersioned = os.path.join(frmDir, 'Versions', version)
1174 path_to_lib = os.path.join(frmDirVersioned, 'lib', 'python%s'%(version,))
1176 sslDir = os.path.join(frmDirVersioned, 'etc', 'openssl')
1177 os.makedirs(sslDir)
1183 for dirpath, dirnames, filenames in os.walk(frmDir):
1185 os.chmod(os.path.join(dirpath, dn), STAT_0o775)
1186 os.chown(os.path.join(dirpath, dn), -1, gid)
1189 if os.path.islink(fn):
1193 p = os.path.join(dirpath, fn)
1194 st = os.stat(p)
1195 os.chmod(p, stat.S_IMODE(st.st_mode) | stat.S_IWGRP)
1196 os.chown(p, -1, gid)
1216 fp = open(os.path.join(buildDir, 'Makefile'), 'r')
1244 path = os.path.join(path_to_lib, 'config' + config_suffix, 'Makefile')
1273 path = os.path.join(path_to_lib,
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)
1542 shellQuote(os.path.join(WORKDIR, 'installer')),
1545 fd = os.popen(cmd, 'r')
1556 if not os.path.exists(os.path.join(WORKDIR, "mnt")):
1557 os.mkdir(os.path.join(WORKDIR, "mnt"))
1559 shellQuote(imagepath + ".tmp.dmg"), shellQuote(os.path.join(WORKDIR, "mnt"))))
1563 os.path.join(WORKDIR, "mnt", volname, ".VolumeIcon.icns"))
1565 shellQuote(os.path.join(WORKDIR, "mnt", volname)),))
1567 runCommand("hdiutil detach %s"%(shellQuote(os.path.join(WORKDIR, "mnt", volname))))
1574 os.unlink(imagepath + ".tmp.dmg")
1584 dirPath = os.path.normpath(os.path.dirname(__file__))
1585 toolPath = os.path.join(dirPath, "seticon.app/Contents/MacOS/seticon")
1586 …if not os.path.exists(toolPath) or os.stat(toolPath).st_mtime < os.stat(dirPath + '/seticon.m').st…
1589 appPath = os.path.join(dirPath, "seticon.app/Contents/MacOS")
1590 if not os.path.exists(appPath):
1591 os.makedirs(appPath)
1595 runCommand("%s %s %s"%(shellQuote(os.path.abspath(toolPath)), shellQuote(icnsPath),
1603 os.environ['MACOSX_DEPLOYMENT_TARGET'] = DEPTARGET
1604 os.environ['CC'] = CC
1605 os.environ['CXX'] = CXX
1607 if os.path.exists(WORKDIR):
1609 os.mkdir(WORKDIR)
1611 os.environ['LC_ALL'] = 'C'
1625 del os.environ['MACOSX_DEPLOYMENT_TARGET']
1630 folder = os.path.join(WORKDIR, "_root", "Applications", "Python %s"%(
1632 fn = os.path.join(folder, "License.rtf")
1634 fn = os.path.join(folder, "ReadMe.rtf")
1636 fn = os.path.join(folder, "Update Shell Profile.command")
1638 fn = os.path.join(folder, "Install Certificates.command")
1640 os.chmod(folder, STAT_0o755)
1648 os.path.join(WORKDIR, 'installer', 'ReadMe.rtf'))
1652 os.path.join(WORKDIR, 'installer', 'License.rtf'))
1654 fp = open(os.path.join(WORKDIR, 'installer', 'Build.txt'), 'w')
1657 fp.write("# By: %s\n" % pwd.getpwuid(os.getuid()).pw_gecos)