1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-12 21:33:54 -05:00

Compare commits

...

74 Commits

Author SHA1 Message Date
Yamashita Yuu
5e20237f5b v0.4.0-20131116 2013-11-16 19:29:30 +09:00
Yamashita Yuu
dd44d0a713 Add CPython 3.3.3 RC1/RC2 2013-11-16 19:04:42 +09:00
Yamashita Yuu
a28c040eb9 Add PyPy 2.2 (closes #77) 2013-11-15 12:32:57 +09:00
Yamashita Yuu
6a787dd951 Update setuptools (1.1.7 -> 1.3.2) 2013-11-11 20:44:24 +09:00
Yamashita Yuu
5d9132623f Add CPython 2.7.6 2013-11-11 20:41:53 +09:00
Yamashita Yuu
f7193b09fd Merge branch 'ruby-build-v20131030' 2013-11-01 18:30:24 +09:00
Yamashita Yuu
498d226b2f Import changes from ruby-build v20131030 2013-11-01 18:30:00 +09:00
Yamashita Yuu
ccc51244e3 Add CPython 2.6.9 2013-11-01 17:13:29 +09:00
Yamashita Yuu
516f49e913 Update setuptoos (1.1.6 -> 1.1.7) 2013-11-01 17:00:16 +09:00
Yamashita Yuu
a2ab3bc32c v0.4.0-20131023 2013-10-23 15:19:33 +09:00
Yamashita Yuu
ab4a8396e1 Add 3.4.0a4 2013-10-23 15:18:14 +09:00
Yamashita Yuu
733cb397b2 improve messages on failed import 2013-10-15 14:04:38 +09:00
Yamashita Yuu
7f9a2325e5 Add 3.4.0a3 2013-10-04 12:52:05 +09:00
Yamashita Yuu
625b3b7ec1 Update setuptools (1.1.4 -> 1.1.6) 2013-10-04 12:49:41 +09:00
Yamashita Yuu
c95d446c53 Merge branch 'improved-fish-support' 2013-09-30 18:02:54 +09:00
Yamashita Yuu
6e749ef12f Import recent changes relating to fish from rbenv 2013-09-30 18:02:12 +09:00
Yamashita Yuu
850dd87332 Merge branch 'appropriate-tar-options' 2013-09-14 17:00:32 +09:00
Yamashita Yuu
fb3e9b020e Use appropriciate tar option per compression types (#58) 2013-09-14 16:50:52 +09:00
Yamashita, Yuu
02a348b657 Merge pull request #57 from rluders/patch-1
Ubuntu environment configuration
2013-09-13 03:10:29 -07:00
Ricardo Lüders
5c41dc3901 Ubuntu environment configuration 2013-09-12 21:07:40 -03:00
Yamashita Yuu
74a3c55623 Add CPython 3.4.0a2 2013-09-10 21:32:01 +09:00
Yamashita Yuu
bc8c8a6cd9 Update setuptools (1.1 -> 1.1.4) 2013-09-10 21:31:55 +09:00
Yamashita Yuu
99bc72a908 Wipe out CPython-specific scripts from build_package_standard() 2013-09-02 17:13:17 +09:00
Yamashita Yuu
aab8bb262d Update setuptools (1.0 -> 1.1) 2013-08-29 12:14:36 +09:00
Yamashita, Yuu
f14a4ef8e5 Merge pull request #54 from apbarrero/alternative_install
Installation instructions for any installation directory.
2013-08-28 00:18:45 -07:00
Antonio Perez Barrero
3bf50856ce Installation instructions for any installation directory.
Updated README.md contents so that installation instructions cover
not only the common case for installation directory, i.e. `~/.pyenv`
but any other at the user's choice.
2013-08-28 08:33:18 +02:00
Yamashita, Yuu
c3e55aa5ae Merge pull request #53 from stephendavis89/master
Fix spelling error in README
2013-08-27 20:05:12 -07:00
Stephen Davis
704548336a Fix spelling error 2013-08-27 15:27:57 -04:00
Yamashita Yuu
0ea5e12b4a Update changelog 2013-08-23 18:40:12 +09:00
Yamashita Yuu
28fd240de2 Update setuptools (0.9.7 -> 1.0) 2013-08-23 18:36:21 +09:00
Yamashita Yuu
586c0e6d62 Update pip (1.4 -> 1.4.1) 2013-08-23 18:31:22 +09:00
Yamashita, Yuu
c920eaa9be Merge pull request #49 from yyuu/fish-support
Fish support (#32)
2013-08-15 20:44:10 -07:00
Yamashita Yuu
d2f210d70d Implement sub-command completion for fish shell 2013-08-16 12:24:53 +09:00
Yamashita Yuu
683036298e fish doesn't have builtin command equivalent to bash's hash -r. 2013-08-15 22:56:57 +09:00
Yamashita Yuu
93b536863f Support fish shell 2013-08-15 22:56:53 +09:00
Yamashita Yuu
403f4eb7a7 Preserve original IFSs 2013-08-15 22:29:47 +09:00
Yamashita Yuu
4c71f3c5cd Apply --with-pydebug configure option only for Python 2013-08-08 11:58:01 +09:00
Yamashita Yuu
106e4cae90 Homebrew homepage location changed 2013-08-06 22:57:45 +09:00
Yamashita Yuu
10221d51f1 Add 2.4, 2.4.1, 2.4.3, 2.4.4 and 2.4.5 2013-08-02 00:32:09 +09:00
Yamashita Yuu
aff87c3cb3 Rename; pypy-py3k-dev -> pypy3-dev 2013-08-02 00:13:50 +09:00
Yamashita Yuu
b0f640db61 Add pypy3-2.1-beta1 2013-08-02 00:13:50 +09:00
Yamashita Yuu
af0fed2e34 Add pypy-2.1 2013-08-01 23:58:33 +09:00
Yamashita Yuu
e996f2f51a Merge branch 'py24-multiarch-patch' 2013-08-01 23:23:30 +09:00
Yamashita, Yuu
0fe18d0dc1 Merge pull request #45 from Domon/fix-formatting-in-readme
Fix formatting in the Homebrew section of README
2013-08-01 03:16:48 -07:00
Chun-wei Kuo
cc6c45d7fb Fix formatting in the Homebrew section of README 2013-08-01 18:01:38 +08:00
Yamashita Yuu
2646c6c159 Add _multiarch_ patch to fix build of CPython 2.4.x 2013-08-01 17:26:37 +09:00
Yamashita Yuu
ce66352f6d v0.4.0-20130726 2013-07-26 16:59:51 +09:00
Yamashita Yuu
9e133adf99 Merge branch 'ruby-build-20130628' 2013-07-26 00:05:19 +09:00
Yamashita Yuu
b1851f2aff Update README 2013-07-25 17:19:59 +09:00
Yamashita Yuu
b943e0abff Import changes from ruby-build v20130628 2013-07-25 17:19:55 +09:00
Yamashita Yuu
d6d556911b Merge branch 'fix-build-on-suse' (fixes #36) 2013-07-24 22:57:59 +09:00
Yamashita Yuu
b8ecd2d6dd Specify --libdir on configure to fix build on openSUSE (#36) 2013-07-24 18:43:20 +09:00
Yamashita Yuu
1e5ef005fb Update setuptools (0.9.5 -> 0.9.7) 2013-07-24 17:17:48 +09:00
Yamashita Yuu
d11db0f0f2 Update pip for Python 2.6+ (1.3 -> 1.4) 2013-07-24 17:09:40 +09:00
Yamashita, Yuu
8e43e72082 Merge pull request #37 from flavio/build_python_2_4
Allow installation of python 2.4.2
2013-07-23 23:37:31 -07:00
Flavio Castelli
ae86a253e2 Allow installation of python 2.4 series
Make possible to install python 2.4.2 and 2.4.6.
2013-07-22 14:53:09 +02:00
Yamashita Yuu
0c38147fcb Fix build of native modules of Carbon/ncurses on OS X 10.7 2013-07-20 20:53:38 +09:00
Yamashita Yuu
e1ea64b0b9 Merge branch 'issue33' 2013-07-19 22:02:16 +09:00
Yamashita Yuu
fa35e792c1 Backport libffi-osx from 2.7.5 to build ctypes on OS X (#33) 2013-07-19 21:47:51 +09:00
Yamashita Yuu
f5807424c2 Add patches for 2.5 to fix biuld on OS X 10.7/10.8 (#33) 2013-07-19 18:08:02 +09:00
Yamashita Yuu
4c006959fa fix broken string match in has_broken_mac_llvm_gcc() 2013-07-17 17:02:23 +09:00
Yamashita Yuu
f9a19e3f24 s/gcc_llvm/llvm_gcc/g 2013-07-17 16:38:57 +09:00
Yamashita Yuu
d5c24f5122 Update setuptools (0.8 -> 0.9.5) 2013-07-17 15:51:19 +09:00
Yamashita Yuu
392e404cc6 Use https instead of http when downloading from pypi 2013-07-08 16:27:01 +09:00
Yamashita Yuu
b04e067c83 update setuptools (0.7.7 -> 0.8) 2013-07-08 16:25:24 +09:00
Yamashita Yuu
ed2937f4d1 update setuptools (0.7.4 -> 0.7.7) 2013-07-04 17:23:38 +09:00
Yamashita Yuu
8848006540 remove meaningless break (fixes #26) 2013-07-03 11:15:58 +09:00
Yamashita Yuu
7a4fe458b8 Merge branch 'llvm-gcc-4.2-on-osx' 2013-06-29 12:32:35 +09:00
Yamashita Yuu
f76faa88b8 add has_broken_mac_gcc_llvm and use clang if true 2013-06-29 12:27:33 +09:00
Yamashita Yuu
9ce760c798 add require_cc() to test existence of CC other than GCC 2013-06-28 12:18:45 +09:00
Yamashita Yuu
152ebe6e61 Download GNU Readline from mirror site of GNU 2013-06-27 12:28:34 +09:00
Yamashita Yuu
1a6eb80bcd should not declare IFS in toplevel 2013-06-21 19:37:58 +09:00
Yamashita Yuu
745bceac22 update setuptools (0.7.2 -> 0.7.4) 2013-06-20 12:31:18 +09:00
Yamashita Yuu
583f3b0e21 fix build of 3.4-dev. append existing 3.4 at the last.
this is because `hg` (which is a dependency of *-dev build) might be
installed in existing pyenv versions.
2013-06-19 18:48:58 +09:00
145 changed files with 53380 additions and 470 deletions

View File

@@ -1,5 +1,34 @@
## Version History
#### 0.4.0-20131116
* python-build: Add new CPython releases; 2.6.9, 2.7.6 (#76)
* python-build: Add new CPython release candidates; 3.3.3-rc1, 3.3.3-rc2
* python-build: Add new PyPy releases; pypy-2.2, pypy-2.2-src (#77)
* python-build: Update default setuptools version (1.1.6 -> 1.3.2)
* python-build: Imported recent changes from ruby-build v20131030
#### 0.4.0-20131023
* pyenv: Improved [fish shell](http://fishshell.com/) support
* python-build: Add new PyPy releases; pypy-2.1, pypy-2.1-src, pypy3-2.1-beta1, pypy3-2.1-beta1-src
* python-build: Add ancient versions; 2.4, 2.4.1, 2.4.3, 2.4.4 and 2.4.5
* python-build: Add alpha releases; 3.4.0a2, 3.4.0a3, 3.4.0a4
* python-build: Update default pip version (1.4 -> 1.4.1)
* python-build: Update default setuptools version (0.9.7 -> 1.1.6)
#### 0.4.0-20130726
* pyenv: Fix minor issue of variable scope in `pyenv versions`
* python-build: Update base version to ruby-build v20130628
* python-build: Use brew managed OpenSSL and GNU Readline if they are available
* python-build: Fix build of CPython 3.3+ on OS X (#29)
* python-build: Fix build of native modules of CPython 2.5 on OS X (#33)
* python-build: Fix build of CPython 2.6+ on openSUSE (#36)
* python-build: Add ancient versions; 2.4.2 and 2.4.6. The build might be broken. (#37)
* python-build: Update default pip version (1.3.1 -> 1.4)
* python-build: Update default setuptools version (0.7.2 -> 0.9.7)
#### 0.4.0-20130613
* pyenv: Changed versioning schema. There are two parts; the former is the base rbenv version, and the latter is the date of release.

View File

@@ -20,7 +20,7 @@ This project was forked from [rbenv](https://github.com/sstephenson/rbenv) and
### In contrast with pythonbrew and pythonz, pyenv _does not..._
* **Depending on Python itself.** pyenv was made from pure shell scripts.
* **Depend on Python itself.** pyenv was made from pure shell scripts.
There is no bootstrap problem of Python.
* **Need to be loaded into your shell.** Instead, pyenv's shim
approach works by adding a directory to your `$PATH`.
@@ -146,30 +146,36 @@ If you're on Mac OS X, consider
This will get you going with the latest version of pyenv and make it
easy to fork and contribute any changes back upstream.
1. Check out pyenv into `~/.pyenv`.
1. Check out pyenv where you want it installed. A good place to choose is
`$HOME/.pyenv` but you may install it somewhere else.
$ cd
$ git clone git://github.com/yyuu/pyenv.git .pyenv
2. Add `~/.pyenv/bin` to your `$PATH` for access to the `pyenv`
command-line utility.
$ echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> ~/.bash_profile
2. Define environment variable `PYENV_ROOT` to point to the path where
pyenv repo is cloned and add `$PYENV_ROOT/bin` to your `$PATH` for access
to the `pyenv` command-line utility.
$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
$ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
**Zsh note**: Modify your `~/.zshenv` file instead of `~/.bash_profile`.
**Ubuntu note**: Modify your `~/.bashrc` file instead of `~/.bash_profile`.
3. Add pyenv init to your shell to enable shims and autocompletion.
$ echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
**Zsh note**: Modify your `~/.zshenv` file instead of `~/.bash_profile`.
**Ubuntu note**: Modify your `~/.bashrc` file instead of `~/.bash_profile`.
4. Restart your shell so the path changes take effect. You can now
begin using pyenv.
$ exec $SHELL
5. Install Python versions into `~/.pyenv/versions`. For example, to
5. Install Python versions into `$PYENV_ROOT/versions`. For example, to
install Python 2.7.5, download and unpack the source, then run:
$ pyenv install 2.7.5
@@ -205,13 +211,13 @@ tag:
### Homebrew on Mac OS X
You can also install pyenv using the
[Homebrew](http://mxcl.github.com/homebrew/) package manager on Mac OS
[Homebrew](http://brew.sh) package manager on Mac OS
X.
~~
~~~
$ brew update
$ brew install pyenv
~~
~~~
To later update these installs, use `upgrade` instead of `install`.

22
completions/pyenv.fish Normal file
View File

@@ -0,0 +1,22 @@
function __fish_pyenv_needs_command
set cmd (commandline -opc)
if [ (count $cmd) -eq 1 -a $cmd[1] = 'pyenv' ]
return 0
end
return 1
end
function __fish_pyenv_using_command
set cmd (commandline -opc)
if [ (count $cmd) -gt 1 ]
if [ $argv[1] = $cmd[2] ]
return 0
end
end
return 1
end
complete -f -c pyenv -n '__fish_pyenv_needs_command' -a '(pyenv commands)'
for cmd in (pyenv commands)
complete -f -c pyenv -n "__fish_pyenv_using_command $cmd" -a "(pyenv completions $cmd)"
end

View File

@@ -12,7 +12,7 @@
set -e
[ -n "$PYENV_DEBUG" ] && set -x
version="0.4.0-20130613"
version="0.4.0-20131116"
cd "$PYENV_ROOT"
git_revision="$(git describe --tags HEAD 2>/dev/null || true)"

View File

@@ -20,9 +20,11 @@ elif [ "$1" = "--no-sh" ]; then
shift
fi
IFS=: paths=($PATH)
shopt -s nullglob
{ for path in ${PATH//:/$'\n'}; do
{ for path in "${paths[@]}"; do
for command in "${path}/pyenv-"*; do
command="${command##*pyenv-}"
if [ -n "$sh" ]; then

View File

@@ -11,7 +11,7 @@ if [ -z "$COMMAND" ]; then
fi
COMMAND_PATH="$(command -v "pyenv-$COMMAND" || command -v "pyenv-sh-$COMMAND")"
if grep -i "^# provide pyenv completions" "$COMMAND_PATH" >/dev/null; then
if grep -i "^\([#%]\|--\|//\) provide pyenv completions" "$COMMAND_PATH" >/dev/null; then
shift
exec "$COMMAND_PATH" --complete "$@"
fi

View File

@@ -27,12 +27,14 @@ PYENV_VERSION_FILE="${PYENV_ROOT}/version"
if [ -n "$versions" ]; then
pyenv-version-file-write "$PYENV_VERSION_FILE" "${versions[@]}"
else
OLDIFS="$IFS"
IFS=: versions=($(
pyenv-version-file-read "$PYENV_VERSION_FILE" ||
pyenv-version-file-read "${PYENV_ROOT}/global" ||
pyenv-version-file-read "${PYENV_ROOT}/default" ||
echo system
))
IFS="$OLDIFS"
for version in "${versions[@]}"; do
echo "$version"
done

View File

@@ -64,8 +64,8 @@ collect_documentation() {
}
function trim(str) {
gsub(/^\n*/, "", str)
gsub(/\n*$/, "", str)
sub(/^\n*/, "", str)
sub(/\n*$/, "", str)
return str
}

View File

@@ -11,7 +11,7 @@ for args in "$@"
do
if [ "$args" = "-" ]; then
print=1
shift
shift
fi
if [ "$args" = "--no-rehash" ]; then
@@ -25,8 +25,14 @@ if [ -z "$shell" ]; then
shell="$(basename "$SHELL")"
fi
READLINK=$(type -p greadlink readlink | head -1)
if [ -z "$READLINK" ]; then
echo "pyenv: cannot find readlink - are you missing GNU coreutils?" >&2
exit 1
fi
resolve_link() {
$(type -p greadlink readlink | head -1) $1
$READLINK "$1"
}
abs_dirname() {
@@ -56,6 +62,9 @@ if [ -z "$print" ]; then
ksh )
profile='~/.profile'
;;
fish )
profile='~/.config/fish/config.fish'
;;
* )
profile='your profile'
;;
@@ -64,7 +73,14 @@ if [ -z "$print" ]; then
{ echo "# Load pyenv automatically by adding"
echo "# the following to ${profile}:"
echo
echo 'eval "$(pyenv init -)"'
case "$shell" in
fish )
echo '. (pyenv init -|psub)'
;;
* )
echo 'eval "$(pyenv init -)"'
;;
esac
echo
} >&2
@@ -73,23 +89,58 @@ fi
mkdir -p "${PYENV_ROOT}/"{shims,versions}
echo 'export PATH="'${PYENV_ROOT}'/shims:${PATH}"'
case "$shell" in
bash | zsh )
echo "source \"$root/completions/pyenv.${shell}\""
if [[ ":${PATH}:" != *:"${PYENV_ROOT}/shims":* ]]; then
case "$shell" in
fish )
echo "setenv PATH '${PYENV_ROOT}/shims' \$PATH"
;;
esac
* )
echo 'export PATH="'${PYENV_ROOT}'/shims:${PATH}"'
;;
esac
fi
completion="${root}/completions/pyenv.${shell}"
[ -r "$completion" ] && echo ". '$completion'"
if [ -z "$no_rehash" ]; then
echo 'pyenv rehash 2>/dev/null'
fi
commands=(`pyenv-commands --sh`)
case "$shell" in
fish )
cat <<EOS
function pyenv
set command \$argv[1]
set -e argv[1]
switch "\$command"
case ${commands[*]}
eval (pyenv "sh-\$command" \$argv)
case '*'
command pyenv "\$command" \$argv
end
end
EOS
exit 0
;;
ksh )
cat <<EOS
function pyenv {
typeset command
EOS
;;
* )
cat <<EOS
pyenv() {
local command
EOS
;;
esac
IFS="|"
cat <<EOS
pyenv() {
typeset command
command="\$1"
if [ "\$#" -gt 0 ]; then
shift
@@ -97,7 +148,7 @@ pyenv() {
case "\$command" in
${commands[*]})
eval \`pyenv "sh-\$command" "\$@"\`;;
eval "\`pyenv "sh-\$command" "\$@"\`";;
*)
command pyenv "\$command" "\$@";;
esac

View File

@@ -46,6 +46,7 @@ elif [ -n "$versions" ]; then
fi
pyenv-version-file-write .python-version "${versions[@]}"
else
OLDIFS="$IFS"
IFS=: versions=($(
pyenv-version-file-read .python-version ||
pyenv-version-file-read .pyenv-version ||
@@ -53,6 +54,7 @@ else
exit 1
} >&2
))
IFS="$OLDIFS"
for version in "${versions[@]}"; do
echo "$version"
done

View File

@@ -17,10 +17,14 @@ fi
if [ -n "$1" ]; then
versions=($@)
OLDIFS="$IFS"
IFS=: PYENV_VERSION="${versions[*]}"
IFS="$OLDIFS"
export PYENV_VERSION
else
OLDIFS="$IFS"
IFS=: versions=($(pyenv-version-name))
IFS="$OLDIFS"
fi
PYENV_PREFIX_PATHS=()
@@ -39,4 +43,8 @@ for version in "${versions[@]}"; do
fi
done
IFS=: echo "${PYENV_PREFIX_PATHS[*]}"
OLDIFS="$IFS"
{ IFS=:
echo "${PYENV_PREFIX_PATHS[*]}"
}
IFS="$OLDIFS"

View File

@@ -7,7 +7,19 @@ if [ "$1" = "--complete" ]; then
exec pyenv-rehash --complete
fi
shell="$(basename "$SHELL")"
# When pyenv shell integration is enabled, delegate to pyenv-rehash,
# then tell the shell to empty its command lookup cache.
pyenv-rehash
echo "hash -r"
case "$shell" in
fish )
or='; or'
;;
* )
or='||'
;;
esac
echo "hash -r 2>/dev/null $or true"

View File

@@ -24,6 +24,7 @@ if [ "$1" = "--complete" ]; then
fi
versions=("$@")
shell="$(basename "$SHELL")"
if [ -z "$versions" ]; then
if [ -z "$PYENV_VERSION" ]; then
@@ -36,15 +37,31 @@ if [ -z "$versions" ]; then
fi
if [ "$versions" = "--unset" ]; then
echo "unset PYENV_VERSION"
case "$shell" in
fish )
echo "set -e PYENV_VERSION"
;;
* )
echo "unset PYENV_VERSION"
;;
esac
exit
fi
# Make sure the specified version is installed.
if pyenv-prefix "${versions[@]}" >/dev/null; then
OLDIFS="$IFS"
IFS=: PYENV_VERSION="${versions[*]}"
echo "export PYENV_VERSION=\"${PYENV_VERSION}\""
IFS="$OLDIFS"
case "$shell" in
fish )
echo "setenv PYENV_VERSION \"${PYENV_VERSION}\""
;;
* )
echo "export PYENV_VERSION=\"${PYENV_VERSION}\""
;;
esac
else
echo "return 1"
echo "false"
exit 1
fi

View File

@@ -8,7 +8,9 @@
set -e
[ -n "$PYENV_DEBUG" ] && set -x
OLDIFS="$IFS"
IFS=: PYENV_VERSION_NAMES=($(pyenv-version-name))
IFS="$OLDIFS"
for PYENV_VERSION_NAME in "${PYENV_VERSION_NAMES[@]}"; do
echo "$PYENV_VERSION_NAME (set by $(pyenv-version-origin))"

View File

@@ -18,10 +18,11 @@ if [ -e "$VERSION_FILE" ]; then
done < <( cat "$VERSION_FILE" && echo )
if [ -n "$versions" ]; then
{
IFS=:
OLDIFS="$IFS"
{ IFS=:
echo "${versions[*]}"
}
IFS="$OLDIFS"
exit
fi
fi

View File

@@ -4,11 +4,15 @@ set -e
[ -n "$PYENV_DEBUG" ] && set -x
if [ -n "$PYENV_VERSION" ]; then
OLDIFS="$IFS"
IFS=: versions=($(echo "${PYENV_VERSION}"))
IFS="$IFS"
else
PYENV_VERSION_FILE="$(pyenv-version-file)"
OLDIFS="$IFS"
IFS=: versions=($(pyenv-version-file-read "$PYENV_VERSION_FILE" || true))
IFS=: PYENV_VERSION="${versions[*]}"
IFS="$OLDIFS"
export PYENV_VERSION
fi

View File

@@ -10,13 +10,15 @@ set -e
if [ "$1" = "--bare" ]; then
hit_prefix=""
miss_prefix=""
IFS=: current_versions=()
current_versions=()
version_origin=""
include_system=""
else
hit_prefix="* "
miss_prefix=" "
OLDIFS="$IFS"
IFS=: current_versions=($(pyenv-version-name || true))
IFS="$OLDIFS"
version_origin=" (set by $(pyenv-version-origin))"
include_system="1"
fi

View File

@@ -36,7 +36,9 @@ remove_from_path() {
fi
local paths
OLDIFS="$IFS"
IFS=: paths=($PATH)
IFS="$OLDIFS"
for path in "${paths[@]}"; do
path="$(expand_path "$path" || true)"
@@ -48,8 +50,10 @@ remove_from_path() {
echo "${result%:}"
}
OLDIFS="$IFS"
IFS=: versions=($(pyenv-version-name))
IFS=: PYENV_VERSION="${versions[*]}"
IFS="$OLDIFS"
PYENV_COMMAND="$1"
if [ -z "$PYENV_COMMAND" ]; then

View File

@@ -149,12 +149,10 @@ if [ -z "${PYTHON_BUILD_CACHE_PATH}" ] && [ -d "${PYENV_ROOT}/cache" ]; then
fi
# Default PYENV_VERSION to the globally-specified Python version. (The
# Python 3.4 installer requires an existing Python installation to run. An
# CPython installer requires an existing Python installation to run. An
# unsatisfied local .python-version file can cause the installer to
# fail.)
if [ -z "${PYENV_VERSION}" ]; then
export PYENV_VERSION="$(pyenv global 2>/dev/null || true)"
fi
#export PYENV_VERSION="$(pyenv global 2>/dev/null || true)"
# Execute `before_install` hooks.

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
PYTHON_BUILD_VERSION="20130518"
PYTHON_BUILD_VERSION="20131030"
set -E
exec 3<&2 # preserve original stderr at fd 3
@@ -96,6 +96,17 @@ file_is_not_empty() {
fi
}
num_cpu_cores() {
local num=""
if [ "Darwin" = "$(uname -s)" ]; then
num="$(sysctl -n hw.ncpu 2>/dev/null || true)"
elif [ -r /proc/cpuinfo ]; then
num="$(grep -c ^processor /proc/cpuinfo)"
[ "$num" -gt 0 ] || num=""
fi
echo "${num:-2}"
}
install_package() {
install_package_using "tarball" 1 "$@"
}
@@ -203,11 +214,11 @@ verify_checksum() {
[ -e "$filename" ] || return 0
# If there's no expected checksum, return success
local expected_checksum="$2"
local expected_checksum=`echo "$2" | tr [A-Z] [a-z]`
[ -n "$expected_checksum" ] || return 0
# If the computed checksum is empty, return failure
local computed_checksum="$(compute_md5 < "$filename")"
local computed_checksum=`echo "$(compute_md5 < "$filename")" | tr [A-Z] [a-z]`
[ -n "$computed_checksum" ] || return 1
if [ "$expected_checksum" != "$computed_checksum" ]; then
@@ -267,27 +278,28 @@ fetch_tarball() {
fi
fi
local _package_filename="${package_url##*/}"
local _package_suffix="${_package_filename##*.}"
case "${_package_suffix}" in
"Z" | "bz2" | "gz" | "xz" )
local package_suffix="tar.${_package_suffix}"
local tar_args="xzvf"
local package_filename="${package_name}.tar.gz"
local package_suffix extract_option
case "${package_url}" in
*".tgz" )
package_filename="${package_name}.tgz"
;;
* )
local package_suffix="${_package_suffix}"
*".tar.bz2" )
package_filename="${package_name}.tar.bz2"
tar_args="${tar_args/z/j}"
;;
esac
local package_filename="${package_name}.${package_suffix}"
symlink_tarball_from_cache "$package_filename" "$checksum" || {
if ! symlink_tarball_from_cache "$package_filename" "$checksum"; then
echo "Downloading ${package_filename}..." >&2
{ http head "$mirror_url" &&
download_tarball "$mirror_url" "$package_filename" "$checksum"
} ||
http head "$mirror_url" &&
download_tarball "$mirror_url" "$package_filename" "$checksum" ||
download_tarball "$package_url" "$package_filename" "$checksum"
}
fi
{ if tar xvf "$package_filename"; then
{ if tar $tar_args "$package_filename"; then
if [ -z "$KEEP_BUILD_PATH" ]; then
rm -f "$package_filename"
else
@@ -318,9 +330,12 @@ download_tarball() {
echo "-> $package_url" >&2
{ http get "$package_url" "$package_filename"
verify_checksum "$package_filename" "$checksum"
} >&4 2>&1 || return 1
if http get "$package_url" "$package_filename" >&4 2>&1; then
verify_checksum "$package_filename" "$checksum" >&4 2>&1 || return 1
else
echo "error: failed to download $package_filename" >&2
return 1
fi
if [ -n "$PYTHON_BUILD_CACHE_PATH" ]; then
local cached_package_filename="${PYTHON_BUILD_CACHE_PATH}/$package_filename"
@@ -422,26 +437,24 @@ fetch_jar() {
fi
local package_filename="${package_name}.jar"
symlink_jar_from_cache "$package_filename" "$checksum" || {
if ! symlink_tarball_from_cache "$package_filename" "$checksum"; then
echo "Downloading ${package_filename}..." >&2
{ http head "$mirror_url" &&
download_jar "$mirror_url" "$package_filename" "$checksum"
} ||
download_jar "$package_url" "$package_filename" "$checksum"
}
{ $JAVA -jar ${package_name}.jar -s -d ${package_name}
rm -f "$package_filename"
http head "$mirror_url" &&
download_tarball "$mirror_url" "$package_filename" "$checksum" ||
download_tarball "$package_url" "$package_filename" "$checksum"
fi
{ if $JAVA -jar ${package_name}.jar -s -d ${package_name}; then
if [ -z "$KEEP_BUILD_PATH" ]; then
rm -f "$package_filename"
else
true
fi
fi
} >&4 2>&1
}
symlink_jar_from_cache() {
symlink_tarball_from_cache "$@"
}
download_jar() {
download_tarball "$@"
}
fetch_zip() {
local package_name="$1"
local package_url="$2"
@@ -458,13 +471,13 @@ fetch_zip() {
fi
local package_filename="${package_name}.zip"
symlink_zip_from_cache "$package_filename" "$checksum" || {
if ! symlink_tarball_from_cache "$package_filename" "$checksum"; then
echo "Downloading ${package_filename}..." >&2
{ http head "$mirror_url" &&
download_zip "$mirror_url" "$package_filename" "$checksum"
} ||
download_zip "$package_url" "$package_filename" "$checksum"
}
http head "$mirror_url" &&
download_tarball "$mirror_url" "$package_filename" "$checksum" ||
download_tarball "$package_url" "$package_filename" "$checksum"
fi
{ if unzip "$package_filename"; then
if [ -z "$KEEP_BUILD_PATH" ]; then
@@ -476,14 +489,6 @@ fetch_zip() {
} >&4 2>&1
}
symlink_zip_from_cache() {
symlink_tarball_from_cache "$@"
}
download_zip() {
download_tarball "$@"
}
build_package() {
local package_name="$1"
shift
@@ -517,10 +522,10 @@ build_package_standard() {
if [ "${MAKEOPTS+defined}" ]; then
MAKE_OPTS="$MAKEOPTS"
elif [ -z "${MAKE_OPTS+defined}" ]; then
MAKE_OPTS="-j 2"
MAKE_OPTS="-j $(num_cpu_cores)"
fi
# Support PYTHON_CONFIGURE_OPTS, etc.
# Support YAML_CONFIGURE_OPTS, PYTHON_CONFIGURE_OPTS, etc.
local package_var_name="$(capitalize "${package_name%%-*}")"
local PACKAGE_CONFIGURE="${package_var_name}_CONFIGURE"
local PACKAGE_PREFIX_PATH="${package_var_name}_PREFIX_PATH"
@@ -533,25 +538,14 @@ build_package_standard() {
( if [ "${CFLAGS+defined}" ] || [ "${!PACKAGE_CFLAGS+defined}" ]; then
export CFLAGS="$CFLAGS ${!PACKAGE_CFLAGS}"
fi
${!PACKAGE_CONFIGURE:-./configure} --prefix="${!PACKAGE_PREFIX_PATH:-$PREFIX_PATH}" $CONFIGURE_OPTS ${!PACKAGE_CONFIGURE_OPTS} "${!PACKAGE_CONFIGURE_OPTS_ARRAY}"
${!PACKAGE_CONFIGURE:-./configure} --prefix="${!PACKAGE_PREFIX_PATH:-$PREFIX_PATH}" \
--libdir="${!PACKAGE_PREFIX_PATH:-$PREFIX_PATH}/lib" \
$CONFIGURE_OPTS ${!PACKAGE_CONFIGURE_OPTS} "${!PACKAGE_CONFIGURE_OPTS_ARRAY}"
) >&4 2>&1
{ "$MAKE" $MAKE_OPTS ${!PACKAGE_MAKE_OPTS} "${!PACKAGE_MAKE_OPTS_ARRAY}"
"$MAKE" install
} >&4 2>&1
# Create `python` executable if missing
if [[ "${package_name}" == "Python"* ]] || [[ "${package_name}" == "stackless"* ]]; then
if [ ! -f "$PYTHON_BIN" ]; then
local python
for python in "${PREFIX_PATH}/bin/python"*; do
if expr "$(basename "$python")" : '^python[0-9][0-9]*\.[0-9][0-9]*$' 2>&1 >/dev/null; then
( cd "${PREFIX_PATH}/bin" && ln -fs "$(basename "$python")" python )
break
fi
done
fi
fi
}
build_package_autoconf() {
@@ -605,7 +599,7 @@ build_package_pypy_builder() {
build_package_copy() {
mkdir -p "$PREFIX_PATH"
cp -R . "$PREFIX_PATH"
cp -fR . "$PREFIX_PATH"
}
before_install_package() {
@@ -622,30 +616,53 @@ fix_directory_permissions() {
}
require_gcc() {
local gcc="$(locate_gcc || true)"
require_cc "gcc"
}
if [ -z "$gcc" ]; then
require_cc() {
while [ -n "$1" ]; do
if [ "$1" = "--if" ]; then
"$2" || return 0
shift 2
else
break
fi
done
local cc
local ccname="${1:-cc}"
cc="$(locate_cc "$ccname" || true)"
if [ -z "$cc" ]; then
local esc=$'\033'
{ echo
echo "${esc}[1mERROR${esc}[0m: This package must be compiled with GCC, but python-build couldn't"
echo "find a suitable \`gcc\` executable on your system. Please install GCC"
echo "${esc}[1mERROR${esc}[0m: This package must be compiled with $ccname, but python-build couldn't"
echo "find a suitable \`$ccname\` executable on your system. Please install $ccname"
echo "and try again."
echo
} >&3
return 1
fi
export CC="$gcc"
}
export CC="$cc"
}
locate_gcc() {
local gcc gccs
IFS=: gccs=($(gccs_in_path))
locate_cc "gcc" "$@"
}
verify_gcc "$CC" ||
verify_gcc "$(command -v gcc || true)" || {
for gcc in "${gccs[@]}"; do
verify_gcc "$gcc" && break || true
locate_cc() {
local ccname="$1"; shift
if [ -z "$ccname" ]; then
return 1
fi
local cc ccs
IFS=: ccs=($(ccs_in_path "${ccname}"))
verify_cc "${ccname}" "$CC" ||
verify_cc "${ccname}" "$(command -v "${ccname}" || true)" || {
for cc in "${ccs[@]}"; do
verify_cc "${ccname}" "$cc" && break || true
done
}
@@ -653,174 +670,49 @@ locate_gcc() {
}
gccs_in_path() {
local gcc path paths
local gccs=()
ccs_in_path "gcc" "$@"
}
ccs_in_path() {
local ccname="$1"; shift
if [ -z "$ccname" ]; then
return 1
fi
local cc path paths
local ccs=()
IFS=: paths=($PATH)
shopt -s nullglob
for path in "${paths[@]}"; do
for gcc in "$path"/gcc-*; do
gccs["${#gccs[@]}"]="$gcc"
for cc in "$path"/${ccname}-*; do
ccs["${#ccs[@]}"]="$cc"
done
done
shopt -u nullglob
printf :%s "${gccs[@]}"
printf :%s "${ccs[@]}"
}
verify_gcc() {
local gcc="$1"
if [ -z "$gcc" ]; then
verify_cc "gcc" "$@"
}
verify_cc() {
local ccname="$1"; shift
if [ -z "$ccname" ]; then
return 1
fi
local cc="$1"
if [ -z "$cc" ]; then
return 1
fi
local version="$("$gcc" --version || true)"
local version="$("$cc" --version || true)"
if [ -z "$version" ]; then
return 1
fi
echo "$gcc"
}
has_broken_mac_openssl() {
[ "$(uname -s)" = "Darwin" ] &&
[ "$(openssl version 2>/dev/null || true)" = "OpenSSL 0.9.8r 8 Feb 2011" ] #&&
# [[ "$PYTHON_CONFIGURE_OPTS" != *--with-openssl-dir=* ]] # The "--with-*-dir=" style arguments are only effective for mkmf.rb
}
build_package_mac_openssl() {
# Install to a subdirectory since we don't want shims for bin/openssl.
OPENSSL_PREFIX_PATH="${PREFIX_PATH}/openssl"
# Put openssl.conf, certs, etc in ~/.pyenv/versions/*/openssl/ssl
OPENSSLDIR="${OPENSSLDIR:-$OPENSSL_PREFIX_PATH/ssl}"
# Tell Python to use this openssl for its extension.
package_option python configure --with-openssl-dir="$OPENSSL_PREFIX_PATH"
# Hint OpenSSL that we prefer a 64-bit build.
export KERNEL_BITS="64"
OPENSSL_CONFIGURE="${OPENSSL_CONFIGURE:-./config}"
# Compile a shared lib with zlib dynamically linked, no kerberos.
package_option openssl configure --openssldir="$OPENSSLDIR" zlib-dynamic no-krb5 shared
# Default MAKE_OPTS are -j 2 which can confuse the build. Thankfully, make
# gives precedence to the last -j option, so we can override that.
package_option openssl make -j 1
build_package_standard "$@"
# Extract root certs from the system keychain in .pem format and rehash.
local pem_file="$OPENSSLDIR/cert.pem"
security find-certificate -a -p /Library/Keychains/System.keychain > "$pem_file"
security find-certificate -a -p /System/Library/Keychains/SystemRootCertificates.keychain >> "$pem_file"
}
has_broken_mac_readline() {
# MacOSX 10.4 has a broken readline.
# https://github.com/yyuu/pyenv/issues/23
local retval=1
local conftest="$BUILD_PATH/has_broken_mac_readline.h"
if [ "$(uname -s)" = "Darwin" ]; then
echo "#include <readline/rlconf.h>" > "$conftest"
"${CPP:-cpp}" $CFLAGS $CPPFLAGS $LDFLAGS "$conftest" 1>/dev/null 2>&1 || retval=0
rm -f "$conftest"
fi
return "$retval"
}
# Post-install check for Python 2.5.x
build_package_verify_py25() {
build_package_verify_readline "$@"
build_package_verify_sqlite3 "$@"
build_package_verify_zlib "$@"
build_package_verify_bz2 "$@"
}
# Post-install check for Python 2.6.x
build_package_verify_py26() {
build_package_verify_py25 "$@"
build_package_verify_ssl "$@"
}
# Post-install check for Python 2.7.x
build_package_verify_py27() {
build_package_verify_py26 "$@"
}
# Post-install check for Python 3.0.x
build_package_verify_py30() {
build_package_verify_readline "$@"
build_package_verify_ssl "$@"
build_package_verify_sqlite3 "$@"
build_package_verify_zlib "$@"
build_package_verify_bz2 "$@"
}
# Post-install check for Python 3.1.x
build_package_verify_py31() {
build_package_verify_py30 "$@"
}
# Post-install check for Python 3.2.x
build_package_verify_py32() {
build_package_verify_py31 "$@"
}
# Post-install check for Python 3.3.x
build_package_verify_py33() {
build_package_verify_py32 "$@"
}
# Post-install check for Python 3.4.x
build_package_verify_py34() {
build_package_verify_py33 "$@"
}
# Post-install check that the readline extension was built.
build_package_verify_readline() {
"$PYTHON_BIN" -c 'try:
import readline
except ImportError:
raise(ImportError("The Python readline extension was not compiled. Missing the GNU readline lib?"))
' >&4 2>&1
}
# Post-install check that the ssl extension was built.
build_package_verify_ssl() {
"$PYTHON_BIN" -c 'try:
import ssl
except ImportError:
raise(ImportError("The Python ssl extension was not compiled. Missing the OpenSSL lib?"))
' >&4 2>&1
}
# Post-install check that the sqlite3 extension was built.
build_package_verify_sqlite3() {
"$PYTHON_BIN" -c 'try:
import sqlite3
except ImportError:
raise(ImportError("The Python sqlite3 extension was not compiled. Missing the SQLite3 lib?"))
' >&4 2>&1
}
# Post-install check that the zlib extension was built.
build_package_verify_zlib() {
"$PYTHON_BIN" -c 'try:
import zlib
except ImportError:
raise(ImportError("The Python zlib extension was not compiled. Missing the zlib?"))
' >&4 2>&1
}
# Post-install check that the bz2 extension was built.
build_package_verify_bz2() {
"$PYTHON_BIN" -c 'try:
import bz2
except ImportError:
raise(ImportError("The Python bz2 extension was not compiled. Missing the bzip2 lib?"))
' >&4 2>&1
echo "$cc"
}
require_java() {
@@ -884,6 +776,214 @@ verify_java() {
echo "$java"
}
has_broken_mac_openssl() {
[ "$(uname -s)" = "Darwin" ] &&
[[ "$(openssl version 2>/dev/null || true)" = "OpenSSL 0.9.8"?* ]] &&
! use_homebrew_openssl
}
use_homebrew_openssl() {
local ssldir="$(brew --prefix openssl 2>/dev/null || true)"
if [ -d "$ssldir" ]; then
CPPFLAGS="-I$ssldir/include $CPPFLAGS"
LDFLAGS="-L$ssldir/lib $LDFLAGS"
else
return 1
fi
}
build_package_mac_openssl() {
# Install to a subdirectory since we don't want shims for bin/openssl.
OPENSSL_PREFIX_PATH="${PREFIX_PATH}/openssl"
# Put openssl.conf, certs, etc in ~/.pyenv/versions/*/openssl/ssl
OPENSSLDIR="${OPENSSLDIR:-$OPENSSL_PREFIX_PATH/ssl}"
# Tell Python to use this openssl for its extension.
package_option python configure --with-openssl-dir="$OPENSSL_PREFIX_PATH"
# Hint OpenSSL that we prefer a 64-bit build.
export KERNEL_BITS="64"
OPENSSL_CONFIGURE="${OPENSSL_CONFIGURE:-./config}"
# Compile a shared lib with zlib dynamically linked, no kerberos.
package_option openssl configure --openssldir="$OPENSSLDIR" zlib-dynamic no-krb5 shared
# Default MAKE_OPTS are -j 2 which can confuse the build. Thankfully, make
# gives precedence to the last -j option, so we can override that.
package_option openssl make -j 1
build_package_standard "$@"
# Extract root certs from the system keychain in .pem format and rehash.
local pem_file="$OPENSSLDIR/cert.pem"
security find-certificate -a -p /Library/Keychains/System.keychain > "$pem_file"
security find-certificate -a -p /System/Library/Keychains/SystemRootCertificates.keychain >> "$pem_file"
}
# Ensure that directories listed in LDFLAGS exist
build_package_ldflags_dirs() {
local arg
for arg in $LDFLAGS; do
case "$arg" in
-L* ) mkdir -p "${arg#-L}" ;;
esac
done
}
has_broken_mac_readline() {
[ "$(uname -s)" = "Darwin" ] &&
_has_broken_mac_readline &&
! use_homebrew_readline
}
_has_broken_mac_readline() {
# MacOSX 10.4 has a broken readline.
# https://github.com/yyuu/pyenv/issues/23
local retval=1
local conftest="$BUILD_PATH/has_broken_mac_readline.h"
if [ "$(uname -s)" = "Darwin" ]; then
echo "#include <readline/rlconf.h>" > "$conftest"
"${CPP:-cpp}" $CPPFLAGS "$conftest" 1>/dev/null 2>&1 || retval=0
rm -f "$conftest"
fi
return "$retval"
}
use_homebrew_readline() {
local rldir="$(brew --prefix readline 2>/dev/null || true)"
if [ -d "$rldir" ]; then
CPPFLAGS="-I$rldir/include $CPPFLAGS"
LDFLAGS="-L$rldir/lib $LDFLAGS"
else
return 1
fi
}
has_broken_mac_llvm_gcc() {
[ "$(uname -s)" = "Darwin" ] &&
[[ "$(gcc --version 2>/dev/null || true)" == *"llvm-gcc-4.2"* ]]
}
build_package_verify_python() {
# Check the existence of ./bin since pyenv-which searches the executables from there
if [ ! -d "${PREFIX_PATH}/bin" ]; then
echo "pyenv: invalid Python installation" >&4 2>&1
return 1
fi
# Create `python` executable if missing. Especially for Py3k.
if [ ! -e "${PREFIX_PATH}/bin/python" ]; then
local python
for python in "${PREFIX_PATH}/bin/python"*; do
if expr "$(basename "$python")" : '^python[0-9][0-9]*\.[0-9][0-9]*$' 2>&1 >/dev/null; then
( cd "${PREFIX_PATH}/bin" && ln -fs "$(basename "$python")" python )
break
fi
done
fi
if [ ! -x "${PYTHON_BIN}" ]; then
echo "pyenv: invalid Python executable: ${PYTHON_BIN}" >&4 2>&1
return 1
fi
}
# Post-install check for Python 2.4.x
build_package_verify_py24() {
build_package_verify_python "$@"
build_package_verify_readline "$@"
build_package_verify_zlib "$@"
build_package_verify_bz2 "$@"
}
# Post-install check for Python 2.5.x
build_package_verify_py25() {
build_package_verify_py24 "$@"
build_package_verify_sqlite3 "$@"
}
# Post-install check for Python 2.6.x
build_package_verify_py26() {
build_package_verify_py25 "$@"
build_package_verify_ssl "$@"
}
# Post-install check for Python 2.7.x
build_package_verify_py27() {
build_package_verify_py26 "$@"
}
# Post-install check for Python 3.0.x
build_package_verify_py30() {
build_package_verify_python "$@"
build_package_verify_readline "$@"
build_package_verify_ssl "$@"
build_package_verify_sqlite3 "$@"
build_package_verify_zlib "$@"
build_package_verify_bz2 "$@"
}
# Post-install check for Python 3.1.x
build_package_verify_py31() {
build_package_verify_py30 "$@"
}
# Post-install check for Python 3.2.x
build_package_verify_py32() {
build_package_verify_py31 "$@"
}
# Post-install check for Python 3.3.x
build_package_verify_py33() {
build_package_verify_py32 "$@"
}
# Post-install check for Python 3.4.x
build_package_verify_py34() {
build_package_verify_py33 "$@"
}
build_package_verify_import() {
local module="${1}"
local module_name="${2:-${module}}"
{ if ! "$PYTHON_BIN" -c "import ${module}"; then
echo
echo "The Python ${module} extension was not compiled. Missing the ${module_name}?"
echo
echo "Please consult to the Wiki page to fix the problem."
echo "https://github.com/yyuu/pyenv/wiki/Common-build-problems"
echo
return 1
fi
} >&4 2>&1
}
# Post-install check that the readline extension was built.
build_package_verify_readline() {
build_package_verify_import "readline" "GNU readline lib"
}
# Post-install check that the ssl extension was built.
build_package_verify_ssl() {
build_package_verify_import "ssl" "OpenSSL lib"
}
# Post-install check that the sqlite3 extension was built.
build_package_verify_sqlite3() {
build_package_verify_import "sqlite3" "SQLite3 lib"
}
# Post-install check that the zlib extension was built.
build_package_verify_zlib() {
build_package_verify_import "zlib" "zlib"
}
# Post-install check that the bz2 extension was built.
build_package_verify_bz2() {
build_package_verify_import "bz2" "bzip2 lib"
}
version() {
echo "python-build ${PYTHON_BUILD_VERSION}"
}
@@ -964,6 +1064,8 @@ fi
PREFIX_PATH="${ARGUMENTS[1]}"
if [ -z "$PREFIX_PATH" ]; then
usage
elif [ "${PREFIX_PATH#/}" = "$PREFIX_PATH" ]; then
PREFIX_PATH="${PWD}/${PREFIX_PATH}"
fi
if [ -z "$TMPDIR" ]; then
@@ -972,8 +1074,27 @@ else
TMP="${TMPDIR%/}"
fi
if [ ! -w "$TMP" ] || [ ! -x "$TMP" ]; then
echo "python-build: TMPDIR=$TMP is set to a non-accessible location" >&2
exit 1
fi
# Work around warnings building Ruby 2.0 on Clang 2.x:
# pass -Wno-error=shorten-64-to-32 if the compiler accepts it.
#
# When we set CFLAGS, Ruby won't apply its default flags, though. Since clang
# builds 1.9.x and 2.x only, where -O3 is default, we can safely set that flag.
# Ensure it's the first flag since later flags take precedence.
#if "${CC:-cc}" -x c /dev/null -E -Wno-error=shorten-64-to-32 &>/dev/null; then
# PYTHON_CFLAGS="-O3 -Wno-error=shorten-64-to-32 $PYTHON_CFLAGS"
#fi
if [ -z "$MAKE" ]; then
export MAKE="make"
if [[ "FreeBSD" = "$(uname -s)" ]]; then
export MAKE="gmake"
else
export MAKE="make"
fi
fi
if [ -n "$PYTHON_BUILD_CACHE_PATH" ] && [ -d "$PYTHON_BUILD_CACHE_PATH" ]; then
@@ -1000,7 +1121,7 @@ else
fi
if [ -n "$DEBUG" ]; then
CONFIGURE_OPTS+=" --with-pydebug"
PYTHON_CONFIGURE_OPTS="--with-pydebug $PYTHON_CONFIGURE_OPTS"
fi
SEED="$(date "+%Y%m%d%H%M%S").$$"

View File

@@ -1,7 +1,12 @@
#!/bin/sh
# Usage: PREFIX=/usr/local ./install.sh
#
# Installs python-build under $PREFIX.
set -e
cd "$(dirname "$0")"
if [ -z "${PREFIX}" ]; then
PREFIX="/usr/local"
fi
@@ -9,15 +14,7 @@ fi
BIN_PATH="${PREFIX}/bin"
SHARE_PATH="${PREFIX}/share/python-build"
mkdir -p "${BIN_PATH}"
mkdir -p "${SHARE_PATH}"
mkdir -p "$BIN_PATH" "$SHARE_PATH"
for file in bin/*; do
cp "${file}" "${BIN_PATH}"
done
for file in share/python-build/*; do
cp -Rp "${file}" "${SHARE_PATH}"
done
echo "Installed python-build at ${PREFIX}"
install -p bin/* "$BIN_PATH"
install -p share/python-build/* "$SHARE_PATH"

View File

@@ -0,0 +1,5 @@
require_gcc
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-2.4" "http://www.python.org/ftp/python/2.4/Python-2.4.tgz#149ad508f936eccf669d52682cf8e606" standard verify_py24
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.1" "https://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gz#62a9f08dd5dc69d76734568a6c040508" python

View File

@@ -0,0 +1,5 @@
require_gcc
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-2.4.1" "http://www.python.org/ftp/python/2.4.1/Python-2.4.1.tgz#7bb2416a4f421c3452d306694d3efbba" standard verify_py24
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.1" "https://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gz#62a9f08dd5dc69d76734568a6c040508" python

View File

@@ -0,0 +1,5 @@
require_gcc
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-2.4.2" "http://www.python.org/ftp/python/2.4.2/Python-2.4.2.tgz#07cfc759546f6723bb367be5b1ce9875" standard verify_py24
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.1" "https://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gz#62a9f08dd5dc69d76734568a6c040508" python

View File

@@ -0,0 +1,5 @@
require_gcc
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-2.4.3" "http://www.python.org/ftp/python/2.4.3/Python-2.4.3.tgz#edf994473a8c1a963aaa71e442b285b7" standard verify_py24
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.1" "https://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gz#62a9f08dd5dc69d76734568a6c040508" python

View File

@@ -0,0 +1,5 @@
require_gcc
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-2.4.4" "http://www.python.org/ftp/python/2.4.4/Python-2.4.4.tgz#82d000617baaef269ad5795c595fdc58" standard verify_py24
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.1" "https://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gz#62a9f08dd5dc69d76734568a6c040508" python

View File

@@ -0,0 +1,5 @@
require_gcc
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-2.4.5" "http://www.python.org/ftp/python/2.4.5/Python-2.4.5.tgz#750b652bfdd12675e102bbe25e5e9893" standard verify_py24
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.1" "https://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gz#62a9f08dd5dc69d76734568a6c040508" python

View File

@@ -0,0 +1,5 @@
require_gcc
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-2.4.6" "http://www.python.org/ftp/python/2.4.6/Python-2.4.6.tgz#7564b2b142b1b8345cd5358b7aaaa482" standard verify_py24
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.1" "https://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gz#62a9f08dd5dc69d76734568a6c040508" python

View File

@@ -1,5 +1,5 @@
require_gcc
install_package "readline-6.2" "ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-2.5" "http://www.python.org/ftp/python/2.5/Python-2.5.tgz#bc1b74f90a472a6c0a85481aaeb43f95" standard verify_py25
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "pip-1.3.1" "http://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.3.1" "https://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python

View File

@@ -1,5 +1,5 @@
require_gcc
install_package "readline-6.2" "ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-2.5.1" "http://www.python.org/ftp/python/2.5.1/Python-2.5.1.tgz#cca695828df8adc3e69b637af07522e1" standard verify_py25
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "pip-1.3.1" "http://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.3.1" "https://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python

View File

@@ -1,5 +1,5 @@
require_gcc
install_package "readline-6.2" "ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-2.5.2" "http://www.python.org/ftp/python/2.5.2/Python-2.5.2.tgz#3f7ca8aa86c6bd275426d63b46e07992" standard verify_py25
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "pip-1.3.1" "http://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.3.1" "https://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python

View File

@@ -1,5 +1,5 @@
require_gcc
install_package "readline-6.2" "ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-2.5.3" "http://www.python.org/ftp/python/2.5.3/Python-2.5.3.tgz#a971f8928d6beb31ae0de56f7034d6a2" standard verify_py25
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "pip-1.3.1" "http://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.3.1" "https://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python

View File

@@ -1,5 +1,5 @@
require_gcc
install_package "readline-6.2" "ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-2.5.4" "http://www.python.org/ftp/python/2.5.4/Python-2.5.4.tgz#ad47b23778f64edadaaa8b5534986eed" standard verify_py25
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "pip-1.3.1" "http://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.3.1" "https://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python

View File

@@ -1,5 +1,5 @@
require_gcc
install_package "readline-6.2" "ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-2.5.5" "http://www.python.org/ftp/python/2.5.5/Python-2.5.5.tgz#abc02139ca38f4258e8e372f7da05c88" standard verify_py25
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "pip-1.3.1" "http://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.3.1" "https://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python

View File

@@ -1,5 +1,5 @@
require_gcc
install_package "readline-6.2" "ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-2.5.6" "http://www.python.org/ftp/python/2.5.6/Python-2.5.6.tgz#d1d9c83928561addf11d00b22a18ca50" standard verify_py25
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "pip-1.3.1" "http://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.3.1" "https://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python

View File

@@ -1,5 +1,5 @@
require_gcc
install_package "readline-6.2" "ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_hg "Python-2.6-dev" "https://bitbucket.org/mirror/cpython" "2.6" standard verify_py26
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "pip-1.3.1" "http://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.4.1" "https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz#6afbb46aeb48abac658d4df742bff714" python

View File

@@ -1,5 +1,5 @@
require_gcc
install_package "readline-6.2" "ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-2.6.6" "http://www.python.org/ftp/python/2.6.6/Python-2.6.6.tgz#b2f209df270a33315e62c1ffac1937f0" standard verify_py26
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "pip-1.3.1" "http://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.4.1" "https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz#6afbb46aeb48abac658d4df742bff714" python

View File

@@ -1,5 +1,5 @@
require_gcc
install_package "readline-6.2" "ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-2.6.7" "http://www.python.org/ftp/python/2.6.7/Python-2.6.7.tgz#af474f85a3af69ea50438a2a48039d7d" standard verify_py26
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "pip-1.3.1" "http://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.4.1" "https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz#6afbb46aeb48abac658d4df742bff714" python

View File

@@ -1,5 +1,5 @@
require_gcc
install_package "readline-6.2" "ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-2.6.8" "http://www.python.org/ftp/python/2.6.8/Python-2.6.8.tgz#f6c1781f5d73ab7dfa5181f43ea065f6" standard verify_py26
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "pip-1.3.1" "http://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.4.1" "https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz#6afbb46aeb48abac658d4df742bff714" python

View File

@@ -0,0 +1,5 @@
require_gcc
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-2.6.9" "http://www.python.org/ftp/python/2.6.9/Python-2.6.9.tgz#bddbd64bf6f5344fc55bbe49a72fe4f3" standard verify_py26
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.4.1" "https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz#6afbb46aeb48abac658d4df742bff714" python

View File

@@ -1,5 +1,5 @@
require_gcc
install_package "readline-6.2" "ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-2.7" "http://www.python.org/ftp/python/2.7/Python-2.7.tgz#35f56b092ecf39a6bd59d64f142aae0f" standard verify_py27
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "pip-1.3.1" "http://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.4.1" "https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz#6afbb46aeb48abac658d4df742bff714" python

View File

@@ -1,5 +1,5 @@
require_gcc
install_package "readline-6.2" "ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_hg "Python-2.7-dev" "https://bitbucket.org/mirror/cpython" "2.7" standard verify_py27
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "pip-1.3.1" "http://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.4.1" "https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz#6afbb46aeb48abac658d4df742bff714" python

View File

@@ -1,5 +1,5 @@
require_gcc
install_package "readline-6.2" "ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-2.7.1" "http://www.python.org/ftp/python/2.7.1/Python-2.7.1.tgz#15ed56733655e3fab785e49a7278d2fb" standard verify_py27
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "pip-1.3.1" "http://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.4.1" "https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz#6afbb46aeb48abac658d4df742bff714" python

View File

@@ -1,5 +1,5 @@
require_gcc
install_package "readline-6.2" "ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-2.7.2" "http://www.python.org/ftp/python/2.7.2/Python-2.7.2.tgz#0ddfe265f1b3d0a8c2459f5bf66894c7" standard verify_py27
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "pip-1.3.1" "http://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.4.1" "https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz#6afbb46aeb48abac658d4df742bff714" python

View File

@@ -1,5 +1,5 @@
require_gcc
install_package "readline-6.2" "ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-2.7.3" "http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz#2cf641732ac23b18d139be077bd906cd" standard verify_py27
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "pip-1.3.1" "http://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.4.1" "https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz#6afbb46aeb48abac658d4df742bff714" python

View File

@@ -1,5 +1,5 @@
require_gcc
install_package "readline-6.2" "ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-2.7.4" "http://www.python.org/ftp/python/2.7.4/Python-2.7.4.tgz#592603cfaf4490a980e93ecb92bde44a" standard verify_py27
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "pip-1.3.1" "http://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.4.1" "https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz#6afbb46aeb48abac658d4df742bff714" python

View File

@@ -1,5 +1,5 @@
require_gcc
install_package "readline-6.2" "ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-2.7.5" "http://www.python.org/ftp/python/2.7.5/Python-2.7.5.tgz#b4f01a1d0ba0b46b05c73b2ac909b1df" standard verify_py27
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "pip-1.3.1" "http://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.4.1" "https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz#6afbb46aeb48abac658d4df742bff714" python

View File

@@ -0,0 +1,5 @@
require_gcc
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-2.7.6" "http://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz#1d8728eb0dfcac72a0fd99c17ec7f386" standard verify_py27
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.4.1" "https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz#6afbb46aeb48abac658d4df742bff714" python

View File

@@ -1,5 +1,5 @@
require_gcc
install_package "readline-6.2" "ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-3.0.1" "http://www.python.org/ftp/python/3.0.1/Python-3.0.1.tgz#220b73f0a1a20c4b1cdf9f9db4cd52fe" standard verify_py30
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "pip-1.3.1" "http://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.4.1" "https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz#6afbb46aeb48abac658d4df742bff714" python

View File

@@ -1,5 +1,5 @@
require_gcc
install_package "readline-6.2" "ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_hg "Python-3.1-dev" "https://bitbucket.org/mirror/cpython" "3.1" standard verify_py31
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "pip-1.3.1" "http://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.4.1" "https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz#6afbb46aeb48abac658d4df742bff714" python

View File

@@ -1,5 +1,5 @@
require_gcc
install_package "readline-6.2" "ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-3.1.3" "http://www.python.org/ftp/python/3.1.3/Python-3.1.3.tgz#d797fa6abe82c21227e328f05a535424" standard verify_py31
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "pip-1.3.1" "http://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.4.1" "https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz#6afbb46aeb48abac658d4df742bff714" python

View File

@@ -1,5 +1,5 @@
require_gcc
install_package "readline-6.2" "ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-3.1.4" "http://www.python.org/ftp/python/3.1.4/Python-3.1.4.tgz#fa9f8efdc63944c8393870282e8b5c35" standard verify_py31
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "pip-1.3.1" "http://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.4.1" "https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz#6afbb46aeb48abac658d4df742bff714" python

View File

@@ -1,5 +1,5 @@
require_gcc
install_package "readline-6.2" "ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-3.1.5" "http://www.python.org/ftp/python/3.1.5/Python-3.1.5.tgz#02196d3fc7bc76bdda68aa36b0dd16ab" standard verify_py31
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "pip-1.3.1" "http://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.4.1" "https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz#6afbb46aeb48abac658d4df742bff714" python

View File

@@ -1,5 +1,5 @@
require_gcc
install_package "readline-6.2" "ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-3.2" "http://www.python.org/ftp/python/3.2/Python-3.2.tgz#5efe838a7878b170f6728d7e5d7517af" standard verify_py32
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "pip-1.3.1" "http://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.4.1" "https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz#6afbb46aeb48abac658d4df742bff714" python

View File

@@ -1,5 +1,5 @@
require_gcc
install_package "readline-6.2" "ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_hg "Python-3.2-dev" "https://bitbucket.org/mirror/cpython" "3.2" standard verify_py32
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "pip-1.3.1" "http://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.4.1" "https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz#6afbb46aeb48abac658d4df742bff714" python

View File

@@ -1,5 +1,5 @@
require_gcc
install_package "readline-6.2" "ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-3.2.1" "http://www.python.org/ftp/python/3.2.1/Python-3.2.1.tgz#6c2aa3481cadb7bdf74e625fffc352b2" standard verify_py32
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "pip-1.3.1" "http://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.4.1" "https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz#6afbb46aeb48abac658d4df742bff714" python

View File

@@ -1,5 +1,5 @@
require_gcc
install_package "readline-6.2" "ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-3.2.2" "http://www.python.org/ftp/python/3.2.2/Python-3.2.2.tgz#3c63a6d97333f4da35976b6a0755eb67" standard verify_py32
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "pip-1.3.1" "http://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.4.1" "https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz#6afbb46aeb48abac658d4df742bff714" python

View File

@@ -1,5 +1,5 @@
require_gcc
install_package "readline-6.2" "ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-3.2.3" "http://www.python.org/ftp/python/3.2.3/Python-3.2.3.tgz#dcf3a738e7028f1deb41b180bf0e2cbc" standard verify_py32
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "pip-1.3.1" "http://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.4.1" "https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz#6afbb46aeb48abac658d4df742bff714" python

View File

@@ -1,5 +1,5 @@
require_gcc
install_package "readline-6.2" "ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-3.2.4" "http://www.python.org/ftp/python/3.2.4/Python-3.2.4.tgz#3af05758d0bc2b1a27249e8d622c3e91" standard verify_py32
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "pip-1.3.1" "http://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.4.1" "https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz#6afbb46aeb48abac658d4df742bff714" python

View File

@@ -1,5 +1,5 @@
require_gcc
install_package "readline-6.2" "ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-3.2.5" "http://www.python.org/ftp/python/3.2.5/Python-3.2.5.tgz#ed8d5529d2aebc36b53f4e0a0c9e6728" standard verify_py32
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "pip-1.3.1" "http://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.4.1" "https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz#6afbb46aeb48abac658d4df742bff714" python

View File

@@ -1,5 +1,5 @@
require_gcc
install_package "readline-6.2" "ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
require_cc --if has_broken_mac_llvm_gcc "clang"
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_hg "Python-3.3-dev" "https://bitbucket.org/mirror/cpython" "3.3" standard verify_py33
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "pip-1.3.1" "http://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.4.1" "https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz#6afbb46aeb48abac658d4df742bff714" python

View File

@@ -1,5 +1,5 @@
require_gcc
install_package "readline-6.2" "ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
require_cc --if has_broken_mac_llvm_gcc "clang"
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-3.3.0" "http://python.org/ftp/python/3.3.0/Python-3.3.0.tgz#198a64f7a04d1d5e95ce2782d5fd8254" standard verify_py33
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "pip-1.3.1" "http://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.4.1" "https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz#6afbb46aeb48abac658d4df742bff714" python

View File

@@ -1,5 +1,5 @@
require_gcc
install_package "readline-6.2" "ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
require_cc --if has_broken_mac_llvm_gcc "clang"
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-3.3.1" "http://python.org/ftp/python/3.3.1/Python-3.3.1.tgz#c19bfd6ea252b61779a4f2996fb3b330" standard verify_py33
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "pip-1.3.1" "http://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.4.1" "https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz#6afbb46aeb48abac658d4df742bff714" python

View File

@@ -1,5 +1,5 @@
require_gcc
install_package "readline-6.2" "ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
require_cc --if has_broken_mac_llvm_gcc "clang"
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-3.3.2" "http://python.org/ftp/python/3.3.2/Python-3.3.2.tgz#0a2ea57f6184baf45b150aee53c0c8da" standard verify_py33
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "pip-1.3.1" "http://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.4.1" "https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz#6afbb46aeb48abac658d4df742bff714" python

View File

@@ -0,0 +1,5 @@
require_cc --if has_broken_mac_llvm_gcc "clang"
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-3.3.3rc1" "http://python.org/ftp/python/3.3.3/Python-3.3.3rc1.tgz#f91e09aa838743f7243f8ebfa7e7368c" standard verify_py33
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.4.1" "https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz#6afbb46aeb48abac658d4df742bff714" python

View File

@@ -0,0 +1,5 @@
require_cc --if has_broken_mac_llvm_gcc "clang"
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-3.3.3rc2" "http://python.org/ftp/python/3.3.3/Python-3.3.3rc2.tgz#64c3f7cf6832edf86f796b66689f7184" standard verify_py33
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.4.1" "https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz#6afbb46aeb48abac658d4df742bff714" python

View File

@@ -1,12 +1,5 @@
# Python 3.4 requires "python3.4" to be executable if it is in ${PATH}.
if ! pyenv-which python3.4 1>/dev/null 2>&1; then
if pyenv-whence python3.4 1>/dev/null 2>&1; then
export PYENV_VERSION="$(pyenv-whence python3.4 2>/dev/null | tail -1)"
fi
fi
require_gcc
install_package "readline-6.2" "ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
require_cc --if has_broken_mac_llvm_gcc "clang"
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_hg "Python-3.4-dev" "https://bitbucket.org/mirror/cpython" "default" standard verify_py34
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "pip-1.3.1" "http://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#cbb27a191cebc58997c4da8513863153" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.4.1" "https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz#6afbb46aeb48abac658d4df742bff714" python

View File

@@ -0,0 +1,5 @@
require_cc --if has_broken_mac_llvm_gcc "clang"
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-3.4.0a2" "http://python.org/ftp/python/3.4.0/Python-3.4.0a2.tgz#e6e81242a32e6f63d224254d24edbd2f" standard verify_py34
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.4.1" "https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz#6afbb46aeb48abac658d4df742bff714" python

View File

@@ -0,0 +1,5 @@
require_cc --if has_broken_mac_llvm_gcc "clang"
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-3.4.0a3" "http://python.org/ftp/python/3.4.0/Python-3.4.0a3.tgz#3598af9717cddd4c346d731913fdfd64" standard verify_py34
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.4.1" "https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz#6afbb46aeb48abac658d4df742bff714" python

View File

@@ -0,0 +1,5 @@
require_cc --if has_broken_mac_llvm_gcc "clang"
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
install_package "Python-3.4.0a4" "http://python.org/ftp/python/3.4.0/Python-3.4.0a4.tgz#f874d97c90130b0249848be889b5e6e1" standard verify_py34
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
install_package "pip-1.4.1" "https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz#6afbb46aeb48abac658d4df742bff714" python

View File

@@ -1,6 +1,6 @@
require_java
install_hg "jython-2.5-dev" "http://hg.python.org/jython" "2.5" jython_builder
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
# pip (>= 1.3) does not work properly since it uses HTTPS for downloads
# * https://github.com/yyuu/pyenv/issues/15
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
install_package "pip-1.2.1" "https://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python

View File

@@ -3,7 +3,7 @@ install_jar "Jython-2.5.0" "https://downloads.sourceforge.net/project/jython/jyt
# distribute (>= 0.33) does not support Jython prior to 2.5.2
# * https://github.com/yyuu/pyenv/issues/15
# * https://bitbucket.org/tarek/distribute/issue/367/importing-setuptoolssandbox-fails-on
install_package "distribute-0.6.32" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.32.tar.gz#acb7a2da81e3612bfb1608abe4f0e568" python
install_package "distribute-0.6.32" "https://pypi.python.org/packages/source/d/distribute/distribute-0.6.32.tar.gz#acb7a2da81e3612bfb1608abe4f0e568" python
# pip (>= 1.3) does not work properly since it uses HTTPS for downloads
# * https://github.com/yyuu/pyenv/issues/15
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
install_package "pip-1.2.1" "https://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python

View File

@@ -3,7 +3,7 @@ install_jar "Jython-2.5.1" "https://downloads.sourceforge.net/project/jython/jyt
# distribute (>= 0.33) does not support Jython prior to 2.5.2
# * https://github.com/yyuu/pyenv/issues/15
# * https://bitbucket.org/tarek/distribute/issue/367/importing-setuptoolssandbox-fails-on
install_package "distribute-0.6.32" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.32.tar.gz#acb7a2da81e3612bfb1608abe4f0e568" python
install_package "distribute-0.6.32" "https://pypi.python.org/packages/source/d/distribute/distribute-0.6.32.tar.gz#acb7a2da81e3612bfb1608abe4f0e568" python
# pip (>= 1.3) does not work properly since it uses HTTPS for downloads
# * https://github.com/yyuu/pyenv/issues/15
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
install_package "pip-1.2.1" "https://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python

View File

@@ -1,6 +1,6 @@
require_java
install_jar "Jython-2.5.2" "https://downloads.sourceforge.net/project/jython/jython/2.5.2/jython_installer-2.5.2.jar#7c7d9abd8985df480edeacd27ed9dcd5" jython
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
# pip (>= 1.3) does not work properly since it uses HTTPS for downloads
# * https://github.com/yyuu/pyenv/issues/15
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
install_package "pip-1.2.1" "https://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python

View File

@@ -1,6 +1,6 @@
require_java
install_jar "Jython-2.5.3" "http://search.maven.org/remotecontent?filepath=org/python/jython-installer/2.5.3/jython-installer-2.5.3.jar#41633b4557483d6d4237ee79ffcebe7b" jython
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
# pip (>= 1.3) does not work properly since it uses HTTPS for downloads
# * https://github.com/yyuu/pyenv/issues/15
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
install_package "pip-1.2.1" "https://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python

View File

@@ -1,6 +1,6 @@
require_java
install_jar "Jython-2.5.4-rc1" "http://search.maven.org/remotecontent?filepath=org/python/jython-installer/2.5.4-rc1/jython-installer-2.5.4-rc1.jar#1be8d75d02886ce1a8542bb794a20db2" jython
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
# pip (>= 1.3) does not work properly since it uses HTTPS for downloads
# * https://github.com/yyuu/pyenv/issues/15
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
install_package "pip-1.2.1" "https://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python

View File

@@ -1,6 +1,6 @@
require_java
install_jar "Jython-2.7-beta1" "http://search.maven.org/remotecontent?filepath=org/python/jython-installer/2.7-b1/jython-installer-2.7-b1.jar" jython
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
# pip (>= 1.3) does not work properly since it uses HTTPS for downloads
# * https://github.com/yyuu/pyenv/issues/15
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
install_package "pip-1.2.1" "https://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python

View File

@@ -1,6 +1,6 @@
require_java
install_hg "jython-dev" "http://hg.python.org/jython" "default" jython_builder
install_package "setuptools-0.7.2" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.2.tar.gz#20003718b266929c4a49e5d7ba3f792c" python
install_package "setuptools-1.3.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.2.tar.gz#441f2e58c0599d31597622a7b9eb605f" python
# pip (>= 1.3) does not work properly since it uses HTTPS for downloads
# * https://github.com/yyuu/pyenv/issues/15
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
install_package "pip-1.2.1" "https://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python

View File

@@ -0,0 +1,45 @@
--- setup.py.orig 2011-07-07 19:19:43.800122463 +0900
+++ setup.py 2011-07-07 19:25:04.548416377 +0900
@@ -13,6 +13,7 @@
from distutils.command.build_ext import build_ext
from distutils.command.install import install
from distutils.command.install_lib import install_lib
+from distutils.spawn import find_executable
# This global variable is used to hold the list of modules to be disabled.
disabled_module_list = []
@@ -242,10 +243,34 @@
return platform
return sys.platform
+ def add_multiarch_paths(self):
+ # Debian/Ubuntu multiarch support.
+ # https://wiki.ubuntu.com/MultiarchSpec
+ if not find_executable('dpkg-architecture'):
+ return
+ tmpfile = os.path.join(self.build_temp, 'multiarch')
+ if not os.path.exists(self.build_temp):
+ os.makedirs(self.build_temp)
+ ret = os.system(
+ 'dpkg-architecture -qDEB_HOST_MULTIARCH > %s 2> /dev/null' %
+ tmpfile)
+ try:
+ if ret >> 8 == 0:
+ fp = open(tmpfile)
+ multiarch_path_component = fp.readline().strip()
+ fp.close()
+ add_dir_to_list(self.compiler.library_dirs,
+ '/usr/lib/' + multiarch_path_component)
+ add_dir_to_list(self.compiler.include_dirs,
+ '/usr/include/' + multiarch_path_component)
+ finally:
+ os.unlink(tmpfile)
+
def detect_modules(self):
# Ensure that /usr/local is always used
add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
+ self.add_multiarch_paths()
# Add paths specified in the environment variables LDFLAGS and
# CPPFLAGS for header and library files.

View File

@@ -0,0 +1,45 @@
--- setup.py.orig 2011-07-07 19:19:43.800122463 +0900
+++ setup.py 2011-07-07 19:25:04.548416377 +0900
@@ -13,6 +13,7 @@
from distutils.command.build_ext import build_ext
from distutils.command.install import install
from distutils.command.install_lib import install_lib
+from distutils.spawn import find_executable
# This global variable is used to hold the list of modules to be disabled.
disabled_module_list = []
@@ -242,10 +243,34 @@
return platform
return sys.platform
+ def add_multiarch_paths(self):
+ # Debian/Ubuntu multiarch support.
+ # https://wiki.ubuntu.com/MultiarchSpec
+ if not find_executable('dpkg-architecture'):
+ return
+ tmpfile = os.path.join(self.build_temp, 'multiarch')
+ if not os.path.exists(self.build_temp):
+ os.makedirs(self.build_temp)
+ ret = os.system(
+ 'dpkg-architecture -qDEB_HOST_MULTIARCH > %s 2> /dev/null' %
+ tmpfile)
+ try:
+ if ret >> 8 == 0:
+ fp = open(tmpfile)
+ multiarch_path_component = fp.readline().strip()
+ fp.close()
+ add_dir_to_list(self.compiler.library_dirs,
+ '/usr/lib/' + multiarch_path_component)
+ add_dir_to_list(self.compiler.include_dirs,
+ '/usr/include/' + multiarch_path_component)
+ finally:
+ os.unlink(tmpfile)
+
def detect_modules(self):
# Ensure that /usr/local is always used
add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
+ self.add_multiarch_paths()
# Add paths specified in the environment variables LDFLAGS and
# CPPFLAGS for header and library files.

View File

@@ -0,0 +1,45 @@
--- setup.py.orig 2011-07-07 19:19:43.800122463 +0900
+++ setup.py 2011-07-07 19:25:04.548416377 +0900
@@ -13,6 +13,7 @@
from distutils.command.build_ext import build_ext
from distutils.command.install import install
from distutils.command.install_lib import install_lib
+from distutils.spawn import find_executable
# This global variable is used to hold the list of modules to be disabled.
disabled_module_list = []
@@ -242,10 +243,34 @@
return platform
return sys.platform
+ def add_multiarch_paths(self):
+ # Debian/Ubuntu multiarch support.
+ # https://wiki.ubuntu.com/MultiarchSpec
+ if not find_executable('dpkg-architecture'):
+ return
+ tmpfile = os.path.join(self.build_temp, 'multiarch')
+ if not os.path.exists(self.build_temp):
+ os.makedirs(self.build_temp)
+ ret = os.system(
+ 'dpkg-architecture -qDEB_HOST_MULTIARCH > %s 2> /dev/null' %
+ tmpfile)
+ try:
+ if ret >> 8 == 0:
+ fp = open(tmpfile)
+ multiarch_path_component = fp.readline().strip()
+ fp.close()
+ add_dir_to_list(self.compiler.library_dirs,
+ '/usr/lib/' + multiarch_path_component)
+ add_dir_to_list(self.compiler.include_dirs,
+ '/usr/include/' + multiarch_path_component)
+ finally:
+ os.unlink(tmpfile)
+
def detect_modules(self):
# Ensure that /usr/local is always used
add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
+ self.add_multiarch_paths()
# Add paths specified in the environment variables LDFLAGS and
# CPPFLAGS for header and library files.

View File

@@ -0,0 +1,45 @@
--- setup.py.orig 2011-07-07 19:19:43.800122463 +0900
+++ setup.py 2011-07-07 19:25:04.548416377 +0900
@@ -13,6 +13,7 @@
from distutils.command.build_ext import build_ext
from distutils.command.install import install
from distutils.command.install_lib import install_lib
+from distutils.spawn import find_executable
# This global variable is used to hold the list of modules to be disabled.
disabled_module_list = []
@@ -242,10 +243,34 @@
return platform
return sys.platform
+ def add_multiarch_paths(self):
+ # Debian/Ubuntu multiarch support.
+ # https://wiki.ubuntu.com/MultiarchSpec
+ if not find_executable('dpkg-architecture'):
+ return
+ tmpfile = os.path.join(self.build_temp, 'multiarch')
+ if not os.path.exists(self.build_temp):
+ os.makedirs(self.build_temp)
+ ret = os.system(
+ 'dpkg-architecture -qDEB_HOST_MULTIARCH > %s 2> /dev/null' %
+ tmpfile)
+ try:
+ if ret >> 8 == 0:
+ fp = open(tmpfile)
+ multiarch_path_component = fp.readline().strip()
+ fp.close()
+ add_dir_to_list(self.compiler.library_dirs,
+ '/usr/lib/' + multiarch_path_component)
+ add_dir_to_list(self.compiler.include_dirs,
+ '/usr/include/' + multiarch_path_component)
+ finally:
+ os.unlink(tmpfile)
+
def detect_modules(self):
# Ensure that /usr/local is always used
add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
+ self.add_multiarch_paths()
# Add paths specified in the environment variables LDFLAGS and
# CPPFLAGS for header and library files.

View File

@@ -0,0 +1,45 @@
--- setup.py.orig 2011-07-07 19:19:43.800122463 +0900
+++ setup.py 2011-07-07 19:25:04.548416377 +0900
@@ -13,6 +13,7 @@
from distutils.command.build_ext import build_ext
from distutils.command.install import install
from distutils.command.install_lib import install_lib
+from distutils.spawn import find_executable
# This global variable is used to hold the list of modules to be disabled.
disabled_module_list = []
@@ -242,10 +243,34 @@
return platform
return sys.platform
+ def add_multiarch_paths(self):
+ # Debian/Ubuntu multiarch support.
+ # https://wiki.ubuntu.com/MultiarchSpec
+ if not find_executable('dpkg-architecture'):
+ return
+ tmpfile = os.path.join(self.build_temp, 'multiarch')
+ if not os.path.exists(self.build_temp):
+ os.makedirs(self.build_temp)
+ ret = os.system(
+ 'dpkg-architecture -qDEB_HOST_MULTIARCH > %s 2> /dev/null' %
+ tmpfile)
+ try:
+ if ret >> 8 == 0:
+ fp = open(tmpfile)
+ multiarch_path_component = fp.readline().strip()
+ fp.close()
+ add_dir_to_list(self.compiler.library_dirs,
+ '/usr/lib/' + multiarch_path_component)
+ add_dir_to_list(self.compiler.include_dirs,
+ '/usr/include/' + multiarch_path_component)
+ finally:
+ os.unlink(tmpfile)
+
def detect_modules(self):
# Ensure that /usr/local is always used
add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
+ self.add_multiarch_paths()
# Add paths specified in the environment variables LDFLAGS and
# CPPFLAGS for header and library files.

View File

@@ -0,0 +1,45 @@
--- setup.py.orig 2011-07-07 19:19:43.800122463 +0900
+++ setup.py 2011-07-07 19:25:04.548416377 +0900
@@ -13,6 +13,7 @@
from distutils.command.build_ext import build_ext
from distutils.command.install import install
from distutils.command.install_lib import install_lib
+from distutils.spawn import find_executable
# This global variable is used to hold the list of modules to be disabled.
disabled_module_list = []
@@ -242,10 +243,34 @@
return platform
return sys.platform
+ def add_multiarch_paths(self):
+ # Debian/Ubuntu multiarch support.
+ # https://wiki.ubuntu.com/MultiarchSpec
+ if not find_executable('dpkg-architecture'):
+ return
+ tmpfile = os.path.join(self.build_temp, 'multiarch')
+ if not os.path.exists(self.build_temp):
+ os.makedirs(self.build_temp)
+ ret = os.system(
+ 'dpkg-architecture -qDEB_HOST_MULTIARCH > %s 2> /dev/null' %
+ tmpfile)
+ try:
+ if ret >> 8 == 0:
+ fp = open(tmpfile)
+ multiarch_path_component = fp.readline().strip()
+ fp.close()
+ add_dir_to_list(self.compiler.library_dirs,
+ '/usr/lib/' + multiarch_path_component)
+ add_dir_to_list(self.compiler.include_dirs,
+ '/usr/include/' + multiarch_path_component)
+ finally:
+ os.unlink(tmpfile)
+
def detect_modules(self):
# Ensure that /usr/local is always used
add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
+ self.add_multiarch_paths()
# Add paths specified in the environment variables LDFLAGS and
# CPPFLAGS for header and library files.

View File

@@ -0,0 +1,45 @@
--- setup.py.orig 2011-07-07 19:19:43.800122463 +0900
+++ setup.py 2011-07-07 19:25:04.548416377 +0900
@@ -13,6 +13,7 @@
from distutils.command.build_ext import build_ext
from distutils.command.install import install
from distutils.command.install_lib import install_lib
+from distutils.spawn import find_executable
# This global variable is used to hold the list of modules to be disabled.
disabled_module_list = []
@@ -242,10 +243,34 @@
return platform
return sys.platform
+ def add_multiarch_paths(self):
+ # Debian/Ubuntu multiarch support.
+ # https://wiki.ubuntu.com/MultiarchSpec
+ if not find_executable('dpkg-architecture'):
+ return
+ tmpfile = os.path.join(self.build_temp, 'multiarch')
+ if not os.path.exists(self.build_temp):
+ os.makedirs(self.build_temp)
+ ret = os.system(
+ 'dpkg-architecture -qDEB_HOST_MULTIARCH > %s 2> /dev/null' %
+ tmpfile)
+ try:
+ if ret >> 8 == 0:
+ fp = open(tmpfile)
+ multiarch_path_component = fp.readline().strip()
+ fp.close()
+ add_dir_to_list(self.compiler.library_dirs,
+ '/usr/lib/' + multiarch_path_component)
+ add_dir_to_list(self.compiler.include_dirs,
+ '/usr/include/' + multiarch_path_component)
+ finally:
+ os.unlink(tmpfile)
+
def detect_modules(self):
# Ensure that /usr/local is always used
add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
+ self.add_multiarch_paths()
# Add paths specified in the environment variables LDFLAGS and
# CPPFLAGS for header and library files.

View File

@@ -0,0 +1,166 @@
diff -r -u ./configure ../Python-2.5/configure
--- ./configure 2006-09-05 11:54:42.000000000 +0900
+++ ../Python-2.5/configure 2013-07-19 15:27:46.000000000 +0900
@@ -1396,6 +1396,16 @@
_ACEOF
+# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
+# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
+# them.
+
+cat >>confdefs.h <<\_ACEOF
+#define _DARWIN_C_SOURCE 1
+_ACEOF
+
+
+
define_xopen_source=yes
# Arguments passed to configure.
@@ -3885,11 +3895,110 @@
;;
# is there any other compiler on Darwin besides gcc?
Darwin*)
- BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
+ # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
+ # used to be here, but non-Apple gcc doesn't accept them.
+ if test "${CC}" = gcc
+ then
+ { echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
+echo -n "checking which compiler should be used... " >&6; }
+ case "${UNIVERSALSDK}" in
+ */MacOSX10.4u.sdk)
+ # Build using 10.4 SDK, force usage of gcc when the
+ # compiler is gcc, otherwise the user will get very
+ # confusing error messages when building on OSX 10.6
+ CC=gcc-4.0
+ CPP=cpp-4.0
+ ;;
+ esac
+ { echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+echo "$CC" >&6; }
+ fi
+
+
if test "${enable_universalsdk}"; then
- BASECFLAGS="-arch ppc -arch i386 -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
+ UNIVERSAL_ARCH_FLAGS=""
+ if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
+ UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
+ ARCH_RUN_32BIT=""
+ LIPO_32BIT_FLAGS=""
+ elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
+ UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
+ LIPO_32BIT_FLAGS=""
+ ARCH_RUN_32BIT="true"
+
+ elif test "$UNIVERSAL_ARCHS" = "all" ; then
+ UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
+ LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
+ ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
+
+ elif test "$UNIVERSAL_ARCHS" = "intel" ; then
+ UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
+ LIPO_32BIT_FLAGS="-extract i386"
+ ARCH_RUN_32BIT="/usr/bin/arch -i386"
+
+ elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
+ UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
+ LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
+ ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
+
+ else
+ as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
+
+ fi
+
+
+ CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
+ if test "${UNIVERSALSDK}" != "/"
+ then
+ CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
+ LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
+ CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
+ fi
fi
+ # Calculate the right deployment target for this build.
+ #
+ cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
+ if test ${cur_target} '>' 10.2 && \
+ test ${cur_target} '<' 10.6
+ then
+ cur_target=10.3
+ if test ${enable_universalsdk}; then
+ if test "${UNIVERSAL_ARCHS}" = "all"; then
+ # Ensure that the default platform for a
+ # 4-way universal build is OSX 10.5,
+ # that's the first OS release where
+ # 4-way builds make sense.
+ cur_target='10.5'
+
+ elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
+ cur_target='10.5'
+
+ elif test "${UNIVERSAL_ARCHS}" = "intel"; then
+ cur_target='10.5'
+
+ elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
+ cur_target='10.5'
+ fi
+ else
+ if test `/usr/bin/arch` = "i386"; then
+ # On Intel macs default to a deployment
+ # target of 10.4, that's the first OSX
+ # release with Intel support.
+ cur_target="10.4"
+ fi
+ fi
+ fi
+ CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
+
+ # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
+ # environment with a value that is the same as what we'll use
+ # in the Makefile to ensure that we'll get the same compiler
+ # environment during configure and build time.
+ MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
+ export MACOSX_DEPLOYMENT_TARGET
+ EXPORT_MACOSX_DEPLOYMENT_TARGET=''
+
;;
OSF*)
BASECFLAGS="$BASECFLAGS -mieee"
@@ -10851,7 +10960,7 @@
if test "${enable_universalsdk}"; then
:
else
- LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
+ LIBTOOL_CRUFT="${LIBTOOL_CRUFT}"
fi
LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
@@ -10863,7 +10972,7 @@
else
LIBTOOL_CRUFT=""
fi
- LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
+ LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs"
LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
esac
diff -r -u ./pyconfig.h.in ../Python-2.5/pyconfig.h.in
--- ./pyconfig.h.in 2006-07-30 23:09:47.000000000 +0900
+++ ../Python-2.5/pyconfig.h.in 2013-07-17 23:12:31.000000000 +0900
@@ -912,6 +912,11 @@
/* Define on Irix to enable u_int */
#undef _BSD_TYPES
+/* Define on Darwin to activate all library features */
+#ifndef _DARWIN_C_SOURCE
+#define _DARWIN_C_SOURCE
+#endif
+
/* This must be set to 64 on some systems to enable large file support. */
#undef _FILE_OFFSET_BITS

View File

@@ -0,0 +1,271 @@
diff -r -u ./Include/pymactoolbox.h ../Python-2.5/Include/pymactoolbox.h
--- ./Include/pymactoolbox.h 2004-11-05 16:02:59.000000000 +0900
+++ ../Python-2.5/Include/pymactoolbox.h 2013-07-17 23:38:51.000000000 +0900
@@ -8,7 +8,10 @@
#endif
#include <Carbon/Carbon.h>
+
+#ifndef __LP64__
#include <QuickTime/QuickTime.h>
+#endif /* !__LP64__ */
/*
** Helper routines for error codes and such.
@@ -18,8 +21,11 @@
PyObject *PyMac_GetOSErrException(void); /* Initialize & return it */
PyObject *PyErr_Mac(PyObject *, int); /* Exception with a mac error */
PyObject *PyMac_Error(OSErr); /* Uses PyMac_GetOSErrException */
+#ifndef __LP64__
extern OSErr PyMac_GetFullPathname(FSSpec *, char *, int); /* convert
fsspec->path */
+#endif /* __LP64__ */
+
/*
** These conversion routines are defined in mactoolboxglue.c itself.
*/
@@ -83,8 +89,10 @@
#endif /* USE_TOOLBOX_OBJECT_GLUE */
/* macfs exports */
+#ifndef __LP64__
int PyMac_GetFSSpec(PyObject *, FSSpec *); /* argument parser for FSSpec */
PyObject *PyMac_BuildFSSpec(FSSpec *); /* Convert FSSpec to PyObject */
+#endif /* !__LP64__ */
int PyMac_GetFSRef(PyObject *, FSRef *); /* argument parser for FSRef */
PyObject *PyMac_BuildFSRef(FSRef *); /* Convert FSRef to PyObject */
@@ -101,39 +109,54 @@
extern int CmpInstObj_Convert(PyObject *, ComponentInstance *);
/* Ctl exports */
+#ifndef __LP64__
extern PyObject *CtlObj_New(ControlHandle);
extern int CtlObj_Convert(PyObject *, ControlHandle *);
+#endif /* !__LP64__ */
/* Dlg exports */
+#ifndef __LP64__
extern PyObject *DlgObj_New(DialogPtr);
extern int DlgObj_Convert(PyObject *, DialogPtr *);
extern PyObject *DlgObj_WhichDialog(DialogPtr);
+#endif /* !__LP64__ */
/* Drag exports */
+#ifndef __LP64__
extern PyObject *DragObj_New(DragReference);
extern int DragObj_Convert(PyObject *, DragReference *);
+#endif /* !__LP64__ */
/* List exports */
+#ifndef __LP64__
extern PyObject *ListObj_New(ListHandle);
extern int ListObj_Convert(PyObject *, ListHandle *);
+#endif /* !__LP64__ */
/* Menu exports */
+#ifndef __LP64__
extern PyObject *MenuObj_New(MenuHandle);
extern int MenuObj_Convert(PyObject *, MenuHandle *);
+#endif /* !__LP64__ */
/* Qd exports */
+#ifndef __LP64__
extern PyObject *GrafObj_New(GrafPtr);
extern int GrafObj_Convert(PyObject *, GrafPtr *);
extern PyObject *BMObj_New(BitMapPtr);
extern int BMObj_Convert(PyObject *, BitMapPtr *);
extern PyObject *QdRGB_New(RGBColor *);
extern int QdRGB_Convert(PyObject *, RGBColor *);
+#endif /* !__LP64__ */
/* Qdoffs exports */
+#ifndef __LP64__
extern PyObject *GWorldObj_New(GWorldPtr);
extern int GWorldObj_Convert(PyObject *, GWorldPtr *);
+#endif /* !__LP64__ */
/* Qt exports */
+#ifndef __LP64__
extern PyObject *TrackObj_New(Track);
extern int TrackObj_Convert(PyObject *, Track *);
extern PyObject *MovieObj_New(Movie);
@@ -146,6 +169,7 @@
extern int UserDataObj_Convert(PyObject *, UserData *);
extern PyObject *MediaObj_New(Media);
extern int MediaObj_Convert(PyObject *, Media *);
+#endif /* !__LP64__ */
/* Res exports */
extern PyObject *ResObj_New(Handle);
@@ -154,13 +178,17 @@
extern int OptResObj_Convert(PyObject *, Handle *);
/* TE exports */
+#ifndef __LP64__
extern PyObject *TEObj_New(TEHandle);
extern int TEObj_Convert(PyObject *, TEHandle *);
+#endif /* !__LP64__ */
/* Win exports */
+#ifndef __LP64__
extern PyObject *WinObj_New(WindowPtr);
extern int WinObj_Convert(PyObject *, WindowPtr *);
extern PyObject *WinObj_WhichWindow(WindowPtr);
+#endif /* !__LP64__ */
/* CF exports */
extern PyObject *CFObj_New(CFTypeRef);
diff -r -u ./Mac/Modules/res/_Resmodule.c ../Python-2.5/Mac/Modules/res/_Resmodule.c
--- ./Mac/Modules/res/_Resmodule.c 2005-07-04 05:59:44.000000000 +0900
+++ ../Python-2.5/Mac/Modules/res/_Resmodule.c 2013-07-17 23:38:51.000000000 +0900
@@ -414,6 +414,7 @@
return _res;
}
+#ifndef __LP64__
static PyObject *ResObj_as_Control(ResourceObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
@@ -431,6 +432,7 @@
return _res;
}
+#endif /* !__LP64__ */
static PyObject *ResObj_LoadResource(ResourceObject *_self, PyObject *_args)
{
@@ -1152,6 +1154,7 @@
return _res;
}
+#ifndef __LP64__
static PyObject *Res_OpenRFPerm(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
@@ -1287,6 +1290,7 @@
_res = Py_None;
return _res;
}
+#endif /* !__LP64__ */
static PyObject *Res_InsertResourceFile(PyObject *_self, PyObject *_args)
{
@@ -1327,6 +1331,7 @@
return _res;
}
+#ifndef __LP64__
static PyObject *Res_FSpResourceFileAlreadyOpen(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
@@ -1413,6 +1418,7 @@
nextRefNum);
return _res;
}
+#endif /* !__LP64__ */
static PyObject *Res_FSOpenResFile(PyObject *_self, PyObject *_args)
{
@@ -1438,6 +1444,7 @@
return _res;
}
+#ifndef __LP64__
static PyObject *Res_FSCreateResFile(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
@@ -1534,6 +1541,7 @@
PyMac_BuildFSSpec, &newSpec);
return _res;
}
+#endif /* __LP64__ */
static PyObject *Res_FSOpenResourceFile(PyObject *_self, PyObject *_args)
{
@@ -1637,6 +1645,7 @@
PyDoc_STR("(short refNum) -> (short _rv)")},
{"SetResFileAttrs", (PyCFunction)Res_SetResFileAttrs, 1,
PyDoc_STR("(short refNum, short attrs) -> None")},
+#ifndef __LP64__
{"OpenRFPerm", (PyCFunction)Res_OpenRFPerm, 1,
PyDoc_STR("(Str255 fileName, short vRefNum, SignedByte permission) -> (short _rv)")},
{"HOpenResFile", (PyCFunction)Res_HOpenResFile, 1,
@@ -1647,10 +1656,12 @@
PyDoc_STR("(FSSpec spec, SignedByte permission) -> (short _rv)")},
{"FSpCreateResFile", (PyCFunction)Res_FSpCreateResFile, 1,
PyDoc_STR("(FSSpec spec, OSType creator, OSType fileType, ScriptCode scriptTag) -> None")},
+#endif /* !__LP64__ */
{"InsertResourceFile", (PyCFunction)Res_InsertResourceFile, 1,
PyDoc_STR("(SInt16 refNum, RsrcChainLocation where) -> None")},
{"DetachResourceFile", (PyCFunction)Res_DetachResourceFile, 1,
PyDoc_STR("(SInt16 refNum) -> None")},
+#ifndef __LP64__
{"FSpResourceFileAlreadyOpen", (PyCFunction)Res_FSpResourceFileAlreadyOpen, 1,
PyDoc_STR("(FSSpec resourceFile) -> (Boolean _rv, Boolean inChain, SInt16 refNum)")},
{"FSpOpenOrphanResFile", (PyCFunction)Res_FSpOpenOrphanResFile, 1,
@@ -1659,14 +1670,17 @@
PyDoc_STR("() -> (SInt16 refNum)")},
{"GetNextResourceFile", (PyCFunction)Res_GetNextResourceFile, 1,
PyDoc_STR("(SInt16 curRefNum) -> (SInt16 nextRefNum)")},
+#endif /* __LP64__ */
{"FSOpenResFile", (PyCFunction)Res_FSOpenResFile, 1,
PyDoc_STR("(FSRef ref, SignedByte permission) -> (short _rv)")},
+#ifndef __LP64__
{"FSCreateResFile", (PyCFunction)Res_FSCreateResFile, 1,
PyDoc_STR("(FSRef parentRef, Buffer nameLength) -> (FSRef newRef, FSSpec newSpec)")},
{"FSResourceFileAlreadyOpen", (PyCFunction)Res_FSResourceFileAlreadyOpen, 1,
PyDoc_STR("(FSRef resourceFileRef) -> (Boolean _rv, Boolean inChain, SInt16 refNum)")},
{"FSCreateResourceFile", (PyCFunction)Res_FSCreateResourceFile, 1,
PyDoc_STR("(FSRef parentRef, Buffer nameLength, Buffer forkNameLength) -> (FSRef newRef, FSSpec newSpec)")},
+#endif /* __LP64__ */
{"FSOpenResourceFile", (PyCFunction)Res_FSOpenResourceFile, 1,
PyDoc_STR("(FSRef ref, Buffer forkNameLength, SignedByte permissions) -> (SInt16 refNum)")},
{"Handle", (PyCFunction)Res_Handle, 1,
diff -r -u ./Modules/_ctypes/libffi/src/darwin/ffitarget.h ../Python-2.5/Modules/_ctypes/libffi/src/darwin/ffitarget.h
--- ./Modules/_ctypes/libffi/src/darwin/ffitarget.h 2006-05-26 06:58:05.000000000 +0900
+++ ../Python-2.5/Modules/_ctypes/libffi/src/darwin/ffitarget.h 2013-07-17 23:38:51.000000000 +0900
@@ -4,7 +4,7 @@
* created by configure). This makes is possible to build a univeral binary
* of ctypes in one go.
*/
-#if defined(__i386__)
+#if defined(__i386__) || defined(__x86_64__)
#ifndef X86_DARWIN
#define X86_DARWIN
diff -r -u ./Python/mactoolboxglue.c ../Python-2.5/Python/mactoolboxglue.c
--- ./Python/mactoolboxglue.c 2006-07-12 01:44:25.000000000 +0900
+++ ../Python-2.5/Python/mactoolboxglue.c 2013-07-17 23:39:09.000000000 +0900
@@ -106,6 +106,7 @@
}
+#ifndef __LP64__
OSErr
PyMac_GetFullPathname(FSSpec *fss, char *path, int len)
{
@@ -153,6 +154,7 @@
Py_XDECREF(fs);
return err;
}
+#endif /* !__LP64__ */
/* Convert a 4-char string object argument to an OSType value */
int
@@ -417,6 +419,7 @@
GLUE_NEW(GWorldPtr, GWorldObj_New, "Carbon.Qdoffs")
GLUE_CONVERT(GWorldPtr, GWorldObj_Convert, "Carbon.Qdoffs")
+#ifndef __LP64__
GLUE_NEW(Track, TrackObj_New, "Carbon.Qt")
GLUE_CONVERT(Track, TrackObj_Convert, "Carbon.Qt")
GLUE_NEW(Movie, MovieObj_New, "Carbon.Qt")
@@ -429,6 +432,7 @@
GLUE_CONVERT(UserData, UserDataObj_Convert, "Carbon.Qt")
GLUE_NEW(Media, MediaObj_New, "Carbon.Qt")
GLUE_CONVERT(Media, MediaObj_Convert, "Carbon.Qt")
+#endif /* !__LP64__ */
GLUE_NEW(Handle, ResObj_New, "Carbon.Res")
GLUE_CONVERT(Handle, ResObj_Convert, "Carbon.Res")

View File

@@ -0,0 +1,124 @@
diff --git ./Mac/Modules/cg/_CGmodule.c ./Mac/Modules/cg/_CGmodule.c
index 8115614..e36fce9 100755
--- ./Mac/Modules/cg/_CGmodule.c
+++ ./Mac/Modules/cg/_CGmodule.c
@@ -1025,6 +1025,7 @@ static PyObject *CGContextRefObj_CGContextSetShouldAntialias(CGContextRefObject
return _res;
}
+#ifndef __LP64__
static PyObject *CGContextRefObj_SyncCGContextOriginWithPort(CGContextRefObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
@@ -1055,6 +1056,7 @@ static PyObject *CGContextRefObj_ClipCGContextToRegion(CGContextRefObject *_self
_res = Py_None;
return _res;
}
+#endif
static PyMethodDef CGContextRefObj_methods[] = {
{"CGContextSaveGState", (PyCFunction)CGContextRefObj_CGContextSaveGState, 1,
@@ -1173,10 +1175,12 @@ static PyMethodDef CGContextRefObj_methods[] = {
PyDoc_STR("() -> None")},
{"CGContextSetShouldAntialias", (PyCFunction)CGContextRefObj_CGContextSetShouldAntialias, 1,
PyDoc_STR("(int shouldAntialias) -> None")},
+#ifndef __LP64__
{"SyncCGContextOriginWithPort", (PyCFunction)CGContextRefObj_SyncCGContextOriginWithPort, 1,
PyDoc_STR("(CGrafPtr port) -> None")},
{"ClipCGContextToRegion", (PyCFunction)CGContextRefObj_ClipCGContextToRegion, 1,
PyDoc_STR("(Rect portRect, RgnHandle region) -> None")},
+#endif
{NULL, NULL, 0}
};
@@ -1254,6 +1258,7 @@ PyTypeObject CGContextRef_Type = {
/* ------------------ End object type CGContextRef ------------------ */
+#ifndef __LP64__
static PyObject *CG_CreateCGContextForPort(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
@@ -1271,10 +1276,13 @@ static PyObject *CG_CreateCGContextForPort(PyObject *_self, PyObject *_args)
return _res;
}
+#endif
static PyMethodDef CG_methods[] = {
+#ifndef __LP64__
{"CreateCGContextForPort", (PyCFunction)CG_CreateCGContextForPort, 1,
PyDoc_STR("(CGrafPtr) -> CGContextRef")},
+#endif
{NULL, NULL, 0}
};
diff --git ./Modules/_curses_panel.c ./Modules/_curses_panel.c
index 0acf3fd..1728b59 100644
--- ./Modules/_curses_panel.c
+++ ./Modules/_curses_panel.c
@@ -56,7 +56,7 @@ typedef struct {
PyTypeObject PyCursesPanel_Type;
-#define PyCursesPanel_Check(v) ((v)->ob_type == &PyCursesPanel_Type)
+#define PyCursesPanel_Check(v) (Py_TYPE(v) == &PyCursesPanel_Type)
/* Some helper functions. The problem is that there's always a window
associated with a panel. To ensure that Python's GC doesn't pull
@@ -178,12 +178,13 @@ PyCursesPanel_New(PANEL *pan, PyCursesWindowObject *wo)
po = PyObject_NEW(PyCursesPanelObject, &PyCursesPanel_Type);
if (po == NULL) return NULL;
po->pan = pan;
- po->wo = wo;
- Py_INCREF(wo);
if (insert_lop(po) < 0) {
- PyObject_DEL(po);
- return NULL;
+ po->wo = NULL;
+ Py_DECREF(po);
+ return NULL;
}
+ po->wo = wo;
+ Py_INCREF(wo);
return (PyObject *)po;
}
@@ -191,8 +192,10 @@ static void
PyCursesPanel_Dealloc(PyCursesPanelObject *po)
{
(void)del_panel(po->pan);
- Py_DECREF(po->wo);
- remove_lop(po);
+ if (po->wo != NULL) {
+ Py_DECREF(po->wo);
+ remove_lop(po);
+ }
PyObject_DEL(po);
}
@@ -338,11 +341,10 @@ PyCursesPanel_GetAttr(PyCursesPanelObject *self, char *name)
/* -------------------------------------------------------*/
PyTypeObject PyCursesPanel_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_curses_panel.curses panel", /*tp_name*/
- sizeof(PyCursesPanelObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
+ PyVarObject_HEAD_INIT(NULL, 0)
+ "_curses_panel.curses panel", /*tp_name*/
+ sizeof(PyCursesPanelObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
/* methods */
(destructor)PyCursesPanel_Dealloc, /*tp_dealloc*/
0, /*tp_print*/
@@ -458,7 +460,7 @@ init_curses_panel(void)
PyObject *m, *d, *v;
/* Initialize object type */
- PyCursesPanel_Type.ob_type = &PyType_Type;
+ Py_TYPE(&PyCursesPanel_Type) = &PyType_Type;
import_curses();

View File

@@ -0,0 +1,166 @@
diff -r -u ./configure ../Python-2.5/configure
--- ./configure 2006-09-05 11:54:42.000000000 +0900
+++ ../Python-2.5/configure 2013-07-19 15:27:46.000000000 +0900
@@ -1396,6 +1396,16 @@
_ACEOF
+# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
+# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
+# them.
+
+cat >>confdefs.h <<\_ACEOF
+#define _DARWIN_C_SOURCE 1
+_ACEOF
+
+
+
define_xopen_source=yes
# Arguments passed to configure.
@@ -3885,11 +3895,110 @@
;;
# is there any other compiler on Darwin besides gcc?
Darwin*)
- BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
+ # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
+ # used to be here, but non-Apple gcc doesn't accept them.
+ if test "${CC}" = gcc
+ then
+ { echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
+echo -n "checking which compiler should be used... " >&6; }
+ case "${UNIVERSALSDK}" in
+ */MacOSX10.4u.sdk)
+ # Build using 10.4 SDK, force usage of gcc when the
+ # compiler is gcc, otherwise the user will get very
+ # confusing error messages when building on OSX 10.6
+ CC=gcc-4.0
+ CPP=cpp-4.0
+ ;;
+ esac
+ { echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+echo "$CC" >&6; }
+ fi
+
+
if test "${enable_universalsdk}"; then
- BASECFLAGS="-arch ppc -arch i386 -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
+ UNIVERSAL_ARCH_FLAGS=""
+ if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
+ UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
+ ARCH_RUN_32BIT=""
+ LIPO_32BIT_FLAGS=""
+ elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
+ UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
+ LIPO_32BIT_FLAGS=""
+ ARCH_RUN_32BIT="true"
+
+ elif test "$UNIVERSAL_ARCHS" = "all" ; then
+ UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
+ LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
+ ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
+
+ elif test "$UNIVERSAL_ARCHS" = "intel" ; then
+ UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
+ LIPO_32BIT_FLAGS="-extract i386"
+ ARCH_RUN_32BIT="/usr/bin/arch -i386"
+
+ elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
+ UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
+ LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
+ ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
+
+ else
+ as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
+
+ fi
+
+
+ CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
+ if test "${UNIVERSALSDK}" != "/"
+ then
+ CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
+ LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
+ CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
+ fi
fi
+ # Calculate the right deployment target for this build.
+ #
+ cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
+ if test ${cur_target} '>' 10.2 && \
+ test ${cur_target} '<' 10.6
+ then
+ cur_target=10.3
+ if test ${enable_universalsdk}; then
+ if test "${UNIVERSAL_ARCHS}" = "all"; then
+ # Ensure that the default platform for a
+ # 4-way universal build is OSX 10.5,
+ # that's the first OS release where
+ # 4-way builds make sense.
+ cur_target='10.5'
+
+ elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
+ cur_target='10.5'
+
+ elif test "${UNIVERSAL_ARCHS}" = "intel"; then
+ cur_target='10.5'
+
+ elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
+ cur_target='10.5'
+ fi
+ else
+ if test `/usr/bin/arch` = "i386"; then
+ # On Intel macs default to a deployment
+ # target of 10.4, that's the first OSX
+ # release with Intel support.
+ cur_target="10.4"
+ fi
+ fi
+ fi
+ CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
+
+ # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
+ # environment with a value that is the same as what we'll use
+ # in the Makefile to ensure that we'll get the same compiler
+ # environment during configure and build time.
+ MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
+ export MACOSX_DEPLOYMENT_TARGET
+ EXPORT_MACOSX_DEPLOYMENT_TARGET=''
+
;;
OSF*)
BASECFLAGS="$BASECFLAGS -mieee"
@@ -10851,7 +10960,7 @@
if test "${enable_universalsdk}"; then
:
else
- LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
+ LIBTOOL_CRUFT="${LIBTOOL_CRUFT}"
fi
LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
@@ -10863,7 +10972,7 @@
else
LIBTOOL_CRUFT=""
fi
- LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
+ LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs"
LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
esac
diff -r -u ./pyconfig.h.in ../Python-2.5/pyconfig.h.in
--- ./pyconfig.h.in 2006-07-30 23:09:47.000000000 +0900
+++ ../Python-2.5/pyconfig.h.in 2013-07-17 23:12:31.000000000 +0900
@@ -912,6 +912,11 @@
/* Define on Irix to enable u_int */
#undef _BSD_TYPES
+/* Define on Darwin to activate all library features */
+#ifndef _DARWIN_C_SOURCE
+#define _DARWIN_C_SOURCE
+#endif
+
/* This must be set to 64 on some systems to enable large file support. */
#undef _FILE_OFFSET_BITS

View File

@@ -0,0 +1,271 @@
diff -r -u ./Include/pymactoolbox.h ../Python-2.5/Include/pymactoolbox.h
--- ./Include/pymactoolbox.h 2004-11-05 16:02:59.000000000 +0900
+++ ../Python-2.5/Include/pymactoolbox.h 2013-07-17 23:38:51.000000000 +0900
@@ -8,7 +8,10 @@
#endif
#include <Carbon/Carbon.h>
+
+#ifndef __LP64__
#include <QuickTime/QuickTime.h>
+#endif /* !__LP64__ */
/*
** Helper routines for error codes and such.
@@ -18,8 +21,11 @@
PyObject *PyMac_GetOSErrException(void); /* Initialize & return it */
PyObject *PyErr_Mac(PyObject *, int); /* Exception with a mac error */
PyObject *PyMac_Error(OSErr); /* Uses PyMac_GetOSErrException */
+#ifndef __LP64__
extern OSErr PyMac_GetFullPathname(FSSpec *, char *, int); /* convert
fsspec->path */
+#endif /* __LP64__ */
+
/*
** These conversion routines are defined in mactoolboxglue.c itself.
*/
@@ -83,8 +89,10 @@
#endif /* USE_TOOLBOX_OBJECT_GLUE */
/* macfs exports */
+#ifndef __LP64__
int PyMac_GetFSSpec(PyObject *, FSSpec *); /* argument parser for FSSpec */
PyObject *PyMac_BuildFSSpec(FSSpec *); /* Convert FSSpec to PyObject */
+#endif /* !__LP64__ */
int PyMac_GetFSRef(PyObject *, FSRef *); /* argument parser for FSRef */
PyObject *PyMac_BuildFSRef(FSRef *); /* Convert FSRef to PyObject */
@@ -101,39 +109,54 @@
extern int CmpInstObj_Convert(PyObject *, ComponentInstance *);
/* Ctl exports */
+#ifndef __LP64__
extern PyObject *CtlObj_New(ControlHandle);
extern int CtlObj_Convert(PyObject *, ControlHandle *);
+#endif /* !__LP64__ */
/* Dlg exports */
+#ifndef __LP64__
extern PyObject *DlgObj_New(DialogPtr);
extern int DlgObj_Convert(PyObject *, DialogPtr *);
extern PyObject *DlgObj_WhichDialog(DialogPtr);
+#endif /* !__LP64__ */
/* Drag exports */
+#ifndef __LP64__
extern PyObject *DragObj_New(DragReference);
extern int DragObj_Convert(PyObject *, DragReference *);
+#endif /* !__LP64__ */
/* List exports */
+#ifndef __LP64__
extern PyObject *ListObj_New(ListHandle);
extern int ListObj_Convert(PyObject *, ListHandle *);
+#endif /* !__LP64__ */
/* Menu exports */
+#ifndef __LP64__
extern PyObject *MenuObj_New(MenuHandle);
extern int MenuObj_Convert(PyObject *, MenuHandle *);
+#endif /* !__LP64__ */
/* Qd exports */
+#ifndef __LP64__
extern PyObject *GrafObj_New(GrafPtr);
extern int GrafObj_Convert(PyObject *, GrafPtr *);
extern PyObject *BMObj_New(BitMapPtr);
extern int BMObj_Convert(PyObject *, BitMapPtr *);
extern PyObject *QdRGB_New(RGBColor *);
extern int QdRGB_Convert(PyObject *, RGBColor *);
+#endif /* !__LP64__ */
/* Qdoffs exports */
+#ifndef __LP64__
extern PyObject *GWorldObj_New(GWorldPtr);
extern int GWorldObj_Convert(PyObject *, GWorldPtr *);
+#endif /* !__LP64__ */
/* Qt exports */
+#ifndef __LP64__
extern PyObject *TrackObj_New(Track);
extern int TrackObj_Convert(PyObject *, Track *);
extern PyObject *MovieObj_New(Movie);
@@ -146,6 +169,7 @@
extern int UserDataObj_Convert(PyObject *, UserData *);
extern PyObject *MediaObj_New(Media);
extern int MediaObj_Convert(PyObject *, Media *);
+#endif /* !__LP64__ */
/* Res exports */
extern PyObject *ResObj_New(Handle);
@@ -154,13 +178,17 @@
extern int OptResObj_Convert(PyObject *, Handle *);
/* TE exports */
+#ifndef __LP64__
extern PyObject *TEObj_New(TEHandle);
extern int TEObj_Convert(PyObject *, TEHandle *);
+#endif /* !__LP64__ */
/* Win exports */
+#ifndef __LP64__
extern PyObject *WinObj_New(WindowPtr);
extern int WinObj_Convert(PyObject *, WindowPtr *);
extern PyObject *WinObj_WhichWindow(WindowPtr);
+#endif /* !__LP64__ */
/* CF exports */
extern PyObject *CFObj_New(CFTypeRef);
diff -r -u ./Mac/Modules/res/_Resmodule.c ../Python-2.5/Mac/Modules/res/_Resmodule.c
--- ./Mac/Modules/res/_Resmodule.c 2005-07-04 05:59:44.000000000 +0900
+++ ../Python-2.5/Mac/Modules/res/_Resmodule.c 2013-07-17 23:38:51.000000000 +0900
@@ -414,6 +414,7 @@
return _res;
}
+#ifndef __LP64__
static PyObject *ResObj_as_Control(ResourceObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
@@ -431,6 +432,7 @@
return _res;
}
+#endif /* !__LP64__ */
static PyObject *ResObj_LoadResource(ResourceObject *_self, PyObject *_args)
{
@@ -1152,6 +1154,7 @@
return _res;
}
+#ifndef __LP64__
static PyObject *Res_OpenRFPerm(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
@@ -1287,6 +1290,7 @@
_res = Py_None;
return _res;
}
+#endif /* !__LP64__ */
static PyObject *Res_InsertResourceFile(PyObject *_self, PyObject *_args)
{
@@ -1327,6 +1331,7 @@
return _res;
}
+#ifndef __LP64__
static PyObject *Res_FSpResourceFileAlreadyOpen(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
@@ -1413,6 +1418,7 @@
nextRefNum);
return _res;
}
+#endif /* !__LP64__ */
static PyObject *Res_FSOpenResFile(PyObject *_self, PyObject *_args)
{
@@ -1438,6 +1444,7 @@
return _res;
}
+#ifndef __LP64__
static PyObject *Res_FSCreateResFile(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
@@ -1534,6 +1541,7 @@
PyMac_BuildFSSpec, &newSpec);
return _res;
}
+#endif /* __LP64__ */
static PyObject *Res_FSOpenResourceFile(PyObject *_self, PyObject *_args)
{
@@ -1637,6 +1645,7 @@
PyDoc_STR("(short refNum) -> (short _rv)")},
{"SetResFileAttrs", (PyCFunction)Res_SetResFileAttrs, 1,
PyDoc_STR("(short refNum, short attrs) -> None")},
+#ifndef __LP64__
{"OpenRFPerm", (PyCFunction)Res_OpenRFPerm, 1,
PyDoc_STR("(Str255 fileName, short vRefNum, SignedByte permission) -> (short _rv)")},
{"HOpenResFile", (PyCFunction)Res_HOpenResFile, 1,
@@ -1647,10 +1656,12 @@
PyDoc_STR("(FSSpec spec, SignedByte permission) -> (short _rv)")},
{"FSpCreateResFile", (PyCFunction)Res_FSpCreateResFile, 1,
PyDoc_STR("(FSSpec spec, OSType creator, OSType fileType, ScriptCode scriptTag) -> None")},
+#endif /* !__LP64__ */
{"InsertResourceFile", (PyCFunction)Res_InsertResourceFile, 1,
PyDoc_STR("(SInt16 refNum, RsrcChainLocation where) -> None")},
{"DetachResourceFile", (PyCFunction)Res_DetachResourceFile, 1,
PyDoc_STR("(SInt16 refNum) -> None")},
+#ifndef __LP64__
{"FSpResourceFileAlreadyOpen", (PyCFunction)Res_FSpResourceFileAlreadyOpen, 1,
PyDoc_STR("(FSSpec resourceFile) -> (Boolean _rv, Boolean inChain, SInt16 refNum)")},
{"FSpOpenOrphanResFile", (PyCFunction)Res_FSpOpenOrphanResFile, 1,
@@ -1659,14 +1670,17 @@
PyDoc_STR("() -> (SInt16 refNum)")},
{"GetNextResourceFile", (PyCFunction)Res_GetNextResourceFile, 1,
PyDoc_STR("(SInt16 curRefNum) -> (SInt16 nextRefNum)")},
+#endif /* __LP64__ */
{"FSOpenResFile", (PyCFunction)Res_FSOpenResFile, 1,
PyDoc_STR("(FSRef ref, SignedByte permission) -> (short _rv)")},
+#ifndef __LP64__
{"FSCreateResFile", (PyCFunction)Res_FSCreateResFile, 1,
PyDoc_STR("(FSRef parentRef, Buffer nameLength) -> (FSRef newRef, FSSpec newSpec)")},
{"FSResourceFileAlreadyOpen", (PyCFunction)Res_FSResourceFileAlreadyOpen, 1,
PyDoc_STR("(FSRef resourceFileRef) -> (Boolean _rv, Boolean inChain, SInt16 refNum)")},
{"FSCreateResourceFile", (PyCFunction)Res_FSCreateResourceFile, 1,
PyDoc_STR("(FSRef parentRef, Buffer nameLength, Buffer forkNameLength) -> (FSRef newRef, FSSpec newSpec)")},
+#endif /* __LP64__ */
{"FSOpenResourceFile", (PyCFunction)Res_FSOpenResourceFile, 1,
PyDoc_STR("(FSRef ref, Buffer forkNameLength, SignedByte permissions) -> (SInt16 refNum)")},
{"Handle", (PyCFunction)Res_Handle, 1,
diff -r -u ./Modules/_ctypes/libffi/src/darwin/ffitarget.h ../Python-2.5/Modules/_ctypes/libffi/src/darwin/ffitarget.h
--- ./Modules/_ctypes/libffi/src/darwin/ffitarget.h 2006-05-26 06:58:05.000000000 +0900
+++ ../Python-2.5/Modules/_ctypes/libffi/src/darwin/ffitarget.h 2013-07-17 23:38:51.000000000 +0900
@@ -4,7 +4,7 @@
* created by configure). This makes is possible to build a univeral binary
* of ctypes in one go.
*/
-#if defined(__i386__)
+#if defined(__i386__) || defined(__x86_64__)
#ifndef X86_DARWIN
#define X86_DARWIN
diff -r -u ./Python/mactoolboxglue.c ../Python-2.5/Python/mactoolboxglue.c
--- ./Python/mactoolboxglue.c 2006-07-12 01:44:25.000000000 +0900
+++ ../Python-2.5/Python/mactoolboxglue.c 2013-07-17 23:39:09.000000000 +0900
@@ -106,6 +106,7 @@
}
+#ifndef __LP64__
OSErr
PyMac_GetFullPathname(FSSpec *fss, char *path, int len)
{
@@ -153,6 +154,7 @@
Py_XDECREF(fs);
return err;
}
+#endif /* !__LP64__ */
/* Convert a 4-char string object argument to an OSType value */
int
@@ -417,6 +419,7 @@
GLUE_NEW(GWorldPtr, GWorldObj_New, "Carbon.Qdoffs")
GLUE_CONVERT(GWorldPtr, GWorldObj_Convert, "Carbon.Qdoffs")
+#ifndef __LP64__
GLUE_NEW(Track, TrackObj_New, "Carbon.Qt")
GLUE_CONVERT(Track, TrackObj_Convert, "Carbon.Qt")
GLUE_NEW(Movie, MovieObj_New, "Carbon.Qt")
@@ -429,6 +432,7 @@
GLUE_CONVERT(UserData, UserDataObj_Convert, "Carbon.Qt")
GLUE_NEW(Media, MediaObj_New, "Carbon.Qt")
GLUE_CONVERT(Media, MediaObj_Convert, "Carbon.Qt")
+#endif /* !__LP64__ */
GLUE_NEW(Handle, ResObj_New, "Carbon.Res")
GLUE_CONVERT(Handle, ResObj_Convert, "Carbon.Res")

View File

@@ -0,0 +1,124 @@
diff --git ./Mac/Modules/cg/_CGmodule.c ./Mac/Modules/cg/_CGmodule.c
index 8115614..e36fce9 100755
--- ./Mac/Modules/cg/_CGmodule.c
+++ ./Mac/Modules/cg/_CGmodule.c
@@ -1025,6 +1025,7 @@ static PyObject *CGContextRefObj_CGContextSetShouldAntialias(CGContextRefObject
return _res;
}
+#ifndef __LP64__
static PyObject *CGContextRefObj_SyncCGContextOriginWithPort(CGContextRefObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
@@ -1055,6 +1056,7 @@ static PyObject *CGContextRefObj_ClipCGContextToRegion(CGContextRefObject *_self
_res = Py_None;
return _res;
}
+#endif
static PyMethodDef CGContextRefObj_methods[] = {
{"CGContextSaveGState", (PyCFunction)CGContextRefObj_CGContextSaveGState, 1,
@@ -1173,10 +1175,12 @@ static PyMethodDef CGContextRefObj_methods[] = {
PyDoc_STR("() -> None")},
{"CGContextSetShouldAntialias", (PyCFunction)CGContextRefObj_CGContextSetShouldAntialias, 1,
PyDoc_STR("(int shouldAntialias) -> None")},
+#ifndef __LP64__
{"SyncCGContextOriginWithPort", (PyCFunction)CGContextRefObj_SyncCGContextOriginWithPort, 1,
PyDoc_STR("(CGrafPtr port) -> None")},
{"ClipCGContextToRegion", (PyCFunction)CGContextRefObj_ClipCGContextToRegion, 1,
PyDoc_STR("(Rect portRect, RgnHandle region) -> None")},
+#endif
{NULL, NULL, 0}
};
@@ -1254,6 +1258,7 @@ PyTypeObject CGContextRef_Type = {
/* ------------------ End object type CGContextRef ------------------ */
+#ifndef __LP64__
static PyObject *CG_CreateCGContextForPort(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
@@ -1271,10 +1276,13 @@ static PyObject *CG_CreateCGContextForPort(PyObject *_self, PyObject *_args)
return _res;
}
+#endif
static PyMethodDef CG_methods[] = {
+#ifndef __LP64__
{"CreateCGContextForPort", (PyCFunction)CG_CreateCGContextForPort, 1,
PyDoc_STR("(CGrafPtr) -> CGContextRef")},
+#endif
{NULL, NULL, 0}
};
diff --git ./Modules/_curses_panel.c ./Modules/_curses_panel.c
index 0acf3fd..1728b59 100644
--- ./Modules/_curses_panel.c
+++ ./Modules/_curses_panel.c
@@ -56,7 +56,7 @@ typedef struct {
PyTypeObject PyCursesPanel_Type;
-#define PyCursesPanel_Check(v) ((v)->ob_type == &PyCursesPanel_Type)
+#define PyCursesPanel_Check(v) (Py_TYPE(v) == &PyCursesPanel_Type)
/* Some helper functions. The problem is that there's always a window
associated with a panel. To ensure that Python's GC doesn't pull
@@ -178,12 +178,13 @@ PyCursesPanel_New(PANEL *pan, PyCursesWindowObject *wo)
po = PyObject_NEW(PyCursesPanelObject, &PyCursesPanel_Type);
if (po == NULL) return NULL;
po->pan = pan;
- po->wo = wo;
- Py_INCREF(wo);
if (insert_lop(po) < 0) {
- PyObject_DEL(po);
- return NULL;
+ po->wo = NULL;
+ Py_DECREF(po);
+ return NULL;
}
+ po->wo = wo;
+ Py_INCREF(wo);
return (PyObject *)po;
}
@@ -191,8 +192,10 @@ static void
PyCursesPanel_Dealloc(PyCursesPanelObject *po)
{
(void)del_panel(po->pan);
- Py_DECREF(po->wo);
- remove_lop(po);
+ if (po->wo != NULL) {
+ Py_DECREF(po->wo);
+ remove_lop(po);
+ }
PyObject_DEL(po);
}
@@ -338,11 +341,10 @@ PyCursesPanel_GetAttr(PyCursesPanelObject *self, char *name)
/* -------------------------------------------------------*/
PyTypeObject PyCursesPanel_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_curses_panel.curses panel", /*tp_name*/
- sizeof(PyCursesPanelObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
+ PyVarObject_HEAD_INIT(NULL, 0)
+ "_curses_panel.curses panel", /*tp_name*/
+ sizeof(PyCursesPanelObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
/* methods */
(destructor)PyCursesPanel_Dealloc, /*tp_dealloc*/
0, /*tp_print*/
@@ -458,7 +460,7 @@ init_curses_panel(void)
PyObject *m, *d, *v;
/* Initialize object type */
- PyCursesPanel_Type.ob_type = &PyType_Type;
+ Py_TYPE(&PyCursesPanel_Type) = &PyType_Type;
import_curses();

View File

@@ -0,0 +1,166 @@
diff -r -u ./configure ../Python-2.5/configure
--- ./configure 2006-09-05 11:54:42.000000000 +0900
+++ ../Python-2.5/configure 2013-07-19 15:27:46.000000000 +0900
@@ -1396,6 +1396,16 @@
_ACEOF
+# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
+# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
+# them.
+
+cat >>confdefs.h <<\_ACEOF
+#define _DARWIN_C_SOURCE 1
+_ACEOF
+
+
+
define_xopen_source=yes
# Arguments passed to configure.
@@ -3885,11 +3895,110 @@
;;
# is there any other compiler on Darwin besides gcc?
Darwin*)
- BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
+ # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
+ # used to be here, but non-Apple gcc doesn't accept them.
+ if test "${CC}" = gcc
+ then
+ { echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
+echo -n "checking which compiler should be used... " >&6; }
+ case "${UNIVERSALSDK}" in
+ */MacOSX10.4u.sdk)
+ # Build using 10.4 SDK, force usage of gcc when the
+ # compiler is gcc, otherwise the user will get very
+ # confusing error messages when building on OSX 10.6
+ CC=gcc-4.0
+ CPP=cpp-4.0
+ ;;
+ esac
+ { echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+echo "$CC" >&6; }
+ fi
+
+
if test "${enable_universalsdk}"; then
- BASECFLAGS="-arch ppc -arch i386 -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
+ UNIVERSAL_ARCH_FLAGS=""
+ if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
+ UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
+ ARCH_RUN_32BIT=""
+ LIPO_32BIT_FLAGS=""
+ elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
+ UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
+ LIPO_32BIT_FLAGS=""
+ ARCH_RUN_32BIT="true"
+
+ elif test "$UNIVERSAL_ARCHS" = "all" ; then
+ UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
+ LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
+ ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
+
+ elif test "$UNIVERSAL_ARCHS" = "intel" ; then
+ UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
+ LIPO_32BIT_FLAGS="-extract i386"
+ ARCH_RUN_32BIT="/usr/bin/arch -i386"
+
+ elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
+ UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
+ LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
+ ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
+
+ else
+ as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
+
+ fi
+
+
+ CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
+ if test "${UNIVERSALSDK}" != "/"
+ then
+ CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
+ LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
+ CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
+ fi
fi
+ # Calculate the right deployment target for this build.
+ #
+ cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
+ if test ${cur_target} '>' 10.2 && \
+ test ${cur_target} '<' 10.6
+ then
+ cur_target=10.3
+ if test ${enable_universalsdk}; then
+ if test "${UNIVERSAL_ARCHS}" = "all"; then
+ # Ensure that the default platform for a
+ # 4-way universal build is OSX 10.5,
+ # that's the first OS release where
+ # 4-way builds make sense.
+ cur_target='10.5'
+
+ elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
+ cur_target='10.5'
+
+ elif test "${UNIVERSAL_ARCHS}" = "intel"; then
+ cur_target='10.5'
+
+ elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
+ cur_target='10.5'
+ fi
+ else
+ if test `/usr/bin/arch` = "i386"; then
+ # On Intel macs default to a deployment
+ # target of 10.4, that's the first OSX
+ # release with Intel support.
+ cur_target="10.4"
+ fi
+ fi
+ fi
+ CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
+
+ # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
+ # environment with a value that is the same as what we'll use
+ # in the Makefile to ensure that we'll get the same compiler
+ # environment during configure and build time.
+ MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
+ export MACOSX_DEPLOYMENT_TARGET
+ EXPORT_MACOSX_DEPLOYMENT_TARGET=''
+
;;
OSF*)
BASECFLAGS="$BASECFLAGS -mieee"
@@ -10851,7 +10960,7 @@
if test "${enable_universalsdk}"; then
:
else
- LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
+ LIBTOOL_CRUFT="${LIBTOOL_CRUFT}"
fi
LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
@@ -10863,7 +10972,7 @@
else
LIBTOOL_CRUFT=""
fi
- LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
+ LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs"
LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
esac
diff -r -u ./pyconfig.h.in ../Python-2.5/pyconfig.h.in
--- ./pyconfig.h.in 2006-07-30 23:09:47.000000000 +0900
+++ ../Python-2.5/pyconfig.h.in 2013-07-17 23:12:31.000000000 +0900
@@ -912,6 +912,11 @@
/* Define on Irix to enable u_int */
#undef _BSD_TYPES
+/* Define on Darwin to activate all library features */
+#ifndef _DARWIN_C_SOURCE
+#define _DARWIN_C_SOURCE
+#endif
+
/* This must be set to 64 on some systems to enable large file support. */
#undef _FILE_OFFSET_BITS

View File

@@ -0,0 +1,271 @@
diff -r -u ./Include/pymactoolbox.h ../Python-2.5/Include/pymactoolbox.h
--- ./Include/pymactoolbox.h 2004-11-05 16:02:59.000000000 +0900
+++ ../Python-2.5/Include/pymactoolbox.h 2013-07-17 23:38:51.000000000 +0900
@@ -8,7 +8,10 @@
#endif
#include <Carbon/Carbon.h>
+
+#ifndef __LP64__
#include <QuickTime/QuickTime.h>
+#endif /* !__LP64__ */
/*
** Helper routines for error codes and such.
@@ -18,8 +21,11 @@
PyObject *PyMac_GetOSErrException(void); /* Initialize & return it */
PyObject *PyErr_Mac(PyObject *, int); /* Exception with a mac error */
PyObject *PyMac_Error(OSErr); /* Uses PyMac_GetOSErrException */
+#ifndef __LP64__
extern OSErr PyMac_GetFullPathname(FSSpec *, char *, int); /* convert
fsspec->path */
+#endif /* __LP64__ */
+
/*
** These conversion routines are defined in mactoolboxglue.c itself.
*/
@@ -83,8 +89,10 @@
#endif /* USE_TOOLBOX_OBJECT_GLUE */
/* macfs exports */
+#ifndef __LP64__
int PyMac_GetFSSpec(PyObject *, FSSpec *); /* argument parser for FSSpec */
PyObject *PyMac_BuildFSSpec(FSSpec *); /* Convert FSSpec to PyObject */
+#endif /* !__LP64__ */
int PyMac_GetFSRef(PyObject *, FSRef *); /* argument parser for FSRef */
PyObject *PyMac_BuildFSRef(FSRef *); /* Convert FSRef to PyObject */
@@ -101,39 +109,54 @@
extern int CmpInstObj_Convert(PyObject *, ComponentInstance *);
/* Ctl exports */
+#ifndef __LP64__
extern PyObject *CtlObj_New(ControlHandle);
extern int CtlObj_Convert(PyObject *, ControlHandle *);
+#endif /* !__LP64__ */
/* Dlg exports */
+#ifndef __LP64__
extern PyObject *DlgObj_New(DialogPtr);
extern int DlgObj_Convert(PyObject *, DialogPtr *);
extern PyObject *DlgObj_WhichDialog(DialogPtr);
+#endif /* !__LP64__ */
/* Drag exports */
+#ifndef __LP64__
extern PyObject *DragObj_New(DragReference);
extern int DragObj_Convert(PyObject *, DragReference *);
+#endif /* !__LP64__ */
/* List exports */
+#ifndef __LP64__
extern PyObject *ListObj_New(ListHandle);
extern int ListObj_Convert(PyObject *, ListHandle *);
+#endif /* !__LP64__ */
/* Menu exports */
+#ifndef __LP64__
extern PyObject *MenuObj_New(MenuHandle);
extern int MenuObj_Convert(PyObject *, MenuHandle *);
+#endif /* !__LP64__ */
/* Qd exports */
+#ifndef __LP64__
extern PyObject *GrafObj_New(GrafPtr);
extern int GrafObj_Convert(PyObject *, GrafPtr *);
extern PyObject *BMObj_New(BitMapPtr);
extern int BMObj_Convert(PyObject *, BitMapPtr *);
extern PyObject *QdRGB_New(RGBColor *);
extern int QdRGB_Convert(PyObject *, RGBColor *);
+#endif /* !__LP64__ */
/* Qdoffs exports */
+#ifndef __LP64__
extern PyObject *GWorldObj_New(GWorldPtr);
extern int GWorldObj_Convert(PyObject *, GWorldPtr *);
+#endif /* !__LP64__ */
/* Qt exports */
+#ifndef __LP64__
extern PyObject *TrackObj_New(Track);
extern int TrackObj_Convert(PyObject *, Track *);
extern PyObject *MovieObj_New(Movie);
@@ -146,6 +169,7 @@
extern int UserDataObj_Convert(PyObject *, UserData *);
extern PyObject *MediaObj_New(Media);
extern int MediaObj_Convert(PyObject *, Media *);
+#endif /* !__LP64__ */
/* Res exports */
extern PyObject *ResObj_New(Handle);
@@ -154,13 +178,17 @@
extern int OptResObj_Convert(PyObject *, Handle *);
/* TE exports */
+#ifndef __LP64__
extern PyObject *TEObj_New(TEHandle);
extern int TEObj_Convert(PyObject *, TEHandle *);
+#endif /* !__LP64__ */
/* Win exports */
+#ifndef __LP64__
extern PyObject *WinObj_New(WindowPtr);
extern int WinObj_Convert(PyObject *, WindowPtr *);
extern PyObject *WinObj_WhichWindow(WindowPtr);
+#endif /* !__LP64__ */
/* CF exports */
extern PyObject *CFObj_New(CFTypeRef);
diff -r -u ./Mac/Modules/res/_Resmodule.c ../Python-2.5/Mac/Modules/res/_Resmodule.c
--- ./Mac/Modules/res/_Resmodule.c 2005-07-04 05:59:44.000000000 +0900
+++ ../Python-2.5/Mac/Modules/res/_Resmodule.c 2013-07-17 23:38:51.000000000 +0900
@@ -414,6 +414,7 @@
return _res;
}
+#ifndef __LP64__
static PyObject *ResObj_as_Control(ResourceObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
@@ -431,6 +432,7 @@
return _res;
}
+#endif /* !__LP64__ */
static PyObject *ResObj_LoadResource(ResourceObject *_self, PyObject *_args)
{
@@ -1152,6 +1154,7 @@
return _res;
}
+#ifndef __LP64__
static PyObject *Res_OpenRFPerm(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
@@ -1287,6 +1290,7 @@
_res = Py_None;
return _res;
}
+#endif /* !__LP64__ */
static PyObject *Res_InsertResourceFile(PyObject *_self, PyObject *_args)
{
@@ -1327,6 +1331,7 @@
return _res;
}
+#ifndef __LP64__
static PyObject *Res_FSpResourceFileAlreadyOpen(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
@@ -1413,6 +1418,7 @@
nextRefNum);
return _res;
}
+#endif /* !__LP64__ */
static PyObject *Res_FSOpenResFile(PyObject *_self, PyObject *_args)
{
@@ -1438,6 +1444,7 @@
return _res;
}
+#ifndef __LP64__
static PyObject *Res_FSCreateResFile(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
@@ -1534,6 +1541,7 @@
PyMac_BuildFSSpec, &newSpec);
return _res;
}
+#endif /* __LP64__ */
static PyObject *Res_FSOpenResourceFile(PyObject *_self, PyObject *_args)
{
@@ -1637,6 +1645,7 @@
PyDoc_STR("(short refNum) -> (short _rv)")},
{"SetResFileAttrs", (PyCFunction)Res_SetResFileAttrs, 1,
PyDoc_STR("(short refNum, short attrs) -> None")},
+#ifndef __LP64__
{"OpenRFPerm", (PyCFunction)Res_OpenRFPerm, 1,
PyDoc_STR("(Str255 fileName, short vRefNum, SignedByte permission) -> (short _rv)")},
{"HOpenResFile", (PyCFunction)Res_HOpenResFile, 1,
@@ -1647,10 +1656,12 @@
PyDoc_STR("(FSSpec spec, SignedByte permission) -> (short _rv)")},
{"FSpCreateResFile", (PyCFunction)Res_FSpCreateResFile, 1,
PyDoc_STR("(FSSpec spec, OSType creator, OSType fileType, ScriptCode scriptTag) -> None")},
+#endif /* !__LP64__ */
{"InsertResourceFile", (PyCFunction)Res_InsertResourceFile, 1,
PyDoc_STR("(SInt16 refNum, RsrcChainLocation where) -> None")},
{"DetachResourceFile", (PyCFunction)Res_DetachResourceFile, 1,
PyDoc_STR("(SInt16 refNum) -> None")},
+#ifndef __LP64__
{"FSpResourceFileAlreadyOpen", (PyCFunction)Res_FSpResourceFileAlreadyOpen, 1,
PyDoc_STR("(FSSpec resourceFile) -> (Boolean _rv, Boolean inChain, SInt16 refNum)")},
{"FSpOpenOrphanResFile", (PyCFunction)Res_FSpOpenOrphanResFile, 1,
@@ -1659,14 +1670,17 @@
PyDoc_STR("() -> (SInt16 refNum)")},
{"GetNextResourceFile", (PyCFunction)Res_GetNextResourceFile, 1,
PyDoc_STR("(SInt16 curRefNum) -> (SInt16 nextRefNum)")},
+#endif /* __LP64__ */
{"FSOpenResFile", (PyCFunction)Res_FSOpenResFile, 1,
PyDoc_STR("(FSRef ref, SignedByte permission) -> (short _rv)")},
+#ifndef __LP64__
{"FSCreateResFile", (PyCFunction)Res_FSCreateResFile, 1,
PyDoc_STR("(FSRef parentRef, Buffer nameLength) -> (FSRef newRef, FSSpec newSpec)")},
{"FSResourceFileAlreadyOpen", (PyCFunction)Res_FSResourceFileAlreadyOpen, 1,
PyDoc_STR("(FSRef resourceFileRef) -> (Boolean _rv, Boolean inChain, SInt16 refNum)")},
{"FSCreateResourceFile", (PyCFunction)Res_FSCreateResourceFile, 1,
PyDoc_STR("(FSRef parentRef, Buffer nameLength, Buffer forkNameLength) -> (FSRef newRef, FSSpec newSpec)")},
+#endif /* __LP64__ */
{"FSOpenResourceFile", (PyCFunction)Res_FSOpenResourceFile, 1,
PyDoc_STR("(FSRef ref, Buffer forkNameLength, SignedByte permissions) -> (SInt16 refNum)")},
{"Handle", (PyCFunction)Res_Handle, 1,
diff -r -u ./Modules/_ctypes/libffi/src/darwin/ffitarget.h ../Python-2.5/Modules/_ctypes/libffi/src/darwin/ffitarget.h
--- ./Modules/_ctypes/libffi/src/darwin/ffitarget.h 2006-05-26 06:58:05.000000000 +0900
+++ ../Python-2.5/Modules/_ctypes/libffi/src/darwin/ffitarget.h 2013-07-17 23:38:51.000000000 +0900
@@ -4,7 +4,7 @@
* created by configure). This makes is possible to build a univeral binary
* of ctypes in one go.
*/
-#if defined(__i386__)
+#if defined(__i386__) || defined(__x86_64__)
#ifndef X86_DARWIN
#define X86_DARWIN
diff -r -u ./Python/mactoolboxglue.c ../Python-2.5/Python/mactoolboxglue.c
--- ./Python/mactoolboxglue.c 2006-07-12 01:44:25.000000000 +0900
+++ ../Python-2.5/Python/mactoolboxglue.c 2013-07-17 23:39:09.000000000 +0900
@@ -106,6 +106,7 @@
}
+#ifndef __LP64__
OSErr
PyMac_GetFullPathname(FSSpec *fss, char *path, int len)
{
@@ -153,6 +154,7 @@
Py_XDECREF(fs);
return err;
}
+#endif /* !__LP64__ */
/* Convert a 4-char string object argument to an OSType value */
int
@@ -417,6 +419,7 @@
GLUE_NEW(GWorldPtr, GWorldObj_New, "Carbon.Qdoffs")
GLUE_CONVERT(GWorldPtr, GWorldObj_Convert, "Carbon.Qdoffs")
+#ifndef __LP64__
GLUE_NEW(Track, TrackObj_New, "Carbon.Qt")
GLUE_CONVERT(Track, TrackObj_Convert, "Carbon.Qt")
GLUE_NEW(Movie, MovieObj_New, "Carbon.Qt")
@@ -429,6 +432,7 @@
GLUE_CONVERT(UserData, UserDataObj_Convert, "Carbon.Qt")
GLUE_NEW(Media, MediaObj_New, "Carbon.Qt")
GLUE_CONVERT(Media, MediaObj_Convert, "Carbon.Qt")
+#endif /* !__LP64__ */
GLUE_NEW(Handle, ResObj_New, "Carbon.Res")
GLUE_CONVERT(Handle, ResObj_Convert, "Carbon.Res")

View File

@@ -0,0 +1,124 @@
diff --git ./Mac/Modules/cg/_CGmodule.c ./Mac/Modules/cg/_CGmodule.c
index 8115614..e36fce9 100755
--- ./Mac/Modules/cg/_CGmodule.c
+++ ./Mac/Modules/cg/_CGmodule.c
@@ -1025,6 +1025,7 @@ static PyObject *CGContextRefObj_CGContextSetShouldAntialias(CGContextRefObject
return _res;
}
+#ifndef __LP64__
static PyObject *CGContextRefObj_SyncCGContextOriginWithPort(CGContextRefObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
@@ -1055,6 +1056,7 @@ static PyObject *CGContextRefObj_ClipCGContextToRegion(CGContextRefObject *_self
_res = Py_None;
return _res;
}
+#endif
static PyMethodDef CGContextRefObj_methods[] = {
{"CGContextSaveGState", (PyCFunction)CGContextRefObj_CGContextSaveGState, 1,
@@ -1173,10 +1175,12 @@ static PyMethodDef CGContextRefObj_methods[] = {
PyDoc_STR("() -> None")},
{"CGContextSetShouldAntialias", (PyCFunction)CGContextRefObj_CGContextSetShouldAntialias, 1,
PyDoc_STR("(int shouldAntialias) -> None")},
+#ifndef __LP64__
{"SyncCGContextOriginWithPort", (PyCFunction)CGContextRefObj_SyncCGContextOriginWithPort, 1,
PyDoc_STR("(CGrafPtr port) -> None")},
{"ClipCGContextToRegion", (PyCFunction)CGContextRefObj_ClipCGContextToRegion, 1,
PyDoc_STR("(Rect portRect, RgnHandle region) -> None")},
+#endif
{NULL, NULL, 0}
};
@@ -1254,6 +1258,7 @@ PyTypeObject CGContextRef_Type = {
/* ------------------ End object type CGContextRef ------------------ */
+#ifndef __LP64__
static PyObject *CG_CreateCGContextForPort(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
@@ -1271,10 +1276,13 @@ static PyObject *CG_CreateCGContextForPort(PyObject *_self, PyObject *_args)
return _res;
}
+#endif
static PyMethodDef CG_methods[] = {
+#ifndef __LP64__
{"CreateCGContextForPort", (PyCFunction)CG_CreateCGContextForPort, 1,
PyDoc_STR("(CGrafPtr) -> CGContextRef")},
+#endif
{NULL, NULL, 0}
};
diff --git ./Modules/_curses_panel.c ./Modules/_curses_panel.c
index 0acf3fd..1728b59 100644
--- ./Modules/_curses_panel.c
+++ ./Modules/_curses_panel.c
@@ -56,7 +56,7 @@ typedef struct {
PyTypeObject PyCursesPanel_Type;
-#define PyCursesPanel_Check(v) ((v)->ob_type == &PyCursesPanel_Type)
+#define PyCursesPanel_Check(v) (Py_TYPE(v) == &PyCursesPanel_Type)
/* Some helper functions. The problem is that there's always a window
associated with a panel. To ensure that Python's GC doesn't pull
@@ -178,12 +178,13 @@ PyCursesPanel_New(PANEL *pan, PyCursesWindowObject *wo)
po = PyObject_NEW(PyCursesPanelObject, &PyCursesPanel_Type);
if (po == NULL) return NULL;
po->pan = pan;
- po->wo = wo;
- Py_INCREF(wo);
if (insert_lop(po) < 0) {
- PyObject_DEL(po);
- return NULL;
+ po->wo = NULL;
+ Py_DECREF(po);
+ return NULL;
}
+ po->wo = wo;
+ Py_INCREF(wo);
return (PyObject *)po;
}
@@ -191,8 +192,10 @@ static void
PyCursesPanel_Dealloc(PyCursesPanelObject *po)
{
(void)del_panel(po->pan);
- Py_DECREF(po->wo);
- remove_lop(po);
+ if (po->wo != NULL) {
+ Py_DECREF(po->wo);
+ remove_lop(po);
+ }
PyObject_DEL(po);
}
@@ -338,11 +341,10 @@ PyCursesPanel_GetAttr(PyCursesPanelObject *self, char *name)
/* -------------------------------------------------------*/
PyTypeObject PyCursesPanel_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_curses_panel.curses panel", /*tp_name*/
- sizeof(PyCursesPanelObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
+ PyVarObject_HEAD_INIT(NULL, 0)
+ "_curses_panel.curses panel", /*tp_name*/
+ sizeof(PyCursesPanelObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
/* methods */
(destructor)PyCursesPanel_Dealloc, /*tp_dealloc*/
0, /*tp_print*/
@@ -458,7 +460,7 @@ init_curses_panel(void)
PyObject *m, *d, *v;
/* Initialize object type */
- PyCursesPanel_Type.ob_type = &PyType_Type;
+ Py_TYPE(&PyCursesPanel_Type) = &PyType_Type;
import_curses();

View File

@@ -0,0 +1,166 @@
diff -r -u ./configure ../Python-2.5/configure
--- ./configure 2006-09-05 11:54:42.000000000 +0900
+++ ../Python-2.5/configure 2013-07-19 15:27:46.000000000 +0900
@@ -1396,6 +1396,16 @@
_ACEOF
+# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
+# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
+# them.
+
+cat >>confdefs.h <<\_ACEOF
+#define _DARWIN_C_SOURCE 1
+_ACEOF
+
+
+
define_xopen_source=yes
# Arguments passed to configure.
@@ -3885,11 +3895,110 @@
;;
# is there any other compiler on Darwin besides gcc?
Darwin*)
- BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
+ # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
+ # used to be here, but non-Apple gcc doesn't accept them.
+ if test "${CC}" = gcc
+ then
+ { echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
+echo -n "checking which compiler should be used... " >&6; }
+ case "${UNIVERSALSDK}" in
+ */MacOSX10.4u.sdk)
+ # Build using 10.4 SDK, force usage of gcc when the
+ # compiler is gcc, otherwise the user will get very
+ # confusing error messages when building on OSX 10.6
+ CC=gcc-4.0
+ CPP=cpp-4.0
+ ;;
+ esac
+ { echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+echo "$CC" >&6; }
+ fi
+
+
if test "${enable_universalsdk}"; then
- BASECFLAGS="-arch ppc -arch i386 -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
+ UNIVERSAL_ARCH_FLAGS=""
+ if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
+ UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
+ ARCH_RUN_32BIT=""
+ LIPO_32BIT_FLAGS=""
+ elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
+ UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
+ LIPO_32BIT_FLAGS=""
+ ARCH_RUN_32BIT="true"
+
+ elif test "$UNIVERSAL_ARCHS" = "all" ; then
+ UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
+ LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
+ ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
+
+ elif test "$UNIVERSAL_ARCHS" = "intel" ; then
+ UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
+ LIPO_32BIT_FLAGS="-extract i386"
+ ARCH_RUN_32BIT="/usr/bin/arch -i386"
+
+ elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
+ UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
+ LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
+ ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
+
+ else
+ as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
+
+ fi
+
+
+ CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
+ if test "${UNIVERSALSDK}" != "/"
+ then
+ CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
+ LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
+ CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
+ fi
fi
+ # Calculate the right deployment target for this build.
+ #
+ cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
+ if test ${cur_target} '>' 10.2 && \
+ test ${cur_target} '<' 10.6
+ then
+ cur_target=10.3
+ if test ${enable_universalsdk}; then
+ if test "${UNIVERSAL_ARCHS}" = "all"; then
+ # Ensure that the default platform for a
+ # 4-way universal build is OSX 10.5,
+ # that's the first OS release where
+ # 4-way builds make sense.
+ cur_target='10.5'
+
+ elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
+ cur_target='10.5'
+
+ elif test "${UNIVERSAL_ARCHS}" = "intel"; then
+ cur_target='10.5'
+
+ elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
+ cur_target='10.5'
+ fi
+ else
+ if test `/usr/bin/arch` = "i386"; then
+ # On Intel macs default to a deployment
+ # target of 10.4, that's the first OSX
+ # release with Intel support.
+ cur_target="10.4"
+ fi
+ fi
+ fi
+ CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
+
+ # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
+ # environment with a value that is the same as what we'll use
+ # in the Makefile to ensure that we'll get the same compiler
+ # environment during configure and build time.
+ MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
+ export MACOSX_DEPLOYMENT_TARGET
+ EXPORT_MACOSX_DEPLOYMENT_TARGET=''
+
;;
OSF*)
BASECFLAGS="$BASECFLAGS -mieee"
@@ -10851,7 +10960,7 @@
if test "${enable_universalsdk}"; then
:
else
- LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
+ LIBTOOL_CRUFT="${LIBTOOL_CRUFT}"
fi
LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
@@ -10863,7 +10972,7 @@
else
LIBTOOL_CRUFT=""
fi
- LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
+ LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs"
LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
esac
diff -r -u ./pyconfig.h.in ../Python-2.5/pyconfig.h.in
--- ./pyconfig.h.in 2006-07-30 23:09:47.000000000 +0900
+++ ../Python-2.5/pyconfig.h.in 2013-07-17 23:12:31.000000000 +0900
@@ -912,6 +912,11 @@
/* Define on Irix to enable u_int */
#undef _BSD_TYPES
+/* Define on Darwin to activate all library features */
+#ifndef _DARWIN_C_SOURCE
+#define _DARWIN_C_SOURCE
+#endif
+
/* This must be set to 64 on some systems to enable large file support. */
#undef _FILE_OFFSET_BITS

View File

@@ -0,0 +1,271 @@
diff -r -u ./Include/pymactoolbox.h ../Python-2.5/Include/pymactoolbox.h
--- ./Include/pymactoolbox.h 2004-11-05 16:02:59.000000000 +0900
+++ ../Python-2.5/Include/pymactoolbox.h 2013-07-17 23:38:51.000000000 +0900
@@ -8,7 +8,10 @@
#endif
#include <Carbon/Carbon.h>
+
+#ifndef __LP64__
#include <QuickTime/QuickTime.h>
+#endif /* !__LP64__ */
/*
** Helper routines for error codes and such.
@@ -18,8 +21,11 @@
PyObject *PyMac_GetOSErrException(void); /* Initialize & return it */
PyObject *PyErr_Mac(PyObject *, int); /* Exception with a mac error */
PyObject *PyMac_Error(OSErr); /* Uses PyMac_GetOSErrException */
+#ifndef __LP64__
extern OSErr PyMac_GetFullPathname(FSSpec *, char *, int); /* convert
fsspec->path */
+#endif /* __LP64__ */
+
/*
** These conversion routines are defined in mactoolboxglue.c itself.
*/
@@ -83,8 +89,10 @@
#endif /* USE_TOOLBOX_OBJECT_GLUE */
/* macfs exports */
+#ifndef __LP64__
int PyMac_GetFSSpec(PyObject *, FSSpec *); /* argument parser for FSSpec */
PyObject *PyMac_BuildFSSpec(FSSpec *); /* Convert FSSpec to PyObject */
+#endif /* !__LP64__ */
int PyMac_GetFSRef(PyObject *, FSRef *); /* argument parser for FSRef */
PyObject *PyMac_BuildFSRef(FSRef *); /* Convert FSRef to PyObject */
@@ -101,39 +109,54 @@
extern int CmpInstObj_Convert(PyObject *, ComponentInstance *);
/* Ctl exports */
+#ifndef __LP64__
extern PyObject *CtlObj_New(ControlHandle);
extern int CtlObj_Convert(PyObject *, ControlHandle *);
+#endif /* !__LP64__ */
/* Dlg exports */
+#ifndef __LP64__
extern PyObject *DlgObj_New(DialogPtr);
extern int DlgObj_Convert(PyObject *, DialogPtr *);
extern PyObject *DlgObj_WhichDialog(DialogPtr);
+#endif /* !__LP64__ */
/* Drag exports */
+#ifndef __LP64__
extern PyObject *DragObj_New(DragReference);
extern int DragObj_Convert(PyObject *, DragReference *);
+#endif /* !__LP64__ */
/* List exports */
+#ifndef __LP64__
extern PyObject *ListObj_New(ListHandle);
extern int ListObj_Convert(PyObject *, ListHandle *);
+#endif /* !__LP64__ */
/* Menu exports */
+#ifndef __LP64__
extern PyObject *MenuObj_New(MenuHandle);
extern int MenuObj_Convert(PyObject *, MenuHandle *);
+#endif /* !__LP64__ */
/* Qd exports */
+#ifndef __LP64__
extern PyObject *GrafObj_New(GrafPtr);
extern int GrafObj_Convert(PyObject *, GrafPtr *);
extern PyObject *BMObj_New(BitMapPtr);
extern int BMObj_Convert(PyObject *, BitMapPtr *);
extern PyObject *QdRGB_New(RGBColor *);
extern int QdRGB_Convert(PyObject *, RGBColor *);
+#endif /* !__LP64__ */
/* Qdoffs exports */
+#ifndef __LP64__
extern PyObject *GWorldObj_New(GWorldPtr);
extern int GWorldObj_Convert(PyObject *, GWorldPtr *);
+#endif /* !__LP64__ */
/* Qt exports */
+#ifndef __LP64__
extern PyObject *TrackObj_New(Track);
extern int TrackObj_Convert(PyObject *, Track *);
extern PyObject *MovieObj_New(Movie);
@@ -146,6 +169,7 @@
extern int UserDataObj_Convert(PyObject *, UserData *);
extern PyObject *MediaObj_New(Media);
extern int MediaObj_Convert(PyObject *, Media *);
+#endif /* !__LP64__ */
/* Res exports */
extern PyObject *ResObj_New(Handle);
@@ -154,13 +178,17 @@
extern int OptResObj_Convert(PyObject *, Handle *);
/* TE exports */
+#ifndef __LP64__
extern PyObject *TEObj_New(TEHandle);
extern int TEObj_Convert(PyObject *, TEHandle *);
+#endif /* !__LP64__ */
/* Win exports */
+#ifndef __LP64__
extern PyObject *WinObj_New(WindowPtr);
extern int WinObj_Convert(PyObject *, WindowPtr *);
extern PyObject *WinObj_WhichWindow(WindowPtr);
+#endif /* !__LP64__ */
/* CF exports */
extern PyObject *CFObj_New(CFTypeRef);
diff -r -u ./Mac/Modules/res/_Resmodule.c ../Python-2.5/Mac/Modules/res/_Resmodule.c
--- ./Mac/Modules/res/_Resmodule.c 2005-07-04 05:59:44.000000000 +0900
+++ ../Python-2.5/Mac/Modules/res/_Resmodule.c 2013-07-17 23:38:51.000000000 +0900
@@ -414,6 +414,7 @@
return _res;
}
+#ifndef __LP64__
static PyObject *ResObj_as_Control(ResourceObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
@@ -431,6 +432,7 @@
return _res;
}
+#endif /* !__LP64__ */
static PyObject *ResObj_LoadResource(ResourceObject *_self, PyObject *_args)
{
@@ -1152,6 +1154,7 @@
return _res;
}
+#ifndef __LP64__
static PyObject *Res_OpenRFPerm(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
@@ -1287,6 +1290,7 @@
_res = Py_None;
return _res;
}
+#endif /* !__LP64__ */
static PyObject *Res_InsertResourceFile(PyObject *_self, PyObject *_args)
{
@@ -1327,6 +1331,7 @@
return _res;
}
+#ifndef __LP64__
static PyObject *Res_FSpResourceFileAlreadyOpen(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
@@ -1413,6 +1418,7 @@
nextRefNum);
return _res;
}
+#endif /* !__LP64__ */
static PyObject *Res_FSOpenResFile(PyObject *_self, PyObject *_args)
{
@@ -1438,6 +1444,7 @@
return _res;
}
+#ifndef __LP64__
static PyObject *Res_FSCreateResFile(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
@@ -1534,6 +1541,7 @@
PyMac_BuildFSSpec, &newSpec);
return _res;
}
+#endif /* __LP64__ */
static PyObject *Res_FSOpenResourceFile(PyObject *_self, PyObject *_args)
{
@@ -1637,6 +1645,7 @@
PyDoc_STR("(short refNum) -> (short _rv)")},
{"SetResFileAttrs", (PyCFunction)Res_SetResFileAttrs, 1,
PyDoc_STR("(short refNum, short attrs) -> None")},
+#ifndef __LP64__
{"OpenRFPerm", (PyCFunction)Res_OpenRFPerm, 1,
PyDoc_STR("(Str255 fileName, short vRefNum, SignedByte permission) -> (short _rv)")},
{"HOpenResFile", (PyCFunction)Res_HOpenResFile, 1,
@@ -1647,10 +1656,12 @@
PyDoc_STR("(FSSpec spec, SignedByte permission) -> (short _rv)")},
{"FSpCreateResFile", (PyCFunction)Res_FSpCreateResFile, 1,
PyDoc_STR("(FSSpec spec, OSType creator, OSType fileType, ScriptCode scriptTag) -> None")},
+#endif /* !__LP64__ */
{"InsertResourceFile", (PyCFunction)Res_InsertResourceFile, 1,
PyDoc_STR("(SInt16 refNum, RsrcChainLocation where) -> None")},
{"DetachResourceFile", (PyCFunction)Res_DetachResourceFile, 1,
PyDoc_STR("(SInt16 refNum) -> None")},
+#ifndef __LP64__
{"FSpResourceFileAlreadyOpen", (PyCFunction)Res_FSpResourceFileAlreadyOpen, 1,
PyDoc_STR("(FSSpec resourceFile) -> (Boolean _rv, Boolean inChain, SInt16 refNum)")},
{"FSpOpenOrphanResFile", (PyCFunction)Res_FSpOpenOrphanResFile, 1,
@@ -1659,14 +1670,17 @@
PyDoc_STR("() -> (SInt16 refNum)")},
{"GetNextResourceFile", (PyCFunction)Res_GetNextResourceFile, 1,
PyDoc_STR("(SInt16 curRefNum) -> (SInt16 nextRefNum)")},
+#endif /* __LP64__ */
{"FSOpenResFile", (PyCFunction)Res_FSOpenResFile, 1,
PyDoc_STR("(FSRef ref, SignedByte permission) -> (short _rv)")},
+#ifndef __LP64__
{"FSCreateResFile", (PyCFunction)Res_FSCreateResFile, 1,
PyDoc_STR("(FSRef parentRef, Buffer nameLength) -> (FSRef newRef, FSSpec newSpec)")},
{"FSResourceFileAlreadyOpen", (PyCFunction)Res_FSResourceFileAlreadyOpen, 1,
PyDoc_STR("(FSRef resourceFileRef) -> (Boolean _rv, Boolean inChain, SInt16 refNum)")},
{"FSCreateResourceFile", (PyCFunction)Res_FSCreateResourceFile, 1,
PyDoc_STR("(FSRef parentRef, Buffer nameLength, Buffer forkNameLength) -> (FSRef newRef, FSSpec newSpec)")},
+#endif /* __LP64__ */
{"FSOpenResourceFile", (PyCFunction)Res_FSOpenResourceFile, 1,
PyDoc_STR("(FSRef ref, Buffer forkNameLength, SignedByte permissions) -> (SInt16 refNum)")},
{"Handle", (PyCFunction)Res_Handle, 1,
diff -r -u ./Modules/_ctypes/libffi/src/darwin/ffitarget.h ../Python-2.5/Modules/_ctypes/libffi/src/darwin/ffitarget.h
--- ./Modules/_ctypes/libffi/src/darwin/ffitarget.h 2006-05-26 06:58:05.000000000 +0900
+++ ../Python-2.5/Modules/_ctypes/libffi/src/darwin/ffitarget.h 2013-07-17 23:38:51.000000000 +0900
@@ -4,7 +4,7 @@
* created by configure). This makes is possible to build a univeral binary
* of ctypes in one go.
*/
-#if defined(__i386__)
+#if defined(__i386__) || defined(__x86_64__)
#ifndef X86_DARWIN
#define X86_DARWIN
diff -r -u ./Python/mactoolboxglue.c ../Python-2.5/Python/mactoolboxglue.c
--- ./Python/mactoolboxglue.c 2006-07-12 01:44:25.000000000 +0900
+++ ../Python-2.5/Python/mactoolboxglue.c 2013-07-17 23:39:09.000000000 +0900
@@ -106,6 +106,7 @@
}
+#ifndef __LP64__
OSErr
PyMac_GetFullPathname(FSSpec *fss, char *path, int len)
{
@@ -153,6 +154,7 @@
Py_XDECREF(fs);
return err;
}
+#endif /* !__LP64__ */
/* Convert a 4-char string object argument to an OSType value */
int
@@ -417,6 +419,7 @@
GLUE_NEW(GWorldPtr, GWorldObj_New, "Carbon.Qdoffs")
GLUE_CONVERT(GWorldPtr, GWorldObj_Convert, "Carbon.Qdoffs")
+#ifndef __LP64__
GLUE_NEW(Track, TrackObj_New, "Carbon.Qt")
GLUE_CONVERT(Track, TrackObj_Convert, "Carbon.Qt")
GLUE_NEW(Movie, MovieObj_New, "Carbon.Qt")
@@ -429,6 +432,7 @@
GLUE_CONVERT(UserData, UserDataObj_Convert, "Carbon.Qt")
GLUE_NEW(Media, MediaObj_New, "Carbon.Qt")
GLUE_CONVERT(Media, MediaObj_Convert, "Carbon.Qt")
+#endif /* !__LP64__ */
GLUE_NEW(Handle, ResObj_New, "Carbon.Res")
GLUE_CONVERT(Handle, ResObj_Convert, "Carbon.Res")

Some files were not shown because too many files have changed in this diff Show More