1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-09 12:03:49 -05:00

Compare commits

..

13 Commits

Author SHA1 Message Date
Yamashita Yuu
d08fcc522e release 0.1.1 2012-09-03 19:40:30 +09:00
Yamashita Yuu
f0ff5a416e added 3.3.0rc1 2012-09-03 19:36:04 +09:00
Yamashita Yuu
e66ca60340 updated screenshot 2012-08-31 21:05:18 +09:00
Yamashita Yuu
71e5cd962e updated README 2012-08-31 20:59:24 +09:00
Yamashita Yuu
da659739d2 fixed pyenv shell. we cannot carry out bash array via envvars. 2012-08-31 20:12:26 +09:00
Yamashita Yuu
dff57ae35d s/PYENV_VERSIONS/PYENV_VERSION/ for backward compatibility. 2012-08-31 19:39:29 +09:00
Yamashita Yuu
2856f81bb9 added more pythons 2012-08-31 19:11:29 +09:00
Yamashita Yuu
5224641f1a added CPython 2.5.6 2012-08-31 17:20:31 +09:00
Yamashita Yuu
a4c02082cb pypy installation doesn't require gcc 2012-08-31 17:18:47 +09:00
Yamashita Yuu
80c0dce7b2 Merge branch 'version-stack' 2012-08-31 16:50:57 +09:00
Yamashita Yuu
de25a84dc2 fixed build error on Mac OS X 2012-08-31 16:50:24 +09:00
Yamashita Yuu
8187bc84e3 search commands from python version stack.
users can use multiple python versions at once.
2012-08-31 16:09:46 +09:00
Yamashita Yuu
880ea61dd8 0.1.1git 2012-08-31 15:59:36 +09:00
37 changed files with 500 additions and 88 deletions

171
README.md
View File

@@ -7,12 +7,16 @@ tools that do one thing well.
This project was forked from [rbenv](https://github.com/sstephenson/rbenv) and. This project was forked from [rbenv](https://github.com/sstephenson/rbenv) and.
[ruby-build](https://github.com/sstephenson/ruby-build) and modified for Python. [ruby-build](https://github.com/sstephenson/ruby-build) and modified for Python.
<img src="http://gyazo.com/9c829fafdf5e58880c820349c4e9197e.png?1346414267" width="849" height="454">
### pyenv _does…_ ### pyenv _does…_
* Let you **change the global Python version** on a per-user basis. * Let you **change the global Python version** on a per-user basis.
* Provide support for **per-project Python versions**. * Provide support for **per-project Python versions**.
* Allow you to **override the Python version** with an environment * Allow you to **override the Python version** with an environment
variable. variable.
* Search commands from **multiple versions of Python at a time**.
This may be helpful to test across Python versions with [tox](http://pypi.python.org/pypi/tox).
## Table of Contents ## Table of Contents
@@ -20,7 +24,16 @@ This project was forked from [rbenv](https://github.com/sstephenson/rbenv) and.
* [2 Installation](#section_2) * [2 Installation](#section_2)
* [2.1 Basic GitHub Checkout](#section_2.1) * [2.1 Basic GitHub Checkout](#section_2.1)
* [2.1.1 Upgrading](#section_2.1.1) * [2.1.1 Upgrading](#section_2.1.1)
* [2.2 Neckbeard Configuration](#section_2.3)
* [3 Usage](#section_3) * [3 Usage](#section_3)
* [3.1 pyenv global](#section_3.1)
* [3.2 pyenv local](#section_3.2)
* [3.3 pyenv shell](#section_3.3)
* [3.4 pyenv versions](#section_3.4)
* [3.5 pyenv version](#section_3.5)
* [3.6 pyenv rehash](#section_3.6)
* [3.7 pyenv which](#section_3.7)
* [3.8 pyenv whence](#section_3.8)
* [4 Development](#section_4) * [4 Development](#section_4)
* [4.1 Version History](#section_4.1) * [4.1 Version History](#section_4.1)
* [4.2 License](#section_4.2) * [4.2 License](#section_4.2)
@@ -103,13 +116,155 @@ tag:
$ git fetch $ git fetch
$ git tag $ git tag
v0.1.0 v0.1.0
v0.1.1 $ git checkout v0.1.0
v0.1.2
v0.2.0 ### <a name="section_2.2"></a> 2.2 Neckbeard Configuration
$ git checkout v0.2.0
Skip this section unless you must know what every line in your shell
profile is doing.
`pyenv init` is the only command that crosses the line of loading
extra commands into your shell. Coming from rvm, some of you might be
opposed to this idea. Here's what `pyenv init` actually does:
1. Sets up your shims path. This is the only requirement for pyenv to
function properly. You can do this by hand by prepending
`~/.pyenv/shims` to your `$PATH`.
2. Installs autocompletion. This is entirely optional but pretty
useful. Sourcing `~/.pyenv/completions/pyenv.bash` will set that
up. There is also a `~/.pyenv/completions/pyenv.zsh` for Zsh
users.
3. Rehashes shims. From time to time you'll need to rebuild your
shim files. Doing this on init makes sure everything is up to
date. You can always run `pyenv rehash` manually.
4. Installs the sh dispatcher. This bit is also optional, but allows
pyenv and plugins to change variables in your current shell, making
commands like `pyenv shell` possible. The sh dispatcher doesn't do
anything crazy like override `cd` or hack your shell prompt, but if
for some reason you need `pyenv` to be a real script rather than a
shell function, you can safely skip it.
Run `pyenv init -` for yourself to see exactly what happens under the
hood.
## <a name="section_3"></a> 3 Usage ## <a name="section_3"></a> 3 Usage
Like `git`, the `pyenv` command delegates to subcommands based on its
first argument. The most common subcommands are:
### <a name="section_3.1"></a> 3.1 pyenv global
Sets the global version of Python to be used in all shells by writing
the version name to the `~/.pyenv/version` file. This version can be
overridden by a per-project `.pyenv-version` file, or by setting the
`PYENV_VERSION` environment variable.
$ pyenv global 2.7.3
The special version name `system` tells pyenv to use the system Python
(detected by searching your `$PATH`).
When run without a version number, `pyenv global` reports the
currently configured global version.
_pyenv extension_
You can specify multiple versions for global Python. Commands within
these versions are searched by specified order.
$ pyenv global 2.7.3 3.2.3
$ pyenv global
2.7.3
3.2.3
### <a name="section_3.2"></a> 3.2 pyenv local
Sets a local per-project Python version by writing the version name to
an `.pyenv-version` file in the current directory. This version
overrides the global, and can be overridden itself by setting the
`PYENV_VERSION` environment variable or with the `pyenv shell`
command.
$ pyenv local rbx-1.2.4
When run without a version number, `pyenv local` reports the currently
configured local version. You can also unset the local version:
$ pyenv local --unset
_pyenv extension_
You can specify multiple versions for local Python.
### <a name="section_3.3"></a> 3.3 pyenv shell
Sets a shell-specific Python version by setting the `PYENV_VERSION`
environment variable in your shell. This version overrides both
project-specific versions and the global version.
$ pyenv shell pypy-1.9
When run without a version number, `pyenv shell` reports the current
value of `PYENV_VERSION`. You can also unset the shell version:
$ pyenv shell --unset
Note that you'll need pyenv's shell integration enabled (step 3 of
the installation instructions) in order to use this command. If you
prefer not to use shell integration, you may simply set the
`PYENV_VERSION` variable yourself:
$ export PYENV_VERSION=pypy-1.9
### <a name="section_3.4"></a> 3.4 pyenv versions
Lists all Python versions known to pyenv, and shows an asterisk next to
the currently active version.
$ pyenv versions
2.5.6
2.6.8
* 2.7.3 (set by /home/yyuu/.pyenv/version)
3.2.3
jython-2.5.3
pypy-1.9
### <a name="section_3.5"></a> 3.5 pyenv version
Displays the currently active Python version, along with information on
how it was set.
$ pyenv version
2.7.3 (set by /home/yyuu/.pyenv/version)
### <a name="section_3.6"></a> 3.6 pyenv rehash
Installs shims for all Python binaries known to pyenv (i.e.,
`~/.pyenv/versions/*/bin/*`). Run this command after you install a new
version of Python, or install a gem that provides binaries.
$ pyenv rehash
### <a name="section_3.7"></a> 3.7 pyenv which
Displays the full path to the binary that pyenv will execute when you
run the given command.
$ pyenv which python3.2
/Users/sam/.pyenv/versions/3.2.3/bin/python3.2
### <a name="section_3.8"></a> 3.8 pyenv whence
Lists all Python versions with the given command installed.
$ pyenv whence 2to3
2.6.8
2.7.3
3.2.3
## <a name="section_4"></a> 4 Development ## <a name="section_4"></a> 4 Development
The pyenv source code is [hosted on The pyenv source code is [hosted on
@@ -121,6 +276,10 @@ tracker](https://github.com/yyuu/pyenv/issues).
### <a name="section_4.1"></a> 4.1 Version History ### <a name="section_4.1"></a> 4.1 Version History
**0.1.1** (September 3, 2012)
* Support multiple versions of Python at a time.
**0.1.0** (August 31, 2012) **0.1.0** (August 31, 2012)
* Initial public release. * Initial public release.
@@ -129,8 +288,8 @@ tracker](https://github.com/yyuu/pyenv/issues).
(The MIT license) (The MIT license)
Copyright (c) 2011 Sam Stephenson * Copyright (c) 2011 Sam Stephenson
Copyright (c) 2012 Yamashita, Yuu * Copyright (c) 2012 Yamashita, Yuu
Permission is hereby granted, free of charge, to any person obtaining Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the a copy of this software and associated documentation files (the

View File

@@ -60,7 +60,7 @@ shopt -u nullglob
command="$1" command="$1"
case "$command" in case "$command" in
"" | "-h" | "--help" ) "" | "-h" | "--help" )
echo -e "pyenv 0.1.0\n$(pyenv-help)" >&2 echo -e "pyenv 0.1.1\n$(pyenv-help)" >&2
;; ;;
* ) * )
command_path="$(command -v "pyenv-$command" || true)" command_path="$(command -v "pyenv-$command" || true)"

View File

@@ -8,14 +8,19 @@ if [ "$1" = "--complete" ]; then
exec pyenv-versions --bare exec pyenv-versions --bare
fi fi
PYENV_VERSION="$1" PYENV_VERSION=($@)
PYENV_VERSION_FILE="${PYENV_ROOT}/version" PYENV_VERSION_FILE="${PYENV_ROOT}/version"
if [ -n "$PYENV_VERSION" ]; then if [ -n "$PYENV_VERSION" ]; then
pyenv-version-file-write "$PYENV_VERSION_FILE" "$PYENV_VERSION" pyenv-version-file-write "$PYENV_VERSION_FILE" "${PYENV_VERSION[@]}"
else else
IFS=: PYENV_VERSION=($(
pyenv-version-file-read "$PYENV_VERSION_FILE" || pyenv-version-file-read "$PYENV_VERSION_FILE" ||
pyenv-version-file-read "${PYENV_ROOT}/global" || pyenv-version-file-read "${PYENV_ROOT}/global" ||
pyenv-version-file-read "${PYENV_ROOT}/default" || pyenv-version-file-read "${PYENV_ROOT}/default" ||
echo system echo system
))
for version in "${PYENV_VERSION[@]}"; do
echo "$version"
done
fi fi

View File

@@ -9,16 +9,21 @@ if [ "$1" = "--complete" ]; then
exec pyenv-versions --bare exec pyenv-versions --bare
fi fi
PYENV_VERSION="$1" PYENV_VERSION=($@)
PYENV_VERSION_FILE=".pyenv-version" PYENV_VERSION_FILE=".pyenv-version"
if [ "$PYENV_VERSION" = "--unset" ]; then if [ "$PYENV_VERSION" = "--unset" ]; then
rm -f "$PYENV_VERSION_FILE" rm -f "$PYENV_VERSION_FILE"
elif [ -n "$PYENV_VERSION" ]; then elif [ -n "$PYENV_VERSION" ]; then
pyenv-version-file-write "$PYENV_VERSION_FILE" "$PYENV_VERSION" pyenv-version-file-write "$PYENV_VERSION_FILE" "${PYENV_VERSION[@]}"
else else
IFS=: PYENV_VERSION=($(
pyenv-version-file-read "$PYENV_VERSION_FILE" || pyenv-version-file-read "$PYENV_VERSION_FILE" ||
{ echo "pyenv: no local version configured for this directory" { echo "pyenv: no local version configured for this directory"
exit 1 exit 1
} >&2 } >&2
))
for version in "${PYENV_VERSION[@]}"; do
echo "$version"
done
fi fi

View File

@@ -9,9 +9,9 @@ if [ "$1" = "--complete" ]; then
fi fi
if [ -n "$1" ]; then if [ -n "$1" ]; then
export PYENV_VERSION="$1" export PYENV_VERSION=($@)
elif [ -z "$PYENV_VERSION" ]; then else
PYENV_VERSION="$(pyenv-version-name)" IFS=: PYENV_VERSION=($(pyenv-version-name))
fi fi
if [ "$PYENV_VERSION" = "system" ]; then if [ "$PYENV_VERSION" = "system" ]; then
@@ -20,10 +20,15 @@ if [ "$PYENV_VERSION" = "system" ]; then
exit exit
fi fi
PYENV_PREFIX_PATH="${PYENV_ROOT}/versions/${PYENV_VERSION}" PYENV_PREFIX_PATHS=()
if [ ! -d "$PYENV_PREFIX_PATH" ]; then for version in "${PYENV_VERSION[@]}"; do
echo "pyenv: version \`${PYENV_VERSION}' not installed" >&2 PYENV_PREFIX_PATH="${PYENV_ROOT}/versions/${version}"
if [ -d "$PYENV_PREFIX_PATH" ]; then
PYENV_PREFIX_PATHS=("${PYENV_PREFIX_PATHS[@]}" "$PYENV_PREFIX_PATH")
else
echo "pyenv: version \`${version}' not installed" >&2
exit 1 exit 1
fi fi
done
echo "$PYENV_PREFIX_PATH" IFS=: echo "${PYENV_PREFIX_PATHS[*]}"

View File

@@ -27,6 +27,6 @@ if [ "$version" = "--unset" ]; then
fi fi
# Make sure the specified version is installed. # Make sure the specified version is installed.
pyenv-prefix "$version" >/dev/null pyenv-prefix $version >/dev/null
echo "export PYENV_VERSION=\"${version}\"" echo "export PYENV_VERSION=\"${version}\""

View File

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

View File

@@ -7,16 +7,20 @@ VERSION_FILE="$1"
if [ -e "$VERSION_FILE" ]; then if [ -e "$VERSION_FILE" ]; then
# Read and print the first non-whitespace word from the specified # Read and print the first non-whitespace word from the specified
# version file. # version file.
version="" versions=()
while read -a words; do while read -a words; do
word="${words[0]}" word="${words[0]}"
if [ -z "$version" ] && [ -n "$word" ]; then if [ -n "$word" ]; then
version="$word" length="${#versions[@]}"
versions=("${versions[@]}" "$word")
fi fi
done < <( cat "$VERSION_FILE" && echo ) done < <( cat "$VERSION_FILE" && echo )
if [ -n "$version" ]; then if [ -n "$versions" ]; then
echo "$version" {
IFS=:
echo "${versions[*]}"
}
exit exit
fi fi
fi fi

View File

@@ -3,15 +3,24 @@ set -e
[ -n "$PYENV_DEBUG" ] && set -x [ -n "$PYENV_DEBUG" ] && set -x
PYENV_VERSION_FILE="$1" PYENV_VERSION_FILE="$1"
PYENV_VERSION="$2" shift
PYENV_VERSION=()
for version in "$@"; do
PYENV_VERSION=("${PYENV_VERSION[@]}" "$version")
done
if [ -z "$PYENV_VERSION" ] || [ -z "$PYENV_VERSION_FILE" ]; then if [ -z "$PYENV_VERSION" ] || [ -z "$PYENV_VERSION_FILE" ]; then
echo "usage: pyenv write-version-file FILENAME VERSION" >&2 echo "usage: pyenv write-version-file FILENAME VERSIONS..." >&2
exit 1 exit 1
fi fi
# Make sure the specified version is installed. # Make sure the specified version is installed.
pyenv-prefix "$PYENV_VERSION" >/dev/null for version in "${PYENV_VERSION[@]}"; do
pyenv-prefix "$version" >/dev/null
done
# Write the version out to disk. # Write the version out to disk.
echo "$PYENV_VERSION" > "$PYENV_VERSION_FILE" rm -f "$PYENV_VERSION_FILE"
for version in "${PYENV_VERSION[@]}"; do
echo "$version" >> "$PYENV_VERSION_FILE"
done

View File

@@ -4,19 +4,21 @@ set -e
if [ -z "$PYENV_VERSION" ]; then if [ -z "$PYENV_VERSION" ]; then
PYENV_VERSION_FILE="$(pyenv-version-file)" PYENV_VERSION_FILE="$(pyenv-version-file)"
PYENV_VERSION="$(pyenv-version-file-read "$PYENV_VERSION_FILE" || true)" IFS=: PYENV_VERSION=($(pyenv-version-file-read "$PYENV_VERSION_FILE" || true))
fi fi
if [ -z "$PYENV_VERSION" ] || [ "$PYENV_VERSION" = "system" ]; then if [ -z "$PYENV_VERSION" ] || [ "$PYENV_VERSION" = "system" ] ; then
echo "system" echo "system"
exit exit
fi fi
PYENV_VERSION_PATH="${PYENV_ROOT}/versions/${PYENV_VERSION}" for version in "${PYENV_VERSION[@]}"; do
PYENV_VERSION_PATH="${PYENV_ROOT}/versions/${version}"
if [ -d "$PYENV_VERSION_PATH" ]; then if [ ! -d "$PYENV_VERSION_PATH" ]; then
echo "$PYENV_VERSION" echo "pyenv: version \`$version' is not installed" >&2
else
echo "pyenv: version \`$PYENV_VERSION' is not installed" >&2
exit 1 exit 1
fi fi
done
IFS=: echo "${PYENV_VERSION[*]}"

View File

@@ -2,23 +2,23 @@
set -e set -e
[ -n "$PYENV_DEBUG" ] && set -x [ -n "$PYENV_DEBUG" ] && set -x
PYENV_VERSION_NAME="$(pyenv-version-name)" IFS=: PYENV_VERSION_NAMES=($(pyenv-version-name))
if [ "$1" = "--bare" ]; then if [ "$1" = "--bare" ]; then
hit_prefix="" hit_prefix=""
miss_prefix="" miss_prefix=""
print_version="$PYENV_VERSION_NAME" print_version="$PYENV_VERSION_NAMES"
else else
hit_prefix="* " hit_prefix="* "
miss_prefix=" " miss_prefix=" "
print_version="$(pyenv-version)" print_version="$PYENV_VERSION_NAMES (set by $(pyenv-version-origin))"
fi fi
for path in "${PYENV_ROOT}/versions/"*; do for path in "${PYENV_ROOT}/versions/"*; do
if [ -d "$path" ]; then if [ -d "$path" ]; then
version="${path##*/}" version="${path##*/}"
if [ "$version" == "$PYENV_VERSION_NAME" ]; then if [ "$version" == "$PYENV_VERSION_NAMES" ]; then
echo "${hit_prefix}${print_version}" echo "${hit_prefix}${print_version}"
else else
echo "${miss_prefix}${version}" echo "${miss_prefix}${version}"

View File

@@ -40,7 +40,8 @@ remove_from_path() {
echo "${result%:}" echo "${result%:}"
} }
PYENV_VERSION="$(pyenv-version-name)" IFS=: versions=($(pyenv-version-name))
PYENV_VERSION=("${versions[@]}")
PYENV_COMMAND="$1" PYENV_COMMAND="$1"
if [ -z "$PYENV_COMMAND" ]; then if [ -z "$PYENV_COMMAND" ]; then
@@ -48,12 +49,17 @@ if [ -z "$PYENV_COMMAND" ]; then
exit 1 exit 1
fi fi
if [ "$PYENV_VERSION" = "system" ]; then for version in "${PYENV_VERSION[@]}"; do
PATH="$(remove_from_path "${PYENV_ROOT}/shims")" if [ "$version" = "system" ]; then
PATH="$(remote_from_path "${PYENV_ROOT}/shims")"
PYENV_COMMAND_PATH="$(command -v "$PYENV_COMMAND")" PYENV_COMMAND_PATH="$(command -v "$PYENV_COMMAND")"
else else
PYENV_COMMAND_PATH="${PYENV_ROOT}/versions/${PYENV_VERSION}/bin/${PYENV_COMMAND}" PYENV_COMMAND_PATH="${PYENV_ROOT}/versions/${version}/bin/${PYENV_COMMAND}"
fi if [ -x "$PYENV_COMMAND_PATH" ]; then
break
fi
fi
done
for script in $(pyenv-hooks which); do for script in $(pyenv-hooks which); do
source "$script" source "$script"
@@ -63,15 +69,5 @@ if [ -x "$PYENV_COMMAND_PATH" ]; then
echo "$PYENV_COMMAND_PATH" echo "$PYENV_COMMAND_PATH"
else else
echo "pyenv: $PYENV_COMMAND: command not found" >&2 echo "pyenv: $PYENV_COMMAND: command not found" >&2
versions="$(pyenv-whence "$PYENV_COMMAND" || true)"
if [ -n "$versions" ]; then
{ echo
echo "The \`$1' command exists in these Python versions:"
echo "$versions" | sed 's/^/ /g'
echo
} >&2
fi
exit 127 exit 127
fi fi

View File

@@ -284,19 +284,6 @@ require_gcc() {
echo "${esc}[1mDETAILS${esc}[0m: Apple no longer includes the official GCC compiler with Xcode" echo "${esc}[1mDETAILS${esc}[0m: Apple no longer includes the official GCC compiler with Xcode"
echo "as of version 4.2. Instead, the \`gcc\` executable is a symlink to" echo "as of version 4.2. Instead, the \`gcc\` executable is a symlink to"
echo "\`llvm-gcc\`, a modified version of GCC which outputs LLVM bytecode." echo "\`llvm-gcc\`, a modified version of GCC which outputs LLVM bytecode."
echo
echo "For most programs the \`llvm-gcc\` compiler works fine. However,"
echo "versions of Python older than 1.9.3-p125 are incompatible with"
echo "\`llvm-gcc\`. To build older versions of Python you must have the official"
echo "GCC compiler installed on your system."
echo
echo "${esc}[1mTO FIX THE PROBLEM${esc}[0m: Install the official GCC compiler using these"
echo "packages: ${esc}[4mhttps://github.com/kennethreitz/osx-gcc-installer/downloads${esc}[0m"
echo
echo "You will need to install the official GCC compiler to build older"
echo "versions of Python even if you have installed Apple's Command Line Tools"
echo "for Xcode package. The Command Line Tools for Xcode package only"
echo "includes \`llvm-gcc\`."
fi fi
} >&3 } >&3
return 1 return 1
@@ -346,10 +333,6 @@ verify_gcc() {
return 1 return 1
fi fi
if echo "$version" | grep LLVM >/dev/null; then
return 1
fi
echo "$gcc" echo "$gcc"
} }

View File

@@ -0,0 +1,14 @@
case "$OSTYPE" in
linux*)
case $(uname -m) in
x86_64)
export LDFLAGS="-L/usr/lib/x86_64-linux-gnu" # to fix build on Debian amd64
;;
esac
;;
esac
require_gcc
install_package "Python-2.5" "http://www.python.org/ftp/python/2.5/Python-2.5.tgz"
install_package "distribute-0.6.28" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz" python
install_package "pip-1.1" "http://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gz" python

View File

@@ -0,0 +1,14 @@
case "$OSTYPE" in
linux*)
case $(uname -m) in
x86_64)
export LDFLAGS="-L/usr/lib/x86_64-linux-gnu" # to fix build on Debian amd64
;;
esac
;;
esac
require_gcc
install_package "Python-2.5.1" "http://www.python.org/ftp/python/2.5.1/Python-2.5.1.tgz"
install_package "distribute-0.6.28" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz" python
install_package "pip-1.1" "http://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gz" python

View File

@@ -0,0 +1,14 @@
case "$OSTYPE" in
linux*)
case $(uname -m) in
x86_64)
export LDFLAGS="-L/usr/lib/x86_64-linux-gnu" # to fix build on Debian amd64
;;
esac
;;
esac
require_gcc
install_package "Python-2.5.2" "http://www.python.org/ftp/python/2.5.2/Python-2.5.2.tgz"
install_package "distribute-0.6.28" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz" python
install_package "pip-1.1" "http://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gz" python

View File

@@ -0,0 +1,14 @@
case "$OSTYPE" in
linux*)
case $(uname -m) in
x86_64)
export LDFLAGS="-L/usr/lib/x86_64-linux-gnu" # to fix build on Debian amd64
;;
esac
;;
esac
require_gcc
install_package "Python-2.5.3" "http://www.python.org/ftp/python/2.5.3/Python-2.5.3.tgz"
install_package "distribute-0.6.28" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz" python
install_package "pip-1.1" "http://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gz" python

View File

@@ -0,0 +1,14 @@
case "$OSTYPE" in
linux*)
case $(uname -m) in
x86_64)
export LDFLAGS="-L/usr/lib/x86_64-linux-gnu" # to fix build on Debian amd64
;;
esac
;;
esac
require_gcc
install_package "Python-2.5.4" "http://www.python.org/ftp/python/2.5.4/Python-2.5.4.tgz"
install_package "distribute-0.6.28" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz" python
install_package "pip-1.1" "http://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gz" python

View File

@@ -0,0 +1,14 @@
case "$OSTYPE" in
linux*)
case $(uname -m) in
x86_64)
export LDFLAGS="-L/usr/lib/x86_64-linux-gnu" # to fix build on Debian amd64
;;
esac
;;
esac
require_gcc
install_package "Python-2.5.5" "http://www.python.org/ftp/python/2.5.5/Python-2.5.5.tgz"
install_package "distribute-0.6.28" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz" python
install_package "pip-1.1" "http://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gz" python

View File

@@ -0,0 +1,14 @@
case "$OSTYPE" in
linux*)
case $(uname -m) in
x86_64)
export LDFLAGS="-L/usr/lib/x86_64-linux-gnu" # to fix build on Debian amd64
;;
esac
;;
esac
require_gcc
install_package "Python-2.5.6" "http://www.python.org/ftp/python/2.5.6/Python-2.5.6.tgz"
install_package "distribute-0.6.28" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz" python
install_package "pip-1.1" "http://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gz" python

View File

@@ -0,0 +1,14 @@
before_install_package() {
local package_name="$1"
case "$package_name" in
Python*)
fetch_url "https://raw.github.com/saghul/pythonz/346450868902fed0fe654c472b7b58e2e31fde70/pythonz/patches/all/common/patch-setup.py.diff" > setup.patch
patch -p0 < setup.patch
;;
esac
}
require_gcc
install_package "Python-2.6.6" "http://www.python.org/ftp/python/2.6.6/Python-2.6.6.tgz"
install_package "distribute-0.6.28" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz" python
install_package "pip-1.1" "http://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gz" python

View File

@@ -0,0 +1,14 @@
before_install_package() {
local package_name="$1"
case "$package_name" in
Python*)
fetch_url "https://raw.github.com/saghul/pythonz/346450868902fed0fe654c472b7b58e2e31fde70/pythonz/patches/all/common/patch-setup.py.diff" > setup.patch
patch -p0 < setup.patch
;;
esac
}
require_gcc
install_package "Python-2.6.7" "http://www.python.org/ftp/python/2.6.7/Python-2.6.7.tgz"
install_package "distribute-0.6.28" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz" python
install_package "pip-1.1" "http://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gz" python

View File

@@ -0,0 +1,14 @@
before_install_package() {
local package_name="$1"
case "$package_name" in
Python*)
fetch_url "https://raw.github.com/saghul/pythonz/346450868902fed0fe654c472b7b58e2e31fde70/pythonz/patches/all/common/patch-setup.py.diff" > setup.patch
patch -p0 < setup.patch
;;
esac
}
require_gcc
install_package "Python-2.7" "http://www.python.org/ftp/python/2.7/Python-2.7.tgz"
install_package "distribute-0.6.28" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz" python
install_package "pip-1.1" "http://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gz" python

View File

@@ -0,0 +1,14 @@
before_install_package() {
local package_name="$1"
case "$package_name" in
Python*)
fetch_url "https://raw.github.com/saghul/pythonz/346450868902fed0fe654c472b7b58e2e31fde70/pythonz/patches/all/common/patch-setup.py.diff" > setup.patch
patch -p0 < setup.patch
;;
esac
}
require_gcc
install_package "Python-2.7.1" "http://www.python.org/ftp/python/2.7.1/Python-2.7.1.tgz"
install_package "distribute-0.6.28" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz" python
install_package "pip-1.1" "http://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gz" python

View File

@@ -0,0 +1,4 @@
require_gcc
install_package "Python-2.7.2" "http://www.python.org/ftp/python/2.7.2/Python-2.7.2.tgz"
install_package "distribute-0.6.28" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz" python
install_package "pip-1.1" "http://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gz" python

View File

@@ -0,0 +1,14 @@
before_install_package() {
local package_name="$1"
case "$package_name" in
Python*)
fetch_url "https://raw.github.com/saghul/pythonz/346450868902fed0fe654c472b7b58e2e31fde70/pythonz/patches/all/common/patch-setup.py.diff" > setup.patch
patch -p0 < setup.patch
;;
esac
}
require_gcc
install_package "Python-3.1.3" "http://www.python.org/ftp/python/3.1.3/Python-3.1.3.tgz"
install_package "distribute-0.6.28" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz" python
install_package "pip-1.1" "http://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gz" python

View File

@@ -0,0 +1,4 @@
require_gcc
install_package "Python-3.1.4" "http://www.python.org/ftp/python/3.1.4/Python-3.1.4.tgz"
install_package "distribute-0.6.28" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz" python
install_package "pip-1.1" "http://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gz" python

View File

@@ -0,0 +1,14 @@
before_install_package() {
local package_name="$1"
case "$package_name" in
Python*)
fetch_url "https://raw.github.com/saghul/pythonz/346450868902fed0fe654c472b7b58e2e31fde70/pythonz/patches/all/python32/patch-setup.py.diff" > setup.patch
patch -p0 < setup.patch
;;
esac
}
require_gcc
install_package "Python-3.2" "http://www.python.org/ftp/python/3.2/Python-3.2.tgz"
install_package "distribute-0.6.28" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz" python
install_package "pip-1.1" "http://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gz" python

View File

@@ -0,0 +1,4 @@
require_gcc
install_package "Python-3.2.1" "http://www.python.org/ftp/python/3.2.1/Python-3.2.1.tgz"
install_package "distribute-0.6.28" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz" python
install_package "pip-1.1" "http://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gz" python

View File

@@ -0,0 +1,4 @@
require_gcc
install_package "Python-3.2.2" "http://www.python.org/ftp/python/3.2.2/Python-3.2.2.tgz"
install_package "distribute-0.6.28" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz" python
install_package "pip-1.1" "http://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gz" python

View File

@@ -0,0 +1,4 @@
require_gcc
install_package "Python-3.3.0rc1" "http://python.org/ftp/python/3.3.0/Python-3.3.0rc1.tgz"
install_package "distribute-0.6.28" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz" python
install_package "pip-1.1" "http://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gz" python

View File

@@ -0,0 +1,4 @@
require_java
install_jar "Jython-2.5.0" "https://downloads.sourceforge.net/project/jython/jython/2.5.0/jython_installer-2.5.0.jar" jython
install_package "distribute-0.6.28" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz" python
install_package "pip-1.1" "http://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gz" python

View File

@@ -0,0 +1,4 @@
require_java
install_jar "Jython-2.5.1" "https://downloads.sourceforge.net/project/jython/jython/2.5.1/jython_installer-2.5.1.jar" jython
install_package "distribute-0.6.28" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz" python
install_package "pip-1.1" "http://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gz" python

View File

@@ -0,0 +1,4 @@
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" jython
install_package "distribute-0.6.28" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz" python
install_package "pip-1.1" "http://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gz" python

View File

@@ -0,0 +1,24 @@
case "$OSTYPE" in
darwin*)
PYPY_URL="https://bitbucket.org/pypy/pypy/downloads/pypy-1.8-osx64.tar.bz2"
;;
linux*)
case $(uname -m) in
i386|i486|i586|i686)
PYPY_URL="https://bitbucket.org/pypy/pypy/downloads/pypy-1.8-linux.tar.bz2"
;;
x86_64)
PYPY_URL="https://bitbucket.org/pypy/pypy/downloads/pypy-1.8-linux64.tar.bz2"
;;
esac
;;
cygwin*|mingw*)
PYPY_URL="https://bitbucket.org/pypy/pypy/downloads/pypy-1.8-win32.zip"
;;
esac
if [ -n "$PYPY_URL" ]; then
install_package "pypy-1.8" "$PYPY_URL" pypy
install_package "distribute-0.6.28" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz" python
install_package "pip-1.1" "http://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gz" python
fi

View File

@@ -1,5 +1,3 @@
require_gcc
case "$OSTYPE" in case "$OSTYPE" in
darwin*) darwin*)
PYPY_URL="https://bitbucket.org/pypy/pypy/downloads/pypy-1.9-osx64.tar.bz2" PYPY_URL="https://bitbucket.org/pypy/pypy/downloads/pypy-1.9-osx64.tar.bz2"

View File

@@ -0,0 +1,4 @@
require_gcc
install_package "stackless-272-export" "http://www.stackless.com/binaries/stackless-272-export.tar.bz2"
install_package "distribute-0.6.28" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz" python
install_package "pip-1.1" "http://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gz" python