mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-08 11:33:49 -05:00
Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dbb1fb5a06 | ||
|
|
755c00e67c | ||
|
|
ad900ba436 | ||
|
|
ea7dc5f1e1 | ||
|
|
be53bb8951 | ||
|
|
167ff2a198 | ||
|
|
ee3c9bef5e | ||
|
|
6d307c6e11 | ||
|
|
a0705cb86e | ||
|
|
fca31c4307 | ||
|
|
684f7b7f21 | ||
|
|
da06998457 | ||
|
|
f466679bd1 | ||
|
|
4a217a0cd1 | ||
|
|
5b14236bac | ||
|
|
a16355fe33 | ||
|
|
c9575d7cb0 | ||
|
|
252003f18e | ||
|
|
7509b9fadf | ||
|
|
f878896a77 | ||
|
|
d09af20897 |
304
README.md
304
README.md
@@ -24,58 +24,120 @@ This project was forked from [rbenv](https://github.com/sstephenson/rbenv) and
|
||||
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`.
|
||||
* **Have a configuration file.** There's nothing to configure except
|
||||
which version of Python you want to use.
|
||||
* **Manage virtualenv.** Of course, you can create [virtualenv](http://pypi.python.org/pypi/virtualenv)
|
||||
yourself, or [python-virtualenv](https://github.com/yyuu/python-virtualenv)
|
||||
to automate the process.
|
||||
* **Prompt you with warnings when you switch to a project.** Instead
|
||||
of executing arbitrary code, pyenv reads just the version name
|
||||
from each project. There's nothing to "trust."
|
||||
|
||||
## Table of Contents
|
||||
|
||||
* [1 How It Works](#section_1)
|
||||
* [2 Installation](#section_2)
|
||||
* [2.1 Basic GitHub Checkout](#section_2.1)
|
||||
* [2.1.1 Upgrading](#section_2.1.1)
|
||||
* [2.2 Neckbeard Configuration](#section_2.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.1 Version History](#section_4.1)
|
||||
* [4.2 License](#section_4.2)
|
||||
* [How It Works](#how-it-works)
|
||||
* [Understanding PATH](#understanding-path)
|
||||
* [Understanding Shims](#understanding-shims)
|
||||
* [Choosing the Python Version](#choosing-the-python-version)
|
||||
* [Locating the Python Installation](#locating-the-python-installation)
|
||||
* [Installation](#installation)
|
||||
* [Basic GitHub Checkout](#basic-github-checkout)
|
||||
* [Upgrading](#upgrading)
|
||||
* [Neckbeard Configuration](#neckbeard-configuration)
|
||||
* [Uninstalling Python Versions](#uninstalling-python-versions)
|
||||
* [Command Reference](#command-reference)
|
||||
* [pyenv local](#pyenv-local)
|
||||
* [pyenv global](#pyenv-global)
|
||||
* [pyenv shell](#pyenv-shell)
|
||||
* [pyenv versions](#pyenv-versions)
|
||||
* [pyenv version](#pyenv-version)
|
||||
* [pyenv rehash](#pyenv-rehash)
|
||||
* [pyenv which](#pyenv-which)
|
||||
* [pyenv whence](#pyenv-whence)
|
||||
* [Development](#development)
|
||||
* [Version History](#version-history)
|
||||
* [License](#license)
|
||||
|
||||
## <a name="section_1"></a> 1 How It Works
|
||||
## How It Works
|
||||
|
||||
pyenv operates on the per-user directory `~/.pyenv`. Version names in
|
||||
pyenv correspond to subdirectories of `~/.pyenv/versions`. For
|
||||
example, you might have `~/.pyenv/versions/2.7.3` and
|
||||
`~/.pyenv/versions/2.7.3`.
|
||||
At a high level, pyenv intercepts Python commands using shim
|
||||
executables injected into your `PATH`, determines which Python version
|
||||
has been specified by your application, and passes your commands along
|
||||
to the correct Python installation.
|
||||
|
||||
Each version is a working tree with its own binaries, like
|
||||
`~/.pyenv/versions/2.7.3/bin/python2.7` and
|
||||
`~/.pyenv/versions/3.2.3/bin/python3.2`. pyenv makes _shim binaries_
|
||||
for every such binary across all installed versions of Python.
|
||||
### Understanding PATH
|
||||
|
||||
These shims are simple wrapper scripts that live in `~/.pyenv/shims`
|
||||
and detect which Python version you want to use. They insert the
|
||||
directory for the selected version at the beginning of your `$PATH`
|
||||
and then execute the corresponding binary.
|
||||
When you run a command like `python` or `pip`, your operating system
|
||||
searches through a list of directories to find an executable file with
|
||||
that name. This list of directories lives in an environment variable
|
||||
called `PATH`, with each directory in the list separated by a colon:
|
||||
|
||||
Because of the simplicity of the shim approach, all you need to use
|
||||
pyenv is `~/.pyenv/shims` in your `$PATH`.
|
||||
/usr/local/bin:/usr/bin:/bin
|
||||
|
||||
## <a name="section_2"></a> 2 Installation
|
||||
Directories in `PATH` are searched from left to right, so a matching
|
||||
executable in a directory at the beginning of the list takes
|
||||
precedence over another one at the end. In this example, the
|
||||
`/usr/local/bin` directory will be searched first, then `/usr/bin`,
|
||||
then `/bin`.
|
||||
|
||||
### <a name="section_2.1"></a> 2.1 Basic GitHub Checkout
|
||||
### Understanding Shims
|
||||
|
||||
pyenv works by inserting a directory of _shims_ at the front of your
|
||||
`PATH`:
|
||||
|
||||
~/.pyenv/shims:/usr/local/bin:/usr/bin:/bin
|
||||
|
||||
Through a process called _rehashing_, pyenv maintains shims in that
|
||||
directory to match every Python command across every installed version
|
||||
of Python—`python`, `pip`, and so on.
|
||||
|
||||
Shims are lightweight executables that simply pass your command along
|
||||
to pyenv. So with pyenv installed, when you run, say, `pip`, your
|
||||
operating system will do the following:
|
||||
|
||||
* Search your `PATH` for an executable file named `pip`
|
||||
* Find the pyenv shim named `pip` at the beginning of your `PATH`
|
||||
* Run the shim named `pip`, which in turn passes the command along to
|
||||
pyenv
|
||||
|
||||
### Choosing the Python Version
|
||||
|
||||
When you execute a shim, pyenv determines which Python version to use by
|
||||
reading it from the following sources, in this order:
|
||||
|
||||
1. The `PYENV_VERSION` environment variable, if specified. You can use
|
||||
the [`pyenv shell`](#pyenv-shell) command to set this environment
|
||||
variable in your current shell session.
|
||||
|
||||
2. The application-specific `.python-version` file in the current
|
||||
directory, if present. You can modify the current directory's
|
||||
`.python-version` file with the [`pyenv local`](#pyenv-local)
|
||||
command.
|
||||
|
||||
3. The first `.python-version` file found by searching each parent
|
||||
directory until reaching the root of your filesystem, if any.
|
||||
|
||||
4. The global `~/.pyenv/version` file. You can modify this file using
|
||||
the [`pyenv global`](#pyenv-global) command. If the global version
|
||||
file is not present, pyenv assumes you want to use the "system"
|
||||
Python—i.e. whatever version would be run if pyenv weren't in your
|
||||
path.
|
||||
|
||||
### Locating the Python Installation
|
||||
|
||||
Once pyenv has determined which version of Python your application has
|
||||
specified, it passes the command along to the corresponding Python
|
||||
installation.
|
||||
|
||||
Each Python version is installed into its own directory under
|
||||
`~/.pyenv/versions`. For example, you might have these versions
|
||||
installed:
|
||||
|
||||
* `~/.pyenv/versions/2.7.3/`
|
||||
* `~/.pyenv/versions/3.3.0/`
|
||||
* `~/.pyenv/versions/pypy-1.9/`
|
||||
|
||||
Version names to pyenv are simply the names of the directories in
|
||||
`~/.pyenv/versions`.
|
||||
|
||||
## Installation
|
||||
|
||||
### Basic GitHub Checkout
|
||||
|
||||
This will get you going with the latest version of pyenv and make it
|
||||
easy to fork and contribute any changes back upstream.
|
||||
@@ -110,11 +172,11 @@ easy to fork and contribute any changes back upstream.
|
||||
|
||||
6. Rebuild the shim binaries. You should do this any time you install
|
||||
a new Python binary (for example, when installing a new Python version,
|
||||
or when installing a gem that provides a binary).
|
||||
or when installing a package that provides a binary).
|
||||
|
||||
$ pyenv rehash
|
||||
|
||||
#### <a name="section_2.1.1"></a> 2.1.1 Upgrading
|
||||
#### Upgrading
|
||||
|
||||
If you've installed pyenv using the instructions above, you can
|
||||
upgrade your installation at any time using git.
|
||||
@@ -133,7 +195,7 @@ tag:
|
||||
v0.1.0
|
||||
$ git checkout v0.1.0
|
||||
|
||||
### <a name="section_2.2"></a> 2.2 Neckbeard Configuration
|
||||
### Neckbeard Configuration
|
||||
|
||||
Skip this section unless you must know what every line in your shell
|
||||
profile is doing.
|
||||
@@ -165,60 +227,30 @@ opposed to this idea. Here's what `pyenv init` actually does:
|
||||
Run `pyenv init -` for yourself to see exactly what happens under the
|
||||
hood.
|
||||
|
||||
## <a name="section_3"></a> 3 Usage
|
||||
### Uninstalling Python Versions
|
||||
|
||||
As time goes on, Python versions you install will accumulate in your
|
||||
`~/.pyenv/versions` directory.
|
||||
|
||||
To remove old Python versions, `pyenv uninstall` command to automate
|
||||
the removal process.
|
||||
|
||||
Or, simply `rm -rf` the directory of the
|
||||
version you want to remove. You can find the directory of a particular
|
||||
Python version with the `pyenv prefix` command, e.g. `pyenv prefix
|
||||
2.6.8`.
|
||||
|
||||
## Command Reference
|
||||
|
||||
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
|
||||
### pyenv local
|
||||
|
||||
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.
|
||||
|
||||
And also, you can specify multiple versions as global Python. Commands
|
||||
within these Python versions are searched by specified order.
|
||||
|
||||
$ pyenv global 2.7.3 3.2.3
|
||||
$ pyenv global
|
||||
2.7.3
|
||||
3.2.3
|
||||
$ pyenv which python2.7
|
||||
/home/yyuu/.pyenv/versions/2.7.3/bin/python2.7
|
||||
$ pyenv which python3.2
|
||||
/home/yyuu/.pyenv/versions/3.2.3/bin/python3.2
|
||||
$ pyenv which python
|
||||
/home/yyuu/.pyenv/versions/2.7.3/bin/python
|
||||
|
||||
You can manage your version stack by `pyenv push` and `pyenv pop`.
|
||||
|
||||
$ pyenv global
|
||||
2.7.3
|
||||
3.2.3
|
||||
$ pyenv push 3.3.0
|
||||
$ pyenv global
|
||||
2.7.3
|
||||
3.2.3
|
||||
3.3.0
|
||||
$ pyenv pop
|
||||
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`
|
||||
Sets a local application-specific Python version by writing the version
|
||||
name to a `.python-version` file in the current directory. This version
|
||||
overrides the global version, and can be overridden itself by setting
|
||||
the `PYENV_VERSION` environment variable or with the `pyenv shell`
|
||||
command.
|
||||
|
||||
$ pyenv local 2.7.3
|
||||
@@ -228,7 +260,14 @@ configured local version. You can also unset the local version:
|
||||
|
||||
$ pyenv local --unset
|
||||
|
||||
And also, you can specify multiple versions as local Python. Commands
|
||||
Previous versions of pyenv stored local version specifications in a
|
||||
file named `.pyenv-version`. For backwards compatibility, pyenv will
|
||||
read a local version specified in an `.pyenv-version` file, but a
|
||||
`.python-version` file in the same directory will take precedence.
|
||||
|
||||
**pyenv feature**
|
||||
|
||||
You can specify multiple versions as local Python. Commands
|
||||
within these Python versions are searched by specified order.
|
||||
|
||||
$ pyenv local 2.7.3 3.2.3
|
||||
@@ -256,11 +295,56 @@ You can manage your version stack by `pyenv push` and `pyenv pop`.
|
||||
2.7.3
|
||||
3.2.3
|
||||
|
||||
### <a name="section_3.3"></a> 3.3 pyenv shell
|
||||
### 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 an application-specific `.python-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 feature**
|
||||
|
||||
You can specify multiple versions as global Python. Commands
|
||||
within these Python versions are searched by specified order.
|
||||
|
||||
$ pyenv global 2.7.3 3.2.3
|
||||
$ pyenv global
|
||||
2.7.3
|
||||
3.2.3
|
||||
$ pyenv which python2.7
|
||||
/home/yyuu/.pyenv/versions/2.7.3/bin/python2.7
|
||||
$ pyenv which python3.2
|
||||
/home/yyuu/.pyenv/versions/3.2.3/bin/python3.2
|
||||
$ pyenv which python
|
||||
/home/yyuu/.pyenv/versions/2.7.3/bin/python
|
||||
|
||||
You can manage your version stack by `pyenv push` and `pyenv pop`.
|
||||
|
||||
$ pyenv global
|
||||
2.7.3
|
||||
3.2.3
|
||||
$ pyenv push 3.3.0
|
||||
$ pyenv global
|
||||
2.7.3
|
||||
3.2.3
|
||||
3.3.0
|
||||
$ pyenv pop
|
||||
2.7.3
|
||||
3.2.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.
|
||||
environment variable in your shell. This version overrides
|
||||
application-specific versions and the global version.
|
||||
|
||||
$ pyenv shell pypy-1.9
|
||||
|
||||
@@ -276,7 +360,9 @@ prefer not to use shell integration, you may simply set the
|
||||
|
||||
$ export PYENV_VERSION=pypy-1.9
|
||||
|
||||
And also, you can specify multiple versions via `PYENV_VERSION`
|
||||
**pyenv feature**
|
||||
|
||||
You can specify multiple versions via `PYENV_VERSION`
|
||||
environment variable in your shell.
|
||||
|
||||
$ pyenv shell pypy-1.9 2.7.3
|
||||
@@ -286,7 +372,7 @@ environment variable in your shell.
|
||||
pypy-1.9 (set by PYENV_VERSION environment variable)
|
||||
2.7.3 (set by PYENV_VERSION environment variable)
|
||||
|
||||
### <a name="section_3.4"></a> 3.4 pyenv versions
|
||||
### pyenv versions
|
||||
|
||||
Lists all Python versions known to pyenv, and shows an asterisk next to
|
||||
the currently active version.
|
||||
@@ -299,7 +385,7 @@ the currently active version.
|
||||
jython-2.5.3
|
||||
pypy-1.9
|
||||
|
||||
### <a name="section_3.5"></a> 3.5 pyenv version
|
||||
### pyenv version
|
||||
|
||||
Displays the currently active Python version, along with information on
|
||||
how it was set.
|
||||
@@ -307,23 +393,23 @@ 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
|
||||
### 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.
|
||||
version of Python, or install a package that provides binaries.
|
||||
|
||||
$ pyenv rehash
|
||||
|
||||
### <a name="section_3.7"></a> 3.7 pyenv which
|
||||
### pyenv which
|
||||
|
||||
Displays the full path to the binary that pyenv will execute when you
|
||||
run the given command.
|
||||
Displays the full path to the executable that pyenv will invoke when
|
||||
you run the given command.
|
||||
|
||||
$ pyenv which python3.2
|
||||
/home/yyuu/.pyenv/versions/3.2.3/bin/python3.2
|
||||
|
||||
### <a name="section_3.8"></a> 3.8 pyenv whence
|
||||
### pyenv whence
|
||||
|
||||
Lists all Python versions with the given command installed.
|
||||
|
||||
@@ -332,7 +418,7 @@ Lists all Python versions with the given command installed.
|
||||
2.7.3
|
||||
3.2.3
|
||||
|
||||
## <a name="section_4"></a> 4 Development
|
||||
## Development
|
||||
|
||||
The pyenv source code is [hosted on
|
||||
GitHub](https://github.com/yyuu/pyenv). It's clean, modular,
|
||||
@@ -341,7 +427,11 @@ and easy to understand, even if you're not a shell hacker.
|
||||
Please feel free to submit pull requests and file bugs on the [issue
|
||||
tracker](https://github.com/yyuu/pyenv/issues).
|
||||
|
||||
### <a name="section_4.1"></a> 4.1 Version History
|
||||
### Version History
|
||||
|
||||
**0.2.0** (February 18, 2013)
|
||||
|
||||
* Import changes from rbenv 0.4.0.
|
||||
|
||||
**0.1.2** (October 23, 2012)
|
||||
|
||||
@@ -357,7 +447,7 @@ tracker](https://github.com/yyuu/pyenv/issues).
|
||||
|
||||
* Initial public release.
|
||||
|
||||
### <a name="section_4.2"></a> 4.2 License
|
||||
### License
|
||||
|
||||
(The MIT license)
|
||||
|
||||
|
||||
@@ -13,4 +13,11 @@
|
||||
|
||||
set -e
|
||||
export PYENV_DIR="${1%/*}"
|
||||
|
||||
[ -n "$PYENV_SILENCE_WARNINGS" ] || {
|
||||
echo "pyenv: \`python-local-exec' is deprecated and will be removed in the next release."
|
||||
echo " To upgrade: https://github.com/yyuu/pyenv/wiki/python-local-exec"
|
||||
echo
|
||||
} >&2
|
||||
|
||||
exec python "$@"
|
||||
|
||||
@@ -5,8 +5,10 @@ _pyenv() {
|
||||
if [ "$COMP_CWORD" -eq 1 ]; then
|
||||
COMPREPLY=( $(compgen -W "$(pyenv commands)" -- "$word") )
|
||||
else
|
||||
local command="${COMP_WORDS[1]}"
|
||||
local completions="$(pyenv completions "$command")"
|
||||
local words=("${COMP_WORDS[@]}")
|
||||
unset words[0]
|
||||
unset words[$COMP_CWORD]
|
||||
local completions=$(pyenv completions "${words[@]}")
|
||||
COMPREPLY=( $(compgen -W "$completions" -- "$word") )
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -5,14 +5,13 @@ fi
|
||||
compctl -K _pyenv pyenv
|
||||
|
||||
_pyenv() {
|
||||
local word words completions
|
||||
local words completions
|
||||
read -cA words
|
||||
word="${words[2]}"
|
||||
|
||||
if [ "${#words}" -eq 2 ]; then
|
||||
completions="$(pyenv commands)"
|
||||
else
|
||||
completions="$(pyenv completions "${word}")"
|
||||
completions="$(pyenv completions "${words[2,-1]}")"
|
||||
fi
|
||||
|
||||
reply=("${(ps:\n:)completions}")
|
||||
|
||||
@@ -60,7 +60,10 @@ shopt -u nullglob
|
||||
command="$1"
|
||||
case "$command" in
|
||||
"" | "-h" | "--help" )
|
||||
echo -e "pyenv 0.1.2\n$(pyenv-help)" >&2
|
||||
echo -e "$(pyenv---version)\n$(pyenv-help)" >&2
|
||||
;;
|
||||
"-v" )
|
||||
exec pyenv---version
|
||||
;;
|
||||
* )
|
||||
command_path="$(command -v "pyenv-$command" || true)"
|
||||
|
||||
21
libexec/pyenv---version
Executable file
21
libexec/pyenv---version
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
# Summary: Display the version of pyenv
|
||||
#
|
||||
# Displays the version number of this pyenv release, including the
|
||||
# current revision from git, if available.
|
||||
#
|
||||
# The format of the git revision is:
|
||||
# <version>-<num_commits>-<git_sha>
|
||||
# where `num_commits` is the number of commits since `version` was
|
||||
# tagged.
|
||||
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
version="0.2.0"
|
||||
|
||||
cd "$PYENV_ROOT"
|
||||
git_revision="$(git describe --tags HEAD 2>/dev/null || true)"
|
||||
git_revision="${git_revision#v}"
|
||||
|
||||
echo "pyenv ${git_revision:-$version}"
|
||||
@@ -1,4 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# Summary: List all available pyenv commands
|
||||
# Usage: pyenv commands [--sh|--no-sh]
|
||||
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
# Usage: pyenv completions <command> [arg1 arg2...]
|
||||
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
COMMAND="$1"
|
||||
if [ -z "$COMMAND" ]; then
|
||||
echo "usage: pyenv completions COMMAND [arg1 arg2...]" >&2
|
||||
pyenv-help --usage completions >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,4 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Summary: Run an executable with the selected Python version
|
||||
#
|
||||
# Usage: pyenv exec <command> [arg1 arg2...]
|
||||
#
|
||||
# Runs an executable by first preparing PATH so that the selected Python
|
||||
# version's `bin' directory is at the front.
|
||||
#
|
||||
# For example, if the currently selected Python version is 2.7.7:
|
||||
# pyenv exec pip install -rrequirements.txt
|
||||
#
|
||||
# is equivalent to:
|
||||
# PATH="$PYENV_ROOT/versions/2.7.7/bin:$PATH" pip install -rrequirements.txt
|
||||
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
@@ -7,9 +21,11 @@ if [ "$1" = "--complete" ]; then
|
||||
exec pyenv shims --short
|
||||
fi
|
||||
|
||||
export PYENV_VERSION="$(pyenv-version-name)"
|
||||
PYENV_COMMAND="$1"
|
||||
|
||||
if [ -z "$PYENV_COMMAND" ]; then
|
||||
echo "usage: pyenv exec COMMAND [arg1 arg2...]" >&2
|
||||
pyenv-help --usage exec >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -21,5 +37,7 @@ for script in $(pyenv-hooks exec); do
|
||||
done
|
||||
|
||||
shift 1
|
||||
export PATH="${PYENV_BIN_PATH}:${PATH}"
|
||||
if [ "$PYENV_VERSION" != "system" ]; then
|
||||
export PATH="${PYENV_BIN_PATH}:${PATH}"
|
||||
fi
|
||||
exec -a "$PYENV_COMMAND" "$PYENV_COMMAND_PATH" "$@"
|
||||
|
||||
@@ -1,4 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Summary: Set or show the global Python version
|
||||
#
|
||||
# Usage: pyenv global <version>
|
||||
#
|
||||
# Sets the global Python version. You can override the global version at
|
||||
# any time by setting a directory-specific version with `pyenv local'
|
||||
# or by setting the `PYENV_VERSION' environment variable.
|
||||
#
|
||||
# <version> should be a string matching a Python version known to pyenv.
|
||||
# The special version string `system' will use your default system Python.
|
||||
# Run `pyenv versions' for a list of available Python versions.
|
||||
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
|
||||
@@ -1,99 +1,162 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Summary: Display help for a command
|
||||
#
|
||||
# Usage: pyenv help [--usage] COMMAND
|
||||
#
|
||||
# Parses and displays help contents from a command's source file.
|
||||
#
|
||||
# A command is considered documented if it starts with a comment block
|
||||
# that has a `Summary:' or `Usage:' section. Usage instructions can
|
||||
# span multiple lines as long as subsequent lines are indented.
|
||||
# The remainder of the comment block is displayed as extended
|
||||
# documentation.
|
||||
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
print_set_version() {
|
||||
echo "<version> should be a string matching a Python version known by pyenv."
|
||||
|
||||
local versions="$(pyenv-versions --bare)"
|
||||
if [ -z "$versions" ]; then
|
||||
echo "There are currently no Python versions installed for pyenv."
|
||||
else
|
||||
echo "The currently installed Python versions are:"
|
||||
echo "$versions" | sed 's/^/ /'
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "The special version string 'system' will use your default system Python"
|
||||
command_path() {
|
||||
local command="$1"
|
||||
command -v pyenv-"$command" || command -v pyenv-sh-"$command" || true
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
"") echo "usage: pyenv <command> [<args>]
|
||||
extract_initial_comment_block() {
|
||||
sed -ne "
|
||||
/^#/ !{
|
||||
q
|
||||
}
|
||||
|
||||
Some useful pyenv commands are:
|
||||
commands List all pyenv commands
|
||||
rehash Rehash pyenv shims (run this after installing binaries)
|
||||
global Set or show the global Python version
|
||||
local Set or show the local directory-specific Python version
|
||||
shell Set or show the shell-specific Python version
|
||||
version Show the current Python version
|
||||
versions List all Python versions known by pyenv
|
||||
which Show the full path for the given Python command
|
||||
whence List all Python versions with the given command
|
||||
s/^#$/# /
|
||||
|
||||
See 'pyenv help <command>' for information on a specific command.
|
||||
For full documentation, see: https://github.com/sstephenson/pyenv#readme"
|
||||
;;
|
||||
commands) echo "usage: pyenv commands
|
||||
pyenv commands --sh
|
||||
pyenv commands --no-sh
|
||||
/^# / {
|
||||
s/^# //
|
||||
p
|
||||
}
|
||||
"
|
||||
}
|
||||
|
||||
List all pyenv commands."
|
||||
;;
|
||||
global) echo "usage: pyenv global <version>
|
||||
collect_documentation() {
|
||||
awk '
|
||||
/^Summary:/ {
|
||||
summary = substr($0, 10)
|
||||
next
|
||||
}
|
||||
|
||||
Sets the global Python version. You can override the global version at
|
||||
any time by setting a directory-specific version with \`pyenv local'
|
||||
or by setting the PYENV_VERSION environment variable.
|
||||
/^Usage:/ {
|
||||
reading_usage = 1
|
||||
usage = usage "\n" $0
|
||||
next
|
||||
}
|
||||
|
||||
$(print_set_version)"
|
||||
;;
|
||||
local) echo "usage: pyenv local <version>
|
||||
pyenv local --unset
|
||||
/^( *$| )/ && reading_usage {
|
||||
usage = usage "\n" $0
|
||||
next
|
||||
}
|
||||
|
||||
Sets the local directory-specific Python version by writing the version
|
||||
name to a file named '.pyenv-version'.
|
||||
{
|
||||
reading_usage = 0
|
||||
help = help "\n" $0
|
||||
}
|
||||
|
||||
When you run a Python command, pyenv will look for an '.pyenv-version'
|
||||
file in the current directory and each parent directory. If no such
|
||||
file is found in the tree, pyenv will use the global Python version
|
||||
specified with \`pyenv global', or the version specified in the
|
||||
PYENV_VERSION environment variable.
|
||||
function escape(str) {
|
||||
gsub(/[`\\$"]/, "\\\\&", str)
|
||||
return str
|
||||
}
|
||||
|
||||
$(print_set_version)"
|
||||
;;
|
||||
shell) echo "usage: pyenv shell <version>
|
||||
pyenv shell --unset
|
||||
function trim(str) {
|
||||
gsub(/^\n*/, "", str)
|
||||
gsub(/\n*$/, "", str)
|
||||
return str
|
||||
}
|
||||
|
||||
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.
|
||||
END {
|
||||
if (usage || summary) {
|
||||
print "summary=\"" escape(summary) "\""
|
||||
print "usage=\"" escape(trim(usage)) "\""
|
||||
print "help=\"" escape(trim(help)) "\""
|
||||
}
|
||||
}
|
||||
'
|
||||
}
|
||||
|
||||
$(print_set_version)"
|
||||
;;
|
||||
versions) echo "usage: pyenv versions
|
||||
pyenv versions --bare
|
||||
|
||||
Lists all Python versions known by pyenv."
|
||||
;;
|
||||
which) echo "usage: pyenv which <command>
|
||||
|
||||
Displays the full path to the binary that pyenv will execute when you
|
||||
run the given command."
|
||||
;;
|
||||
whence) echo "usage: pyenv whence <command>
|
||||
|
||||
Lists all Python versions with the given command installed."
|
||||
;;
|
||||
*)
|
||||
command_path="$(command -v "pyenv-$1" || true)"
|
||||
if [ -n "$command_path" ]; then
|
||||
echo "Sorry, the \`$1' command isn't documented yet."
|
||||
echo
|
||||
echo "You can view the command's source here:"
|
||||
echo "$command_path"
|
||||
echo
|
||||
else
|
||||
echo "pyenv: no such command \`$1'"
|
||||
documentation_for() {
|
||||
local filename="$(command_path "$1")"
|
||||
if [ -n "$filename" ]; then
|
||||
extract_initial_comment_block < "$filename" | collect_documentation
|
||||
fi
|
||||
esac
|
||||
}
|
||||
|
||||
print_summary() {
|
||||
local command="$1"
|
||||
local summary usage help
|
||||
eval "$(documentation_for "$command")"
|
||||
|
||||
if [ -n "$summary" ]; then
|
||||
printf " %-9s %s\n" "$command" "$summary"
|
||||
fi
|
||||
}
|
||||
|
||||
print_summaries() {
|
||||
for command; do
|
||||
print_summary "$command"
|
||||
done
|
||||
}
|
||||
|
||||
print_help() {
|
||||
local command="$1"
|
||||
local summary usage help
|
||||
eval "$(documentation_for "$command")"
|
||||
[ -n "$help" ] || help="$summary"
|
||||
|
||||
if [ -n "$usage" -o -n "$summary" ]; then
|
||||
if [ -n "$usage" ]; then
|
||||
echo "$usage"
|
||||
else
|
||||
echo "Usage: pyenv ${command}"
|
||||
fi
|
||||
if [ -n "$help" ]; then
|
||||
echo
|
||||
echo "$help"
|
||||
echo
|
||||
fi
|
||||
else
|
||||
echo "Sorry, this command isn't documented yet." >&2
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
print_usage() {
|
||||
local command="$1"
|
||||
local summary usage help
|
||||
eval "$(documentation_for "$command")"
|
||||
[ -z "$usage" ] || echo "$usage"
|
||||
}
|
||||
|
||||
unset usage
|
||||
if [ "$1" = "--usage" ]; then
|
||||
usage="1"
|
||||
shift
|
||||
fi
|
||||
|
||||
if [ -z "$1" ] || [ "$1" == "pyenv" ]; then
|
||||
echo "Usage: pyenv <command> [<args>]"
|
||||
[ -z "$usage" ] || exit
|
||||
echo
|
||||
echo "Some useful pyenv commands are:"
|
||||
print_summaries commands local global shell install uninstall rehash version versions which whence
|
||||
echo
|
||||
echo "See \`pyenv help <command>' for information on a specific command."
|
||||
echo "For full documentation, see: https://github.com/yyuu/pyenv#readme"
|
||||
else
|
||||
command="$1"
|
||||
if [ -n "$(command_path "$command")" ]; then
|
||||
if [ -n "$usage" ]; then
|
||||
print_usage "$command"
|
||||
else
|
||||
print_help "$command"
|
||||
fi
|
||||
else
|
||||
echo "pyenv: no such command \`$command'" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# Summary: List hook scripts for a given pyenv command
|
||||
# Usage: pyenv hooks <command>
|
||||
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
@@ -12,7 +15,7 @@ fi
|
||||
|
||||
PYENV_COMMAND="$1"
|
||||
if [ -z "$PYENV_COMMAND" ]; then
|
||||
echo "usage: pyenv hooks COMMAND" >&2
|
||||
pyenv-help --usage hooks >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# Summary: Configure the shell environment for pyenv
|
||||
# Usage: eval "$(pyenv init - [--no-rehash] [<shell>])"
|
||||
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
@@ -82,11 +85,12 @@ if [ -z "$no_rehash" ]; then
|
||||
echo 'pyenv rehash 2>/dev/null'
|
||||
fi
|
||||
|
||||
commands=(`pyenv commands --sh`)
|
||||
commands=(`pyenv-commands --sh`)
|
||||
IFS="|"
|
||||
cat <<EOS
|
||||
pyenv() {
|
||||
local command="\$1"
|
||||
typeset command
|
||||
command="\$1"
|
||||
if [ "\$#" -gt 0 ]; then
|
||||
shift
|
||||
fi
|
||||
|
||||
@@ -1,4 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Summary: Set or show the local application-specific Python version
|
||||
#
|
||||
# Usage: pyenv local <version>
|
||||
# pyenv local --unset
|
||||
#
|
||||
# Sets the local application-specific Python version by writing the
|
||||
# version name to a file named `.python-version'.
|
||||
#
|
||||
# When you run a Python command, pyenv will look for a `.python-version'
|
||||
# file in the current directory and each parent directory. If no such
|
||||
# file is found in the tree, pyenv will use the global Python version
|
||||
# specified with `pyenv global'. A version specified with the
|
||||
# `PYENV_VERSION' environment variable takes precedence over local
|
||||
# and global versions.
|
||||
#
|
||||
# For backwards compatibility, pyenv will also read version
|
||||
# specifications from `.pyenv-version' files, but a `.python-version'
|
||||
# file in the same directory takes precedence.
|
||||
#
|
||||
# <version> should be a string matching a Python version known to pyenv.
|
||||
# The special version string `system' will use your default system Python.
|
||||
# Run `pyenv versions' for a list of available Python versions.
|
||||
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
@@ -10,15 +34,21 @@ if [ "$1" = "--complete" ]; then
|
||||
fi
|
||||
|
||||
versions=($@)
|
||||
PYENV_VERSION_FILE=".pyenv-version"
|
||||
|
||||
if [ "$versions" = "--unset" ]; then
|
||||
rm -f "$PYENV_VERSION_FILE"
|
||||
rm -f .python-version .pyenv-version
|
||||
elif [ -n "$versions" ]; then
|
||||
pyenv-version-file-write "$PYENV_VERSION_FILE" "${versions[@]}"
|
||||
if [ "$(PYENV_VERSION= pyenv-version-origin)" -ef .pyenv-version ]; then
|
||||
rm -f .pyenv-version
|
||||
{ echo "pyenv: removed existing \`.pyenv-version' file and migrated"
|
||||
echo " local version specification to \`.python-version' file"
|
||||
} >&2
|
||||
fi
|
||||
pyenv-version-file-write .python-version "${versions[@]}"
|
||||
else
|
||||
IFS=: versions=($(
|
||||
pyenv-version-file-read "$PYENV_VERSION_FILE" ||
|
||||
pyenv-version-file-read .python-version ||
|
||||
pyenv-version-file-read .pyenv-version ||
|
||||
{ echo "pyenv: no local version configured for this directory"
|
||||
exit 1
|
||||
} >&2
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
# Summary: Display prefix for a Python version
|
||||
# Usage: pyenv prefix [<version>]
|
||||
#
|
||||
# Displays the directory where a Python version is installed. If no
|
||||
# version is given, `pyenv prefix' displays the location of the
|
||||
# currently selected version.
|
||||
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
@@ -16,15 +23,14 @@ else
|
||||
IFS=: versions=($(pyenv-version-name))
|
||||
fi
|
||||
|
||||
if [ "$versions" = "system" ]; then
|
||||
PYTHON_PATH="$(pyenv-which python)"
|
||||
echo "${PYTHON_PATH%/*}"
|
||||
exit
|
||||
fi
|
||||
|
||||
PYENV_PREFIX_PATHS=()
|
||||
for version in "${versions[@]}"; do
|
||||
PYENV_PREFIX_PATH="${PYENV_ROOT}/versions/${version}"
|
||||
if [ "$version" = "system" ]; then
|
||||
PYTHON_PATH="$(pyenv-which python || true)"
|
||||
PYENV_PREFIX_PATH="${PYTHON_PATH%/*}"
|
||||
else
|
||||
PYENV_PREFIX_PATH="${PYENV_ROOT}/versions/${version}"
|
||||
fi
|
||||
if [ -d "$PYENV_PREFIX_PATH" ]; then
|
||||
PYENV_PREFIX_PATHS=("${PYENV_PREFIX_PATHS[@]}" "$PYENV_PREFIX_PATH")
|
||||
else
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
# Summary: Rehash pyenv shims (run this after installing executables)
|
||||
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
@@ -30,19 +32,48 @@ remove_prototype_shim() {
|
||||
|
||||
# The prototype shim file is a script that re-execs itself, passing
|
||||
# its filename and any arguments to `pyenv exec`. This file is
|
||||
# hard-linked for every binary and then removed. The linking technique
|
||||
# is fast, uses less disk space than unique files, and also serves as
|
||||
# a locking mechanism.
|
||||
# hard-linked for every executable and then removed. The linking
|
||||
# technique is fast, uses less disk space than unique files, and also
|
||||
# serves as a locking mechanism.
|
||||
create_prototype_shim() {
|
||||
cat > "$PROTOTYPE_SHIM_PATH" <<SH
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
[ -n "\$PYENV_DEBUG" ] && set -x
|
||||
|
||||
program="\${0##*/}"
|
||||
if [ "\$program" = "python" ]; then
|
||||
for arg; do
|
||||
case "\$arg" in
|
||||
-c* | -- ) break ;;
|
||||
*/* )
|
||||
if [ -f "\$arg" ]; then
|
||||
export PYENV_DIR="\${arg%/*}"
|
||||
break
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
export PYENV_ROOT="$PYENV_ROOT"
|
||||
exec pyenv exec "\${0##*/}" "\$@"
|
||||
exec "$(command -v pyenv)" exec "\$program" "\$@"
|
||||
SH
|
||||
chmod +x "$PROTOTYPE_SHIM_PATH"
|
||||
}
|
||||
|
||||
# If the contents of the prototype shim file differ from the contents
|
||||
# of the first shim in the shims directory, assume pyenv has been
|
||||
# upgraded and the existing shims need to be removed.
|
||||
remove_outdated_shims() {
|
||||
for shim in *; do
|
||||
if ! diff "$PROTOTYPE_SHIM_PATH" "$shim" >/dev/null 2>&1; then
|
||||
for shim in *; do rm -f "$shim"; done
|
||||
fi
|
||||
break
|
||||
done
|
||||
}
|
||||
|
||||
# The basename of each argument passed to `make_shims` will be
|
||||
# registered for installation as a shim. In this way, plugins may call
|
||||
# `make_shims` with a glob to register many shims at once.
|
||||
@@ -55,58 +86,27 @@ make_shims() {
|
||||
done
|
||||
}
|
||||
|
||||
# Create an empty array for the list of registered shims.
|
||||
# Create an empty array for the list of registered shims and an empty
|
||||
# string to use as a search index.
|
||||
registered_shims=()
|
||||
registered_shims_index=""
|
||||
|
||||
# We will keep track of shims registered for installation with the
|
||||
# global `reigstered_shims` array and with a global variable for each
|
||||
# shim. The array will let us iterate over all registered shims. The
|
||||
# global variables will let us quickly check whether a shim with the
|
||||
# given name has been registered or not.
|
||||
# global `reigstered_shims` array and with a global search index
|
||||
# string. The array will let us iterate over all registered shims. The
|
||||
# index string will let us quickly check whether a shim with the given
|
||||
# name has been registered or not.
|
||||
register_shim() {
|
||||
local shim="$@"
|
||||
local var="$(shim_variable_name "$shim")"
|
||||
|
||||
if [ -z "${!var}" ]; then
|
||||
registered_shims[${#registered_shims[*]}]="$shim"
|
||||
eval "${var}=1"
|
||||
fi
|
||||
}
|
||||
|
||||
# To compute the global variable name for a given shim we must first
|
||||
# escape any non-alphanumeric characters. If the shim name is
|
||||
# alphanumeric (including a hyphen or underscore) we can take a
|
||||
# shorter path. Otherwise, we must iterate over each character and
|
||||
# escape the non-alphanumeric ones using `printf`.
|
||||
shim_variable_name() {
|
||||
local shim="$1"
|
||||
local result="_shim_"
|
||||
|
||||
if [[ ! "$shim" =~ [^[:alnum:]_-] ]]; then
|
||||
shim="${shim//_/_5f}"
|
||||
shim="${shim//-/_2d}"
|
||||
result="$result$shim"
|
||||
else
|
||||
local length="${#shim}"
|
||||
local char i
|
||||
|
||||
for ((i=0; i<length; i++)); do
|
||||
char="${shim:$i:1}"
|
||||
if [[ "$char" =~ [[:alnum:]] ]]; then
|
||||
result="$result$char"
|
||||
else
|
||||
result="$result$(printf "_%02x" \'"$char")"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
echo "$result"
|
||||
registered_shims["${#registered_shims[@]}"]="$shim"
|
||||
registered_shims_index="$registered_shims_index/$shim/"
|
||||
}
|
||||
|
||||
# To install all the registered shims, we iterate over the
|
||||
# `registered_shims` array and create a link if one does not already
|
||||
# exist.
|
||||
install_registered_shims() {
|
||||
local shim
|
||||
for shim in "${registered_shims[@]}"; do
|
||||
[ -e "$shim" ] || ln -f "$PROTOTYPE_SHIM_PATH" "$shim"
|
||||
done
|
||||
@@ -117,11 +117,10 @@ install_registered_shims() {
|
||||
# in the directory but has not been registered as a shim should be
|
||||
# removed.
|
||||
remove_stale_shims() {
|
||||
local var
|
||||
local shim
|
||||
for shim in *; do
|
||||
var="$(shim_variable_name "$shim")"
|
||||
if [ -z "${!var}" ]; then
|
||||
rm -f "$shim"
|
||||
if [[ "$registered_shims_index" != *"/$shim/"* ]]; then
|
||||
rm -f "$shim"
|
||||
fi
|
||||
done
|
||||
}
|
||||
@@ -129,10 +128,12 @@ remove_stale_shims() {
|
||||
|
||||
# Change to the shims directory.
|
||||
cd "$SHIM_PATH"
|
||||
|
||||
# Create the prototype shim, then register shims for all known binaries.
|
||||
create_prototype_shim
|
||||
shopt -s nullglob
|
||||
|
||||
# Create the prototype shim, then register shims for all known
|
||||
# executables.
|
||||
create_prototype_shim
|
||||
remove_outdated_shims
|
||||
make_shims ../versions/*/bin/*
|
||||
|
||||
# Restore the previous working directory.
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
# Summary: Display the root directory where versions and shims are kept
|
||||
echo $PYENV_ROOT
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# Usage: pyenv pop <version>
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# Usage: pyenv push <version>
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
|
||||
13
libexec/pyenv-sh-rehash
Executable file
13
libexec/pyenv-sh-rehash
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
# Provide pyenv completions
|
||||
if [ "$1" = "--complete" ]; then
|
||||
exec pyenv-rehash --complete
|
||||
fi
|
||||
|
||||
# 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"
|
||||
@@ -1,4 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Summary: Set or show the shell-specific Python version
|
||||
#
|
||||
# Usage: pyenv shell <version>
|
||||
# pyenv shell --unset
|
||||
#
|
||||
# Sets a shell-specific Python version by setting the `PYENV_VERSION'
|
||||
# environment variable in your shell. This version overrides local
|
||||
# application-specific versions and the global version.
|
||||
#
|
||||
# <version> should be a string matching a Python version known to pyenv.
|
||||
# The special version string `system' will use your default system Python.
|
||||
# Run `pyenv versions' for a list of available Python versions.
|
||||
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
@@ -23,11 +37,14 @@ fi
|
||||
|
||||
if [ "$versions" = "--unset" ]; then
|
||||
echo "unset PYENV_VERSION"
|
||||
exit 1
|
||||
exit
|
||||
fi
|
||||
|
||||
# Make sure the specified version is installed.
|
||||
pyenv-prefix "${versions[@]}" >/dev/null
|
||||
|
||||
IFS=: PYENV_VERSION="${versions[*]}"
|
||||
echo "export PYENV_VERSION=\"${PYENV_VERSION}\""
|
||||
if pyenv-prefix "${versions[@]}" >/dev/null; then
|
||||
IFS=: PYENV_VERSION="${versions[*]}"
|
||||
echo "export PYENV_VERSION=\"${PYENV_VERSION}\""
|
||||
else
|
||||
echo "return 1"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# Summary: List existing pyenv shims
|
||||
# Usage: pyenv shims [--short]
|
||||
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
# Summary: Show the current Python version and its origin
|
||||
#
|
||||
# Shows the currently selected Python version and how it was
|
||||
# selected. To obtain only the version string, use `pyenv
|
||||
# version-name'.
|
||||
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
|
||||
@@ -1,15 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
# Summary: Detect the file that sets the current pyenv version
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
root="$PYENV_DIR"
|
||||
while [ -n "$root" ]; do
|
||||
if [ -e "${root}/.pyenv-version" ]; then
|
||||
echo "${root}/.pyenv-version"
|
||||
exit
|
||||
fi
|
||||
root="${root%/*}"
|
||||
done
|
||||
find_local_version_file() {
|
||||
local root="$1"
|
||||
while [ -n "$root" ]; do
|
||||
if [ -e "${root}/.python-version" ]; then
|
||||
echo "${root}/.python-version"
|
||||
exit
|
||||
elif [ -e "${root}/.pyenv-version" ]; then
|
||||
echo "${root}/.pyenv-version"
|
||||
exit
|
||||
fi
|
||||
root="${root%/*}"
|
||||
done
|
||||
}
|
||||
|
||||
find_local_version_file "$PYENV_DIR"
|
||||
[ "$PYENV_DIR" = "$PWD" ] || find_local_version_file "$PWD"
|
||||
|
||||
global_version_file="${PYENV_ROOT}/version"
|
||||
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
# Usage: pyenv version-file-read <file>
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
VERSION_FILE="$1"
|
||||
|
||||
if [ -e "$VERSION_FILE" ]; then
|
||||
# Read and print the first non-whitespace word from the specified
|
||||
# version file.
|
||||
# Read the first non-whitespace word from the specified version file.
|
||||
# Be careful not to load it whole in case there's something crazy in it.
|
||||
versions=()
|
||||
while read -a words; do
|
||||
word="${words[0]}"
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
# Usage: pyenv version-file-write <file> <version>
|
||||
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
@@ -7,12 +9,12 @@ shift
|
||||
versions=("$@")
|
||||
|
||||
if [ -z "$versions" ] || [ -z "$PYENV_VERSION_FILE" ]; then
|
||||
echo "usage: pyenv write-version-file FILENAME VERSIONS..." >&2
|
||||
pyenv-help --usage version-file-write >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Make sure the specified version is installed.
|
||||
pyenv-prefix "${vesions[@]}" >/dev/null
|
||||
pyenv-prefix "${versions[@]}" >/dev/null
|
||||
|
||||
# Write the version out to disk.
|
||||
rm -f "$PYENV_VERSION_FILE"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# Summary: Show the current Python version
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
@@ -11,15 +12,20 @@ else
|
||||
export PYENV_VERSION
|
||||
fi
|
||||
|
||||
if [ -z "$versions" ] || [ "$versions" = "system" ] ; then
|
||||
if [ -z "$versions" ]; then
|
||||
echo "system"
|
||||
exit
|
||||
fi
|
||||
|
||||
version_exists() {
|
||||
local version="$1"
|
||||
[ -d "${PYENV_ROOT}/versions/${version}" ]
|
||||
}
|
||||
|
||||
for version in "${versions[@]}"; do
|
||||
PYENV_VERSION_PATH="${PYENV_ROOT}/versions/${version}"
|
||||
|
||||
if [ ! -d "$PYENV_VERSION_PATH" ]; then
|
||||
|
||||
if [ "$version" != "system" ] && ! version_exists "$version"; then
|
||||
echo "pyenv: version \`$version' is not installed" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# Summary: Explain how the current Python version is set
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
|
||||
@@ -1,7 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
# Summary: List all Python versions available to pyenv
|
||||
# Usage: pyenv versions [--bare]
|
||||
#
|
||||
# Lists all Python versions found in `$PYENV_ROOT/versions/*'.
|
||||
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
if [ "$1" = "--bare" ]; then
|
||||
hit_prefix=""
|
||||
miss_prefix=""
|
||||
IFS=: current_versions=()
|
||||
version_origin=""
|
||||
include_system=""
|
||||
else
|
||||
hit_prefix="* "
|
||||
miss_prefix=" "
|
||||
IFS=: current_versions=($(pyenv-version-name || true))
|
||||
version_origin=" (set by $(pyenv-version-origin))"
|
||||
include_system="1"
|
||||
fi
|
||||
|
||||
array_exists() {
|
||||
local x car="$1"
|
||||
shift
|
||||
@@ -11,26 +30,21 @@ array_exists() {
|
||||
return 1
|
||||
}
|
||||
|
||||
IFS=: PYENV_VERSION_NAMES=($(pyenv-version-name))
|
||||
print_version() {
|
||||
if array_exists "$1" "${current_versions[@]}"; then
|
||||
echo "${hit_prefix}${1}${version_origin}"
|
||||
else
|
||||
echo "${miss_prefix}${1}"
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "$1" = "--bare" ]; then
|
||||
hit_prefix=""
|
||||
miss_prefix=""
|
||||
version_origin=""
|
||||
else
|
||||
hit_prefix="* "
|
||||
miss_prefix=" "
|
||||
version_origin=" (set by $(pyenv-version-origin))"
|
||||
# Include "system" in the non-bare output, if it exists
|
||||
if [ -n "$include_system" ] && PYENV_VERSION=system pyenv-which python >/dev/null 2>&1; then
|
||||
print_version system
|
||||
fi
|
||||
|
||||
for path in "${PYENV_ROOT}/versions/"*; do
|
||||
if [ -d "$path" ]; then
|
||||
version="${path##*/}"
|
||||
|
||||
if array_exists "$version" "${PYENV_VERSION_NAMES[@]}"; then
|
||||
echo "${hit_prefix}${version}${version_origin}"
|
||||
else
|
||||
echo "${miss_prefix}${version}"
|
||||
fi
|
||||
print_version "${path##*/}"
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# Summary: List all Python versions that contain the given executable
|
||||
# Usage: pyenv whence [--path] <command>
|
||||
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
@@ -27,7 +30,7 @@ whence() {
|
||||
|
||||
PYENV_COMMAND="$1"
|
||||
if [ -z "$PYENV_COMMAND" ]; then
|
||||
echo "usage: pyenv whence [--path] COMMAND" >&2
|
||||
pyenv-help --usage whence >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Summary: Display the full path to an executable
|
||||
#
|
||||
# Usage: pyenv which <command>
|
||||
#
|
||||
# Displays the full path to the executable that pyenv will invoke when
|
||||
# you run the given command.
|
||||
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
@@ -45,19 +53,19 @@ IFS=: PYENV_VERSION="${versions[*]}"
|
||||
PYENV_COMMAND="$1"
|
||||
|
||||
if [ -z "$PYENV_COMMAND" ]; then
|
||||
echo "usage: pyenv which COMMAND" >&2
|
||||
pyenv-help --usage which >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for version in "${versions[@]}"; do
|
||||
if [ "$version" = "system" ]; then
|
||||
PATH="$(remove_from_path "${PYENV_ROOT}/shims")"
|
||||
PYENV_COMMAND_PATH="$(command -v "$PYENV_COMMAND")"
|
||||
PYENV_COMMAND_PATH="$(command -v "$PYENV_COMMAND" || true)"
|
||||
else
|
||||
PYENV_COMMAND_PATH="${PYENV_ROOT}/versions/${version}/bin/${PYENV_COMMAND}"
|
||||
if [ -x "$PYENV_COMMAND_PATH" ]; then
|
||||
break
|
||||
fi
|
||||
fi
|
||||
if [ -x "$PYENV_COMMAND_PATH" ]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -69,5 +77,15 @@ if [ -x "$PYENV_COMMAND_PATH" ]; then
|
||||
echo "$PYENV_COMMAND_PATH"
|
||||
else
|
||||
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
|
||||
fi
|
||||
|
||||
@@ -1,4 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Summary: Install a Python version using the python-build plugin
|
||||
#
|
||||
# Usage: pyenv install [-f|--force] [-k|--keep] [-v|--verbose] <version>
|
||||
# pyenv install [-f|--force] [-k|--keep] [-v|--verbose] <definition-file>
|
||||
# pyenv install -l|--list
|
||||
#
|
||||
# -l/--list List all available versions
|
||||
# -f/--force Install even if the version appears to be installed already
|
||||
# -k/--keep Keep source tree in $PYENV_BUILD_ROOT after installation
|
||||
# (defaults to $PYENV_ROOT/sources)
|
||||
# -v/--verbose Verbose mode: print compilation status to stdout
|
||||
#
|
||||
# For detailed information on installing Python versions with
|
||||
# python-build, including a list of environment variables for adjusting
|
||||
# compilation, see: https://github.com/yyuu/pyenv#readme
|
||||
#
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
@@ -15,20 +32,12 @@ fi
|
||||
eval "$(python-build --lib)"
|
||||
|
||||
usage() {
|
||||
{ echo "usage: pyenv install [-k|--keep] [-v|--verbose] VERSION"
|
||||
echo " pyenv install [-k|--keep] [-v|--verbose] /path/to/definition"
|
||||
echo " pyenv install -l|--list"
|
||||
echo
|
||||
echo " -l/--list List all available versions"
|
||||
echo " -k/--keep Keep source tree in \$PYENV_BUILD_ROOT after installation"
|
||||
echo " (defaults to ${PYENV_ROOT}/sources)"
|
||||
echo " -v/--verbose Verbose mode: print compilation status to stdout"
|
||||
echo
|
||||
} >&2
|
||||
|
||||
# We can remove the sed fallback once pyenv 0.4.0 is widely available.
|
||||
pyenv-help install 2>/dev/null || sed -ne '/^#/!q;s/.//;s/.//;1,4d;p' < "$0"
|
||||
[ -z "$1" ] || exit "$1"
|
||||
}
|
||||
|
||||
unset FORCE
|
||||
unset KEEP
|
||||
unset VERBOSE
|
||||
|
||||
@@ -43,6 +52,9 @@ for option in "${OPTIONS[@]}"; do
|
||||
python-build --definitions | sed 's/^/ /'
|
||||
exit
|
||||
;;
|
||||
"f" | "force" )
|
||||
FORCE=true
|
||||
;;
|
||||
"k" | "keep" )
|
||||
[ -n "${PYENV_BUILD_ROOT}" ] || PYENV_BUILD_ROOT="${PYENV_ROOT}/sources"
|
||||
;;
|
||||
@@ -58,21 +70,80 @@ for option in "${OPTIONS[@]}"; do
|
||||
esac
|
||||
done
|
||||
|
||||
unset VERSION_NAME
|
||||
|
||||
# The first argument contains the definition to install. If the
|
||||
# argument is missing, try to install whatever local app-specific
|
||||
# version is specified by pyenv. Show usage instructions if a local
|
||||
# version is not specified.
|
||||
DEFINITION="${ARGUMENTS[0]}"
|
||||
[ -n "$DEFINITION" ] || DEFINITION="$(pyenv local 2>/dev/null || true)"
|
||||
[ -n "$DEFINITION" ] || usage 1
|
||||
|
||||
|
||||
# Define `before_install` and `after_install` functions that allow
|
||||
# plugin hooks to register a string of code for execution before or
|
||||
# after the installation process.
|
||||
declare -a before_hooks after_hooks
|
||||
|
||||
before_install() {
|
||||
local hook="$1"
|
||||
before_hooks["${#before_hooks[@]}"]="$hook"
|
||||
}
|
||||
|
||||
after_install() {
|
||||
local hook="$1"
|
||||
after_hooks["${#after_hooks[@]}"]="$hook"
|
||||
}
|
||||
|
||||
# Load plugin hooks.
|
||||
for script in $(pyenv-hooks install); do
|
||||
source "$script"
|
||||
done
|
||||
|
||||
VERSION_NAME="${DEFINITION##*/}"
|
||||
|
||||
# Set VERSION_NAME from $DEFINITION, if it is not already set. Then
|
||||
# compute the installation prefix.
|
||||
[ -n "$VERSION_NAME" ] || VERSION_NAME="${DEFINITION##*/}"
|
||||
PREFIX="${PYENV_ROOT}/versions/${VERSION_NAME}"
|
||||
|
||||
# If PYENV_BUILD_ROOT is set, then always pass keep options to python-build
|
||||
# If the installation prefix exists, prompt for confirmation unless
|
||||
# the --force option was specified.
|
||||
if [ -z "$FORCE" ] && [ -d "${PREFIX}/bin" ]; then
|
||||
echo "pyenv: $PREFIX already exists" >&2
|
||||
read -p "continue with installation? (y/N) "
|
||||
|
||||
case "$REPLY" in
|
||||
y* | Y* ) ;;
|
||||
* ) exit 1 ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# If PYENV_BUILD_ROOT is set, always pass keep options to python-build.
|
||||
if [ -n "${PYENV_BUILD_ROOT}" ]; then
|
||||
export PYTHON_BUILD_BUILD_PATH="${PYENV_BUILD_ROOT}/${VERSION_NAME}"
|
||||
KEEP="-k"
|
||||
fi
|
||||
|
||||
python-build $KEEP $VERBOSE "$DEFINITION" "$PREFIX"
|
||||
pyenv rehash
|
||||
# Set PYTHON_BUILD_CACHE_PATH to $PYENV_ROOT/cache, if the directory
|
||||
# exists and the variable is not already set.
|
||||
if [ -z "${PYTHON_BUILD_CACHE_PATH}" ] && [ -d "${PYENV_ROOT}/cache" ]; then
|
||||
export PYTHON_BUILD_CACHE_PATH="${PYENV_ROOT}/cache"
|
||||
fi
|
||||
|
||||
|
||||
# Execute `before_install` hooks.
|
||||
for hook in "${before_hooks[@]}"; do eval "$hook"; done
|
||||
|
||||
# Invoke `python-build` and record the exit status in $STATUS. Run
|
||||
# `pyenv rehash` after a successful installation.
|
||||
STATUS=0
|
||||
python-build $KEEP $VERBOSE "$DEFINITION" "$PREFIX" || STATUS="$?"
|
||||
|
||||
# Execute `after_install` hooks.
|
||||
for hook in "${after_hooks[@]}"; do eval "$hook"; done
|
||||
|
||||
# Run `pyenv-rehash` after a successful installation.
|
||||
[ "$STATUS" != "0" ] || pyenv rehash
|
||||
|
||||
exit "$STATUS"
|
||||
|
||||
@@ -1,4 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Summary: Uninstall a specific Python version
|
||||
#
|
||||
# Usage: pyenv uninstall [-f|--force] <version>
|
||||
#
|
||||
# -f Attempt to remove the specified version without prompting
|
||||
# for confirmation. If the version does not exist, do not
|
||||
# display an error message.
|
||||
#
|
||||
# See `pyenv versions` for a complete list of installed versions.
|
||||
#
|
||||
set -e
|
||||
|
||||
# Provide pyenv completions
|
||||
@@ -11,7 +22,7 @@ if [ -z "$PYENV_ROOT" ]; then
|
||||
fi
|
||||
|
||||
unset FORCE
|
||||
if [ "$1" = "-f" ]; then
|
||||
if [ "$1" = "-f" ] || [ "$1" = "--force" ]; then
|
||||
FORCE=true
|
||||
shift
|
||||
fi
|
||||
@@ -19,15 +30,9 @@ fi
|
||||
DEFINITION="$1"
|
||||
case "$DEFINITION" in
|
||||
"" | -* )
|
||||
{ echo "usage: pyenv uninstall [-f] VERSION"
|
||||
echo
|
||||
echo " -f Attempt to remove the specified version without prompting"
|
||||
echo " for confirmation. If the version does not exist, do not"
|
||||
echo " display an error message."
|
||||
echo
|
||||
echo "Installed versions:"
|
||||
pyenv versions --bare | sed 's/^/ /'
|
||||
echo
|
||||
# We can remove the sed fallback once pyenv 0.4.0 is widely available.
|
||||
{ pyenv-help uninstall 2>/dev/null ||
|
||||
sed -ne '/^#/!q;s/.\{1,2\}//;1,4d;p' < "$0"
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
|
||||
@@ -96,6 +96,10 @@ install_git() {
|
||||
install_package_using "git" 2 $*
|
||||
}
|
||||
|
||||
install_svn() {
|
||||
install_package_using "svn" 2 $*
|
||||
}
|
||||
|
||||
install_jar() {
|
||||
install_package_using "jar" 1 $*
|
||||
}
|
||||
@@ -112,7 +116,9 @@ install_package_using() {
|
||||
make_package "$package_name" $*
|
||||
popd >&4
|
||||
|
||||
echo "Installed ${package_name} to ${PREFIX_PATH}" >&2
|
||||
{ echo "Installed ${package_name} to ${PREFIX_PATH}"
|
||||
echo
|
||||
} >&2
|
||||
}
|
||||
|
||||
make_package() {
|
||||
@@ -127,27 +133,139 @@ make_package() {
|
||||
popd >&4
|
||||
}
|
||||
|
||||
fetch_url() {
|
||||
compute_md5() {
|
||||
if type md5 &>/dev/null; then
|
||||
md5 -q
|
||||
elif type openssl &>/dev/null; then
|
||||
local output="$(openssl md5)"
|
||||
echo "${output##* }"
|
||||
elif type md5sum &>/dev/null; then
|
||||
local output="$(md5sum -b)"
|
||||
echo "${output% *}"
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
verify_checksum() {
|
||||
# If there's no MD5 support, return success
|
||||
[ -n "$HAS_MD5_SUPPORT" ] || return 0
|
||||
|
||||
# If the specified filename doesn't exist, return success
|
||||
local filename="$1"
|
||||
[ -e "$filename" ] || return 0
|
||||
|
||||
# If there's no expected checksum, return success
|
||||
local expected_checksum="$2"
|
||||
[ -n "$expected_checksum" ] || return 0
|
||||
|
||||
# If the computed checksum is empty, return failure
|
||||
local computed_checksum="$(compute_md5 < "$filename")"
|
||||
[ -n "$computed_checksum" ] || return 1
|
||||
|
||||
if [ "$expected_checksum" != "$computed_checksum" ]; then
|
||||
{ echo
|
||||
echo "checksum mismatch: ${filename} (file is corrupt)"
|
||||
echo "expected $expected_checksum, got $computed_checksum"
|
||||
echo
|
||||
} >&4
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
http() {
|
||||
local method="$1"
|
||||
local url="$2"
|
||||
[ -n "$url" ] || return 1
|
||||
|
||||
if type curl &>/dev/null; then
|
||||
curl -L "$@"
|
||||
"http_${method}_curl" "$url"
|
||||
elif type wget &>/dev/null; then
|
||||
wget -O- "$@"
|
||||
"http_${method}_wget" "$url"
|
||||
else
|
||||
echo "error: please install \`curl\` or \`wget\` and try again" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
http_head_curl() {
|
||||
curl -sILf "$1" >&4 2>&1
|
||||
}
|
||||
|
||||
http_get_curl() {
|
||||
curl -sSLf "$1"
|
||||
}
|
||||
|
||||
http_head_wget() {
|
||||
wget -q --spider "$1" >&4 2>&1
|
||||
}
|
||||
|
||||
http_get_wget() {
|
||||
wget -nv -O- "$1"
|
||||
}
|
||||
|
||||
fetch_tarball() {
|
||||
local package_name="$1"
|
||||
local package_url="$2"
|
||||
local mirror_url
|
||||
local checksum
|
||||
|
||||
echo "Downloading ${package_url}..." >&2
|
||||
{ fetch_url "$package_url" > "${package_name}.tar"
|
||||
tar xvf "${package_name}.tar"
|
||||
if [ "$package_url" != "${package_url/\#}" ]; then
|
||||
checksum="${package_url#*#}"
|
||||
package_url="${package_url%%#*}"
|
||||
|
||||
if [ -n "$PYTHON_BUILD_MIRROR_URL" ]; then
|
||||
mirror_url="${PYTHON_BUILD_MIRROR_URL}/$checksum"
|
||||
fi
|
||||
fi
|
||||
|
||||
local package_filename="${package_name}.tar" # later tar can read compression algorithm from file
|
||||
symlink_tarball_from_cache "$package_filename" "$checksum" || {
|
||||
echo "Downloading ${package_filename}..." >&2
|
||||
{ http head "$mirror_url" &&
|
||||
download_tarball "$mirror_url" "$package_filename" "$checksum"
|
||||
} ||
|
||||
download_tarball "$package_url" "$package_filename" "$checksum"
|
||||
}
|
||||
|
||||
{ tar xvf "$package_filename"
|
||||
rm -f "$package_filename"
|
||||
} >&4 2>&1
|
||||
}
|
||||
|
||||
symlink_tarball_from_cache() {
|
||||
[ -n "$PYTHON_BUILD_CACHE_PATH" ] || return 1
|
||||
|
||||
local package_filename="$1"
|
||||
local cached_package_filename="${PYTHON_BUILD_CACHE_PATH}/$package_filename"
|
||||
local checksum="$2"
|
||||
|
||||
[ -e "$cached_package_filename" ] || return 1
|
||||
verify_checksum "$cached_package_filename" "$checksum" >&4 2>&1 || return 1
|
||||
ln -s "$cached_package_filename" "$package_filename" >&4 2>&1 || return 1
|
||||
}
|
||||
|
||||
download_tarball() {
|
||||
local package_url="$1"
|
||||
[ -n "$package_url" ] || return 1
|
||||
|
||||
local package_filename="$2"
|
||||
local checksum="$3"
|
||||
|
||||
echo "-> $package_url" >&2
|
||||
|
||||
{ http get "$package_url" > "$package_filename"
|
||||
verify_checksum "$package_filename" "$checksum"
|
||||
} >&4 2>&1 || return 1
|
||||
|
||||
if [ -n "$PYTHON_BUILD_CACHE_PATH" ]; then
|
||||
local cached_package_filename="${PYTHON_BUILD_CACHE_PATH}/$package_filename"
|
||||
{ mv "$package_filename" "$cached_package_filename"
|
||||
ln -s "$cached_package_filename" "$package_filename"
|
||||
} >&4 2>&1 || return 1
|
||||
fi
|
||||
}
|
||||
|
||||
fetch_git() {
|
||||
local package_name="$1"
|
||||
local git_url="$2"
|
||||
@@ -163,16 +281,57 @@ fetch_git() {
|
||||
fi
|
||||
}
|
||||
|
||||
fetch_svn() {
|
||||
local package_name="$1"
|
||||
local svn_url="$2"
|
||||
local svn_rev="$3"
|
||||
|
||||
echo "Checking out ${svn_url}..." >&2
|
||||
|
||||
if type svn &>/dev/null; then
|
||||
svn co -r "$svn_rev" "$svn_url" "${package_name}" >&4 2>&1
|
||||
else
|
||||
echo "error: please install \`svn\` and try again" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
fetch_jar() {
|
||||
local package_name="$1"
|
||||
local package_url="$2"
|
||||
local mirror_url
|
||||
local checksum
|
||||
|
||||
echo "Downloading ${package_url}..." >&2
|
||||
{ fetch_url "$package_url" > "${package_name}.jar"
|
||||
$JAVA -jar ${package_name}.jar -s -d ${package_name}
|
||||
if [ "$package_url" != "${package_url/\#}" ]; then
|
||||
checksum="${package_url#*#}"
|
||||
package_url="${package_url%%#*}"
|
||||
|
||||
if [ -n "$PYTHON_BUILD_MIRROR_URL" ]; then
|
||||
mirror_url="${PYTHON_BUILD_MIRROR_URL}/$checksum"
|
||||
fi
|
||||
fi
|
||||
|
||||
local package_filename="${package_name}.jar"
|
||||
symlink_jar_from_cache "$package_filename" "checksum" || {
|
||||
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"
|
||||
} >&4 2>&1
|
||||
}
|
||||
|
||||
symlink_jar_from_cache() {
|
||||
symlink_tarball_from_cache "$@"
|
||||
}
|
||||
|
||||
download_jar() {
|
||||
download_tarball "$@"
|
||||
}
|
||||
|
||||
build_package() {
|
||||
local package_name="$1"
|
||||
shift
|
||||
@@ -186,7 +345,7 @@ build_package() {
|
||||
echo "Installing ${package_name}..." >&2
|
||||
|
||||
for command in $commands; do
|
||||
"build_package_${command}" "${package_name}"
|
||||
"build_package_${command}"
|
||||
done
|
||||
|
||||
if [ ! -f "$PYTHON_BIN" ]; then
|
||||
@@ -212,8 +371,8 @@ build_package_standard() {
|
||||
fi
|
||||
|
||||
{ ./configure --prefix="$PREFIX_PATH" $CONFIGURE_OPTS
|
||||
make $MAKE_OPTS
|
||||
make install
|
||||
"$MAKE" $MAKE_OPTS
|
||||
"$MAKE" install
|
||||
} >&4 2>&1
|
||||
}
|
||||
|
||||
@@ -225,8 +384,7 @@ build_package_autoconf() {
|
||||
build_package_python() {
|
||||
local package_name="$1"
|
||||
|
||||
{
|
||||
"$PYTHON_BIN" setup.py install
|
||||
{ "$PYTHON_BIN" setup.py install
|
||||
} >&4 2>&1
|
||||
}
|
||||
|
||||
@@ -252,10 +410,6 @@ build_package_copy() {
|
||||
cp -R . "$PREFIX_PATH"
|
||||
}
|
||||
|
||||
bild_package_noop() {
|
||||
echo "Nothing to do."
|
||||
}
|
||||
|
||||
before_install_package() {
|
||||
local stub=1
|
||||
}
|
||||
@@ -266,7 +420,7 @@ after_install_package() {
|
||||
|
||||
fix_directory_permissions() {
|
||||
# Ensure installed directories are not world-writable to avoid Bundler warnings
|
||||
find "$PREFIX_PATH" -type d -exec chmod go-w {} \;
|
||||
find "$PREFIX_PATH" -type d \( -perm -020 -o -perm -002 \) -exec chmod go-w {} \;
|
||||
}
|
||||
|
||||
require_gcc() {
|
||||
@@ -480,6 +634,33 @@ else
|
||||
TMP="${TMPDIR%/}"
|
||||
fi
|
||||
|
||||
if [ -z "$MAKE" ]; then
|
||||
MAKE="make"
|
||||
fi
|
||||
|
||||
if [ -n "$PYTHON_BUILD_CACHE_PATH" ] && [ -d "$PYTHON_BUILD_CACHE_PATH" ]; then
|
||||
PYTHON_BUILD_CACHE_PATH="${PYTHON_BUILD_CACHE_PATH%/}"
|
||||
else
|
||||
unset PYTHON_BUILD_CACHE_PATH
|
||||
fi
|
||||
|
||||
if [ -z "$PYTHON_BUILD_MIRROR_URL" ]; then
|
||||
PYTHON_BUILD_MIRROR_URL="" # FIXME: setup mirror site
|
||||
else
|
||||
PYTHON_BUILD_MIRROR_URL="${PYTHON_BUILD_MIRROR_URL%/}"
|
||||
fi
|
||||
|
||||
if [ -n "$PYTHON_BUILD_SKIP_MIRROR" ]; then
|
||||
unset PYTHON_BUILD_MIRROR_URL
|
||||
fi
|
||||
|
||||
if echo test | compute_md5 >/dev/null; then
|
||||
HAS_MD5_SUPPORT=1
|
||||
else
|
||||
unset HAS_MD5_SUPPORT
|
||||
unset PYTHON_BUILD_MIRROR_URL
|
||||
fi
|
||||
|
||||
SEED="$(date "+%Y%m%d%H%M%S").$$"
|
||||
LOG_PATH="${TMP}/python-build.${SEED}.log"
|
||||
PYTHON_BIN="${PREFIX_PATH}/bin/python"
|
||||
@@ -500,8 +681,8 @@ fi
|
||||
export LDFLAGS="-L'${PREFIX_PATH}/lib' ${LDFLAGS}"
|
||||
export CPPFLAGS="-I'${PREFIX_PATH}/include' ${CPPFLAGS}"
|
||||
|
||||
unset PYTHONOPT
|
||||
unset PYTHONLIB
|
||||
unset PYTHONHOME
|
||||
unset PYTHONPATH
|
||||
|
||||
trap build_failed ERR
|
||||
mkdir -p "$BUILD_PATH"
|
||||
|
||||
@@ -8,6 +8,6 @@ linux*)
|
||||
;;
|
||||
esac
|
||||
|
||||
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
|
||||
install_package "Python-2.5" "http://www.python.org/ftp/python/2.5/Python-2.5.tgz#bc1b74f90a472a6c0a85481aaeb43f95"
|
||||
install_package "distribute-0.6.34" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.34.tar.gz#4576ab843a6db5100fb22a72deadf56d" python
|
||||
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
|
||||
|
||||
@@ -8,6 +8,6 @@ linux*)
|
||||
;;
|
||||
esac
|
||||
|
||||
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
|
||||
install_package "Python-2.5.1" "http://www.python.org/ftp/python/2.5.1/Python-2.5.1.tgz#cca695828df8adc3e69b637af07522e1"
|
||||
install_package "distribute-0.6.34" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.34.tar.gz#4576ab843a6db5100fb22a72deadf56d" python
|
||||
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
|
||||
|
||||
@@ -8,6 +8,6 @@ linux*)
|
||||
;;
|
||||
esac
|
||||
|
||||
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
|
||||
install_package "Python-2.5.2" "http://www.python.org/ftp/python/2.5.2/Python-2.5.2.tgz#3f7ca8aa86c6bd275426d63b46e07992"
|
||||
install_package "distribute-0.6.34" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.34.tar.gz#4576ab843a6db5100fb22a72deadf56d" python
|
||||
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
|
||||
|
||||
@@ -8,6 +8,6 @@ linux*)
|
||||
;;
|
||||
esac
|
||||
|
||||
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
|
||||
install_package "Python-2.5.3" "http://www.python.org/ftp/python/2.5.3/Python-2.5.3.tgz#a971f8928d6beb31ae0de56f7034d6a2"
|
||||
install_package "distribute-0.6.34" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.34.tar.gz#4576ab843a6db5100fb22a72deadf56d" python
|
||||
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
|
||||
|
||||
@@ -8,6 +8,6 @@ linux*)
|
||||
;;
|
||||
esac
|
||||
|
||||
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
|
||||
install_package "Python-2.5.4" "http://www.python.org/ftp/python/2.5.4/Python-2.5.4.tgz#ad47b23778f64edadaaa8b5534986eed"
|
||||
install_package "distribute-0.6.34" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.34.tar.gz#4576ab843a6db5100fb22a72deadf56d" python
|
||||
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
|
||||
|
||||
@@ -8,6 +8,6 @@ linux*)
|
||||
;;
|
||||
esac
|
||||
|
||||
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
|
||||
install_package "Python-2.5.5" "http://www.python.org/ftp/python/2.5.5/Python-2.5.5.tgz#abc02139ca38f4258e8e372f7da05c88"
|
||||
install_package "distribute-0.6.34" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.34.tar.gz#4576ab843a6db5100fb22a72deadf56d" python
|
||||
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
|
||||
|
||||
@@ -8,6 +8,6 @@ linux*)
|
||||
;;
|
||||
esac
|
||||
|
||||
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
|
||||
install_package "Python-2.5.6" "http://www.python.org/ftp/python/2.5.6/Python-2.5.6.tgz#d1d9c83928561addf11d00b22a18ca50"
|
||||
install_package "distribute-0.6.34" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.34.tar.gz#4576ab843a6db5100fb22a72deadf56d" python
|
||||
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
|
||||
|
||||
@@ -2,12 +2,12 @@ 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
|
||||
http get "https://raw.github.com/saghul/pythonz/346450868902fed0fe654c472b7b58e2e31fde70/pythonz/patches/all/common/patch-setup.py.diff" > setup.patch
|
||||
patch -p0 < setup.patch
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
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
|
||||
install_package "Python-2.6.6" "http://www.python.org/ftp/python/2.6.6/Python-2.6.6.tgz#b2f209df270a33315e62c1ffac1937f0"
|
||||
install_package "distribute-0.6.34" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.34.tar.gz#4576ab843a6db5100fb22a72deadf56d" python
|
||||
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
|
||||
|
||||
@@ -2,12 +2,12 @@ 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
|
||||
http get "https://raw.github.com/saghul/pythonz/346450868902fed0fe654c472b7b58e2e31fde70/pythonz/patches/all/common/patch-setup.py.diff" > setup.patch
|
||||
patch -p0 < setup.patch
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
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
|
||||
install_package "Python-2.6.7" "http://www.python.org/ftp/python/2.6.7/Python-2.6.7.tgz#af474f85a3af69ea50438a2a48039d7d"
|
||||
install_package "distribute-0.6.34" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.34.tar.gz#4576ab843a6db5100fb22a72deadf56d" python
|
||||
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
|
||||
|
||||
@@ -2,12 +2,12 @@ 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
|
||||
http get "https://raw.github.com/saghul/pythonz/346450868902fed0fe654c472b7b58e2e31fde70/pythonz/patches/all/common/patch-setup.py.diff" > setup.patch
|
||||
patch -p0 < setup.patch
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
install_package "Python-2.6.8" "http://www.python.org/ftp/python/2.6.8/Python-2.6.8.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
|
||||
install_package "Python-2.6.8" "http://www.python.org/ftp/python/2.6.8/Python-2.6.8.tgz#f6c1781f5d73ab7dfa5181f43ea065f6"
|
||||
install_package "distribute-0.6.34" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.34.tar.gz#4576ab843a6db5100fb22a72deadf56d" python
|
||||
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
|
||||
|
||||
@@ -2,12 +2,12 @@ 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
|
||||
http get "https://raw.github.com/saghul/pythonz/346450868902fed0fe654c472b7b58e2e31fde70/pythonz/patches/all/common/patch-setup.py.diff" > setup.patch
|
||||
patch -p0 < setup.patch
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
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
|
||||
install_package "Python-2.7" "http://www.python.org/ftp/python/2.7/Python-2.7.tgz#35f56b092ecf39a6bd59d64f142aae0f"
|
||||
install_package "distribute-0.6.34" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.34.tar.gz#4576ab843a6db5100fb22a72deadf56d" python
|
||||
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
|
||||
|
||||
@@ -2,12 +2,12 @@ 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
|
||||
http get "https://raw.github.com/saghul/pythonz/346450868902fed0fe654c472b7b58e2e31fde70/pythonz/patches/all/common/patch-setup.py.diff" > setup.patch
|
||||
patch -p0 < setup.patch
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
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
|
||||
install_package "Python-2.7.1" "http://www.python.org/ftp/python/2.7.1/Python-2.7.1.tgz#15ed56733655e3fab785e49a7278d2fb"
|
||||
install_package "distribute-0.6.34" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.34.tar.gz#4576ab843a6db5100fb22a72deadf56d" python
|
||||
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
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
|
||||
install_package "Python-2.7.2" "http://www.python.org/ftp/python/2.7.2/Python-2.7.2.tgz#0ddfe265f1b3d0a8c2459f5bf66894c7"
|
||||
install_package "distribute-0.6.34" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.34.tar.gz#4576ab843a6db5100fb22a72deadf56d" python
|
||||
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
install_package "Python-2.7.3" "http://www.python.org/ftp/python/2.7.3/Python-2.7.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
|
||||
install_package "Python-2.7.3" "http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz#2cf641732ac23b18d139be077bd906cd"
|
||||
install_package "distribute-0.6.34" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.34.tar.gz#4576ab843a6db5100fb22a72deadf56d" python
|
||||
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
|
||||
|
||||
@@ -2,12 +2,12 @@ before_install_package() {
|
||||
local package_name="$1"
|
||||
case "$package_name" in
|
||||
Python*)
|
||||
fetch_url "https://raw.github.com/saghul/pythonz/346450868902fed0fe654c472b7b58e2e31fde70/pythonz/patches/all/python30/patch-setup.py.diff" > setup.patch
|
||||
http get "https://raw.github.com/saghul/pythonz/346450868902fed0fe654c472b7b58e2e31fde70/pythonz/patches/all/python30/patch-setup.py.diff" > setup.patch
|
||||
patch -p0 < setup.patch
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
install_package "Python-3.0.1" "http://www.python.org/ftp/python/3.0.1/Python-3.0.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
|
||||
install_package "Python-3.0.1" "http://www.python.org/ftp/python/3.0.1/Python-3.0.1.tgz#220b73f0a1a20c4b1cdf9f9db4cd52fe"
|
||||
install_package "distribute-0.6.34" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.34.tar.gz#4576ab843a6db5100fb22a72deadf56d" python
|
||||
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
|
||||
|
||||
@@ -2,12 +2,12 @@ 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
|
||||
http get "https://raw.github.com/saghul/pythonz/346450868902fed0fe654c472b7b58e2e31fde70/pythonz/patches/all/common/patch-setup.py.diff" > setup.patch
|
||||
patch -p0 < setup.patch
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
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
|
||||
install_package "Python-3.1.3" "http://www.python.org/ftp/python/3.1.3/Python-3.1.3.tgz#d797fa6abe82c21227e328f05a535424"
|
||||
install_package "distribute-0.6.34" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.34.tar.gz#4576ab843a6db5100fb22a72deadf56d" python
|
||||
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
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
|
||||
install_package "Python-3.1.4" "http://www.python.org/ftp/python/3.1.4/Python-3.1.4.tgz#fa9f8efdc63944c8393870282e8b5c35"
|
||||
install_package "distribute-0.6.34" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.34.tar.gz#4576ab843a6db5100fb22a72deadf56d" python
|
||||
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
install_package "Python-3.1.5" "http://www.python.org/ftp/python/3.1.5/Python-3.1.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
|
||||
install_package "Python-3.1.5" "http://www.python.org/ftp/python/3.1.5/Python-3.1.5.tgz#02196d3fc7bc76bdda68aa36b0dd16ab"
|
||||
install_package "distribute-0.6.34" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.34.tar.gz#4576ab843a6db5100fb22a72deadf56d" python
|
||||
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
|
||||
|
||||
@@ -2,12 +2,12 @@ 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
|
||||
http get "https://raw.github.com/saghul/pythonz/346450868902fed0fe654c472b7b58e2e31fde70/pythonz/patches/all/python32/patch-setup.py.diff" > setup.patch
|
||||
patch -p0 < setup.patch
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
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
|
||||
install_package "Python-3.2" "http://www.python.org/ftp/python/3.2/Python-3.2.tgz#5efe838a7878b170f6728d7e5d7517af"
|
||||
install_package "distribute-0.6.34" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.34.tar.gz#4576ab843a6db5100fb22a72deadf56d" python
|
||||
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
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
|
||||
install_package "Python-3.2.1" "http://www.python.org/ftp/python/3.2.1/Python-3.2.1.tgz#6c2aa3481cadb7bdf74e625fffc352b2"
|
||||
install_package "distribute-0.6.34" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.34.tar.gz#4576ab843a6db5100fb22a72deadf56d" python
|
||||
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
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
|
||||
install_package "Python-3.2.2" "http://www.python.org/ftp/python/3.2.2/Python-3.2.2.tgz#3c63a6d97333f4da35976b6a0755eb67"
|
||||
install_package "distribute-0.6.34" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.34.tar.gz#4576ab843a6db5100fb22a72deadf56d" python
|
||||
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
install_package "Python-3.2.3" "http://www.python.org/ftp/python/3.2.3/Python-3.2.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
|
||||
install_package "Python-3.2.3" "http://www.python.org/ftp/python/3.2.3/Python-3.2.3.tgz#dcf3a738e7028f1deb41b180bf0e2cbc"
|
||||
install_package "distribute-0.6.34" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.34.tar.gz#4576ab843a6db5100fb22a72deadf56d" python
|
||||
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
install_package "Python-3.3.0" "http://python.org/ftp/python/3.3.0/Python-3.3.0.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
|
||||
install_package "Python-3.3.0" "http://python.org/ftp/python/3.3.0/Python-3.3.0.tgz#198a64f7a04d1d5e95ce2782d5fd8254"
|
||||
install_package "distribute-0.6.34" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.34.tar.gz#4576ab843a6db5100fb22a72deadf56d" python
|
||||
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
|
||||
|
||||
@@ -1,4 +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
|
||||
install_jar "Jython-2.5.0" "https://downloads.sourceforge.net/project/jython/jython/2.5.0/jython_installer-2.5.0.jar#f98b83fce9669feec69d0a17ee515a20" jython
|
||||
install_package "distribute-0.6.34" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.34.tar.gz#4576ab843a6db5100fb22a72deadf56d" python
|
||||
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
|
||||
|
||||
@@ -1,4 +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
|
||||
install_jar "Jython-2.5.1" "https://downloads.sourceforge.net/project/jython/jython/2.5.1/jython_installer-2.5.1.jar#2ee978eff4306b23753b3fe9d7af5b37" jython
|
||||
install_package "distribute-0.6.34" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.34.tar.gz#4576ab843a6db5100fb22a72deadf56d" python
|
||||
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
require_java
|
||||
install_jar "Jython-2.5.2" "https://downloads.sourceforge.net/project/jython/jython/2.5.2/jython_installer-2.5.2.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
|
||||
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 "distribute-0.6.34" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.34.tar.gz#4576ab843a6db5100fb22a72deadf56d" python
|
||||
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
|
||||
|
||||
@@ -1,4 +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
|
||||
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 "distribute-0.6.34" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.34.tar.gz#4576ab843a6db5100fb22a72deadf56d" python
|
||||
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
case "$OSTYPE" in
|
||||
darwin*)
|
||||
PYPY_URL="https://bitbucket.org/pypy/pypy/downloads/pypy-1.8-osx64.tar.bz2"
|
||||
PYPY_URL="https://bitbucket.org/pypy/pypy/downloads/pypy-1.8-osx64.tar.bz2#1c293253e8e4df411c3dd59dff82a663"
|
||||
;;
|
||||
linux*)
|
||||
case $(uname -m) in
|
||||
i386|i486|i586|i686)
|
||||
PYPY_URL="https://bitbucket.org/pypy/pypy/downloads/pypy-1.8-linux.tar.bz2"
|
||||
PYPY_URL="https://bitbucket.org/pypy/pypy/downloads/pypy-1.8-linux.tar.bz2#c4a1d11e0283a390d9e9b801a4633b9f"
|
||||
;;
|
||||
x86_64)
|
||||
PYPY_URL="https://bitbucket.org/pypy/pypy/downloads/pypy-1.8-linux64.tar.bz2"
|
||||
PYPY_URL="https://bitbucket.org/pypy/pypy/downloads/pypy-1.8-linux64.tar.bz2#3b81363ccbc042dfdda2fabbf419e788"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
cygwin*|mingw*)
|
||||
PYPY_URL="https://bitbucket.org/pypy/pypy/downloads/pypy-1.8-win32.zip"
|
||||
PYPY_URL="https://bitbucket.org/pypy/pypy/downloads/pypy-1.8-win32.zip#1af8ee722721e9f5fd06b61af530ecb3"
|
||||
;;
|
||||
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
|
||||
install_package "distribute-0.6.34" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.34.tar.gz#4576ab843a6db5100fb22a72deadf56d" python
|
||||
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
|
||||
fi
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
case "$OSTYPE" in
|
||||
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#aad9c4b7b827583e37fe8ae0f7cfe0ff"
|
||||
;;
|
||||
linux*)
|
||||
case $(uname -m) in
|
||||
i386|i486|i586|i686)
|
||||
PYPY_URL="https://bitbucket.org/pypy/pypy/downloads/pypy-1.9-linux.tar.bz2"
|
||||
PYPY_URL="https://bitbucket.org/pypy/pypy/downloads/pypy-1.9-linux.tar.bz2#1a08c88642434fc2e0e4256d351f48db"
|
||||
;;
|
||||
x86_64)
|
||||
PYPY_URL="https://bitbucket.org/pypy/pypy/downloads/pypy-1.9-linux64.tar.bz2"
|
||||
PYPY_URL="https://bitbucket.org/pypy/pypy/downloads/pypy-1.9-linux64.tar.bz2#201d2cce2557e40c784473b471ee1b6b"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
cygwin*|mingw*)
|
||||
PYPY_URL="https://bitbucket.org/pypy/pypy/downloads/pypy-1.9-win32.zip"
|
||||
PYPY_URL="https://bitbucket.org/pypy/pypy/downloads/pypy-1.9-win32.zip#e7655066baed3c7bbbca7df617817dd5"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -n "$PYPY_URL" ]; then
|
||||
install_package "pypy-1.9" "$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
|
||||
install_package "distribute-0.6.34" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.34.tar.gz#4576ab843a6db5100fb22a72deadf56d" python
|
||||
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
|
||||
fi
|
||||
|
||||
39
plugins/python-build/share/python-build/pypy-2.0-beta1
Normal file
39
plugins/python-build/share/python-build/pypy-2.0-beta1
Normal file
@@ -0,0 +1,39 @@
|
||||
case "$OSTYPE" in
|
||||
darwin*)
|
||||
PYPY_URL="https://bitbucket.org/pypy/pypy/downloads/pypy-2.0-beta1-osx64.tar.bz2#2802a06cd19ac86930b63afdd837c32f"
|
||||
;;
|
||||
linux*)
|
||||
case $(uname -m) in
|
||||
armel)
|
||||
PYPY_URL="https://bitbucket.org/pypy/pypy/downloads/pypy-2.0-beta1-linux-armel.tar.bz2#a1505520c063c591b218e5cd3436b111"
|
||||
;;
|
||||
i386|i486|i586|i686)
|
||||
PYPY_URL="https://bitbucket.org/pypy/pypy/downloads/pypy-2.0-beta1-linux.tar.bz2#5aa2e4eee1c3dab86e5cec237776ced3"
|
||||
;;
|
||||
x86_64)
|
||||
LDD_VERSION=$(ldd --version | head -1)
|
||||
case "${LDD_VERSION#ldd \(*\) }" in
|
||||
2.15)
|
||||
PYPY_URL="https://bitbucket.org/pypy/pypy/downloads/pypy-2.0-beta1-linux64-libc2.15.tar.bz2#0fde559a7b1a3b98245d6a5ea7f8ebb2"
|
||||
;;
|
||||
2.13)
|
||||
PYPY_URL="https://bitbucket.org/pypy/pypy/downloads/pypy-2.0-beta1-linux64-libc2.13.tar.bz2#68d8668299cd5adf4f302eaf882c5b33"
|
||||
;;
|
||||
*)
|
||||
echo "pypy-2.0-beta1 requires libc version 2.13 or 2.15." 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
cygwin*|mingw*)
|
||||
PYPY_URL="https://bitbucket.org/pypy/pypy/downloads/pypy-2.0-beta1-win32.zip#e46e1c20da6a2d15e34a6ef9afca311f"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -n "$PYPY_URL" ]; then
|
||||
install_package "pypy-2.0-beta1" "$PYPY_URL" pypy
|
||||
install_package "distribute-0.6.34" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.34.tar.gz#4576ab843a6db5100fb22a72deadf56d" python
|
||||
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
|
||||
fi
|
||||
@@ -1,3 +1,3 @@
|
||||
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
|
||||
install_package "stackless-272-export" "http://www.stackless.com/binaries/stackless-272-export.tar.bz2#79a718db998f2cdd95478d2cb54d56f2"
|
||||
install_package "distribute-0.6.34" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.34.tar.gz#4576ab843a6db5100fb22a72deadf56d" python
|
||||
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
install_package "stackless-322-export" "http://www.stackless.com/binaries/stackless-322-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
|
||||
install_package "stackless-322-export" "http://www.stackless.com/binaries/stackless-322-export.tar.bz2#3a3edcfb4240bdcc580cec2baea60af4"
|
||||
install_package "distribute-0.6.34" "http://pypi.python.org/packages/source/d/distribute/distribute-0.6.34.tar.gz#4576ab843a6db5100fb22a72deadf56d" python
|
||||
install_package "pip-1.2.1" "http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#db8a6d8a4564d3dc7f337ebed67b1a85" python
|
||||
|
||||
Reference in New Issue
Block a user