|
1 | 1 | #!/usr/bin/env python |
2 | 2 | """ |
3 | 3 | This script is used to build "official" universal installers on Mac OS X. |
4 | | -It requires at least Mac OS X 10.4, Xcode 2.2 and the 10.4u SDK for |
| 4 | +It requires at least Mac OS X 10.5, Xcode 3, and the 10.4u SDK for |
5 | 5 | 32-bit builds. 64-bit or four-way universal builds require at least |
6 | 6 | OS X 10.5 and the 10.5 SDK. |
7 | 7 |
|
|
10 | 10 | which is used to build the documentation, currently requires at least |
11 | 11 | Python 2.4. |
12 | 12 |
|
| 13 | +In addition to what is supplied with OS X 10.5+ and Xcode 3+, the script |
| 14 | +requires an installed version of hg and a third-party version of |
| 15 | +Tcl/Tk 8.4 (for OS X 10.4 and 10.5 deployment targets) or Tcl/TK 8.5 |
| 16 | +(for 10.6 or later) installed in /Library/Frameworks. When installed, |
| 17 | +the Python built by this script will attempt to dynamically link first to |
| 18 | +Tcl and Tk frameworks in /Library/Frameworks if available otherwise fall |
| 19 | +back to the ones in /System/Library/Framework. For the build, we recommend |
| 20 | +installing the most recent ActiveTcl 8.4 or 8.5 version. |
| 21 | +
|
| 22 | +32-bit-only installer builds are still possible on OS X 10.4 with Xcode 2.5 |
| 23 | +and the installation of additional components, such as a newer Python |
| 24 | +(2.5 is needed for Python parser updates), hg, and svn (for the documentation |
| 25 | +build). |
| 26 | +
|
13 | 27 | Usage: see USAGE variable in the script. |
14 | 28 | """ |
15 | 29 | import platform, os, sys, getopt, textwrap, shutil, stat, time, pwd, grp |
@@ -342,9 +356,7 @@ def pkg_recipes(): |
342 | 356 | source="/pydocs", |
343 | 357 | readme="""\ |
344 | 358 | This package installs the python documentation at a location |
345 | | - that is useable for pydoc and IDLE. If you have installed Xcode |
346 | | - it will also install a link to the documentation in |
347 | | - /Developer/Documentation/Python |
| 359 | + that is useable for pydoc and IDLE. |
348 | 360 | """, |
349 | 361 | postflight="scripts/postflight.documentation", |
350 | 362 | required=False, |
@@ -511,7 +523,15 @@ def checkEnvironment(): |
511 | 523 | ev, os.environ[ev])) |
512 | 524 | del os.environ[ev] |
513 | 525 |
|
514 | | - os.environ['PATH'] = '/bin:/sbin:/usr/bin:/usr/sbin' |
| 526 | + base_path = '/bin:/sbin:/usr/bin:/usr/sbin' |
| 527 | + if 'SDK_TOOLS_BIN' in os.environ: |
| 528 | + base_path = os.environ['SDK_TOOLS_BIN'] + ':' + base_path |
| 529 | + # Xcode 2.5 on OS X 10.4 does not include SetFile in its usr/bin; |
| 530 | + # add its fixed location here if it exists |
| 531 | + OLD_DEVELOPER_TOOLS = '/Developer/Tools' |
| 532 | + if os.path.isdir(OLD_DEVELOPER_TOOLS): |
| 533 | + base_path = base_path + ':' + OLD_DEVELOPER_TOOLS |
| 534 | + os.environ['PATH'] = base_path |
515 | 535 | print("Setting default PATH: %s"%(os.environ['PATH'])) |
516 | 536 |
|
517 | 537 |
|
@@ -1204,7 +1224,7 @@ def buildDMG(): |
1204 | 1224 | # Custom icon for the DMG, shown when the DMG is mounted. |
1205 | 1225 | shutil.copy("../Icons/Disk Image.icns", |
1206 | 1226 | os.path.join(WORKDIR, "mnt", volname, ".VolumeIcon.icns")) |
1207 | | - runCommand("/Developer/Tools/SetFile -a C %s/"%( |
| 1227 | + runCommand("SetFile -a C %s/"%( |
1208 | 1228 | shellQuote(os.path.join(WORKDIR, "mnt", volname)),)) |
1209 | 1229 |
|
1210 | 1230 | runCommand("hdiutil detach %s"%(shellQuote(os.path.join(WORKDIR, "mnt", volname)))) |
|
0 commit comments