mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-12 13:33:45 -05:00
Compare commits
26 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ff995b6654 | ||
|
|
4d15d21f0f | ||
|
|
6790e3e18a | ||
|
|
737e0f1b3f | ||
|
|
ab9ee414ad | ||
|
|
c3a755c853 | ||
|
|
9901c4b84d | ||
|
|
a43f7f5341 | ||
|
|
af2cb3f943 | ||
|
|
9b8b9c5205 | ||
|
|
b6aef96cea | ||
|
|
bc6be9ed9f | ||
|
|
2297bd3741 | ||
|
|
8595df4e18 | ||
|
|
200adac02f | ||
|
|
6509d318f4 | ||
|
|
474767618d | ||
|
|
82aaef7842 | ||
|
|
9df0a2916d | ||
|
|
f76309d419 | ||
|
|
29d3df661e | ||
|
|
96b4c0f7e7 | ||
|
|
f9053406c2 | ||
|
|
ae4659538d | ||
|
|
4159055117 | ||
|
|
aa62882347 |
19
CHANGELOG.md
19
CHANGELOG.md
@@ -1,5 +1,24 @@
|
||||
## Version History
|
||||
|
||||
#### 20141008
|
||||
|
||||
* python-build: Add new CPython release; 3.4.2 (#251)
|
||||
* python-build: Add new CPython release candidates; 3.2.6rc1, 3.3.6rc1 (#248)
|
||||
|
||||
#### 20140924
|
||||
|
||||
* pyenv: Fix an unintended behavior when user does not have write permission on $PYENV_ROOT (#230)
|
||||
* pyenv: Fix a zsh completion issue (#232)
|
||||
* python-build: Add new PyPy release; pypy-2.4.0, pypy-2.4.0-src (#241)
|
||||
|
||||
#### 20140825
|
||||
|
||||
* pyenv: Fix zsh completion with multiple words (#215)
|
||||
* python-build: Display the package name of `hg` as `mercurial` in message (#212)
|
||||
* python-build: Unset `PIP_REQUIRE_VENV` during build (#216)
|
||||
* python-build: Set MACOSX_DEPLOYMENT_TARGET from the product version of OS X (#219, #220)
|
||||
* python-build: Add new Jython release; jython2.7-beta3 (#223)
|
||||
|
||||
#### 20140705
|
||||
|
||||
* python-build: Add new CPython release; 2.7.8 (#201)
|
||||
|
||||
33
README.md
33
README.md
@@ -126,6 +126,9 @@ reading it from the following sources, in this order:
|
||||
Python. (In other words, whatever version would run if pyenv weren't in your
|
||||
`PATH`.)
|
||||
|
||||
**NOTE:** You can activate multiple versions at the same time, e.g. `pyenv
|
||||
global 3.4.1 2.7.8`. This allows for parallel usage of python2 and python3,
|
||||
and is required with tools like `tox`.
|
||||
|
||||
### Locating the Python Installation
|
||||
|
||||
@@ -134,7 +137,7 @@ specified, it passes the command along to the corresponding Python
|
||||
installation.
|
||||
|
||||
Each Python version is installed into its own directory under
|
||||
`~/.pyenv/versions`.
|
||||
`~/.pyenv/versions`.
|
||||
|
||||
For example, you might have these versions installed:
|
||||
|
||||
@@ -165,7 +168,7 @@ https://github.com/yyuu/pyenv-installer
|
||||
This will get you going with the latest version of pyenv and make it
|
||||
easy to fork and contribute any changes back upstream.
|
||||
|
||||
1. **Check out pyenv where you want it installed.**
|
||||
1. **Check out pyenv where you want it installed.**
|
||||
A good place to choose is `$HOME/.pyenv` (but you can install it somewhere else).
|
||||
|
||||
$ cd
|
||||
@@ -173,7 +176,7 @@ easy to fork and contribute any changes back upstream.
|
||||
|
||||
|
||||
2. **Define environment variable `PYENV_ROOT`** to point to the path where
|
||||
pyenv repo is cloned and add `$PYENV_ROOT/bin` to your `$PATH` for access
|
||||
pyenv repo is cloned and add `$PYENV_ROOT/bin` to your `$PATH` for access
|
||||
to the `pyenv` command-line utility.
|
||||
|
||||
$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
|
||||
@@ -189,25 +192,25 @@ easy to fork and contribute any changes back upstream.
|
||||
**Zsh note**: Modify your `~/.zshenv` file instead of `~/.bash_profile`.
|
||||
**Ubuntu note**: Modify your `~/.bashrc` file instead of `~/.bash_profile`.
|
||||
|
||||
4. **Restart your shell so the path changes take effect.**
|
||||
4. **Restart your shell so the path changes take effect.**
|
||||
You can now begin using pyenv.
|
||||
|
||||
$ exec $SHELL
|
||||
|
||||
5. **Install Python versions into `$PYENV_ROOT/versions`.**
|
||||
5. **Install Python versions into `$PYENV_ROOT/versions`.**
|
||||
For example, to install Python 2.7.6, download and unpack the source, then run:
|
||||
|
||||
$ pyenv install 2.7.6
|
||||
|
||||
**NOTE:** If you need to pass configure option to build, please use
|
||||
```CONFIGURE_OPTS``` environment variable.
|
||||
|
||||
**NOTE:** If you are having trouble installing a python version,
|
||||
please visit the wiki page about
|
||||
|
||||
**NOTE:** If you are having trouble installing a python version,
|
||||
please visit the wiki page about
|
||||
[Common Build Problems](https://github.com/yyuu/pyenv/wiki/Common-build-problems)
|
||||
|
||||
6. **Rebuild the shim binaries.**
|
||||
You should do this any time you install a new Python binary.
|
||||
6. **Rebuild the shim binaries.**
|
||||
You should do this any time you install a new Python binary.
|
||||
(Examples: installing a new Python version, or installing a package that provides a binary.)
|
||||
|
||||
$ pyenv rehash
|
||||
@@ -234,7 +237,7 @@ To upgrade to a specific release of pyenv, check out the corresponding tag:
|
||||
|
||||
### Homebrew on Mac OS X
|
||||
|
||||
You can also install pyenv using the [Homebrew](http://brew.sh)
|
||||
You can also install pyenv using the [Homebrew](http://brew.sh)
|
||||
package manager for Mac OS X.
|
||||
|
||||
$ brew update
|
||||
@@ -288,8 +291,8 @@ As time goes on, you will accumulate Python versions in your
|
||||
To remove old Python versions, `pyenv uninstall` command to automate
|
||||
the removal process.
|
||||
|
||||
Alternatively, simply `rm -rf` the directory of the version you want
|
||||
to remove. You can find the directory of a particular Python version
|
||||
Alternatively, 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`.
|
||||
|
||||
|
||||
@@ -306,10 +309,10 @@ See [COMMANDS.md](COMMANDS.md).
|
||||
|
||||
## Development
|
||||
|
||||
The pyenv source code is [hosted on GitHub](https://github.com/yyuu/pyenv).
|
||||
The pyenv source code is [hosted on GitHub](https://github.com/yyuu/pyenv).
|
||||
It's clean, modular, and easy to understand--even if you're not a shell hacker.
|
||||
|
||||
Please feel free to submit Pull Requests and report bugs on the
|
||||
Please feel free to submit Pull Requests and report bugs on the
|
||||
[issue tracker](https://github.com/yyuu/pyenv/issues).
|
||||
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@ _pyenv() {
|
||||
if [ "${#words}" -eq 2 ]; then
|
||||
completions="$(pyenv commands)"
|
||||
else
|
||||
completions="$(pyenv completions "${words[2,-2]}")"
|
||||
completions="$(pyenv completions ${words[2,-2]})"
|
||||
fi
|
||||
|
||||
reply=("${(ps:\n:)completions}")
|
||||
reply=(${(ps:\n:)completions})
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
version="20140705"
|
||||
version="20141008"
|
||||
|
||||
if cd "$PYENV_ROOT" 2>/dev/null; then
|
||||
git_revision="$(git describe --tags HEAD 2>/dev/null || true)"
|
||||
|
||||
@@ -21,7 +21,7 @@ if [ "$1" = "--complete" ]; then
|
||||
exec pyenv-versions --bare
|
||||
fi
|
||||
|
||||
versions=($@)
|
||||
versions=("$@")
|
||||
PYENV_VERSION_FILE="${PYENV_ROOT}/version"
|
||||
|
||||
if [ -n "$versions" ]; then
|
||||
|
||||
@@ -33,7 +33,7 @@ if [ "$1" = "--complete" ]; then
|
||||
exec pyenv-versions --bare
|
||||
fi
|
||||
|
||||
versions=($@)
|
||||
versions=("$@")
|
||||
|
||||
if [ "$versions" = "--unset" ]; then
|
||||
rm -f .python-version .pyenv-version
|
||||
|
||||
@@ -17,7 +17,8 @@ fi
|
||||
pyenv-prefix "${versions[@]}" >/dev/null
|
||||
|
||||
# Write the version out to disk.
|
||||
rm -f "$PYENV_VERSION_FILE"
|
||||
# Create an empty file. Using "rm" might cause a permission error.
|
||||
> "$PYENV_VERSION_FILE"
|
||||
for version in "${versions[@]}"; do
|
||||
echo "$version" >> "$PYENV_VERSION_FILE"
|
||||
done
|
||||
|
||||
@@ -435,7 +435,7 @@ fetch_hg() {
|
||||
|
||||
hg clone --branch "$hg_ref" "$hg_url" "${package_name}" >&4 2>&1
|
||||
else
|
||||
echo "error: please install \`hg\` and try again" >&2
|
||||
echo "error: please install \`mercurial\` and try again" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
@@ -1603,6 +1603,10 @@ fi
|
||||
|
||||
# Add support for framework installation (`--enable-framework`) of CPython (#55, #99)
|
||||
if [[ "$PYTHON_CONFIGURE_OPTS" == *"--enable-framework"* ]]; then
|
||||
if [[ "Darwin" != "$(uname -s)" ]]; then
|
||||
echo "python-build: framework installation is not supported." >&2
|
||||
exit 1
|
||||
fi
|
||||
create_framework_dirs() {
|
||||
local version="$(echo "$1" | sed -E 's/^[^0-9]*([0-9]+\.[0-9]+).*$/\1/')"
|
||||
mkdir -p "${PREFIX_PATH}/Python.framework/Versions/${version}"
|
||||
@@ -1617,12 +1621,25 @@ if [[ "$PYTHON_CONFIGURE_OPTS" == *"--enable-framework"* ]]; then
|
||||
package_option python configure --enable-framework="${PREFIX_PATH}"
|
||||
fi
|
||||
|
||||
# Build against universal SDK (#219, #220)
|
||||
if [[ "$PYTHON_CONFIGURE_OPTS" == *"--enable-universalsdk"* ]]; then
|
||||
if [[ "Darwin" != "$(uname -s)" ]]; then
|
||||
echo "python-build: universal installation is not supported." >&2
|
||||
exit 1
|
||||
fi
|
||||
package_option python configure --enable-universalsdk=/ --with-universal-archs=intel
|
||||
fi
|
||||
|
||||
# SSL Certificate error with older wget that does not support Server Name Indication (#60)
|
||||
if ! command -v curl 1>/dev/null 2>&1 && [[ "$(wget --version 2>/dev/null || true)" = "GNU Wget 1.1"[0-3]* ]]; then
|
||||
echo "python-build: wget (< 1.14) doesn't support Server Name Indication. Please install curl (>= 7.18.1) and try again" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Unset `PIP_REQUIRE_VENV` during build (#216)
|
||||
unset PIP_REQUIRE_VENV
|
||||
unset PIP_REQUIRE_VIRTUALENV
|
||||
|
||||
# pydistutils.cfg may corrupt install location of Python libraries (#35, #111)
|
||||
if [ -e "$HOME/.pydistutils.cfg" ]; then
|
||||
{ colorize 1 "WARNING"
|
||||
@@ -1638,6 +1655,19 @@ if [ -n "${PIP_VERSION}" ]; then
|
||||
GET_PIP_URL="https://raw.githubusercontent.com/pypa/pip/${PIP_VERSION}/contrib/get-pip.py"
|
||||
fi
|
||||
|
||||
# Set MACOSX_DEPLOYMENT_TARGET from the product version of OS X (#219, #220)
|
||||
if [[ "Darwin" == "$(uname -s)" ]]; then
|
||||
MACOS_VERSION="$(sw_vers -productVersion 2>/dev/null || true)"
|
||||
MACOS_VERSION_ARRAY=(${MACOS_VERSION//\./ })
|
||||
if [ "${#MACOS_VERSION_ARRAY[@]}" -ge 2 ]; then
|
||||
export MACOSX_DEPLOYMENT_TARGET="${MACOS_VERSION_ARRAY[0]}.${MACOS_VERSION_ARRAY[1]}"
|
||||
else
|
||||
{ colorize 1 "WARNING"
|
||||
echo ": Could not detect the product version of OS X for MACOSX_DEPLOYMENT_TARGET. Use default setting."
|
||||
} >&2
|
||||
fi
|
||||
fi
|
||||
|
||||
SEED="$(date "+%Y%m%d%H%M%S").$$"
|
||||
LOG_PATH="${TMP}/python-build.${SEED}.log"
|
||||
PYTHON_BIN="${PREFIX_PATH}/bin/python"
|
||||
|
||||
3
plugins/python-build/share/python-build/3.2.6rc1
Normal file
3
plugins/python-build/share/python-build/3.2.6rc1
Normal file
@@ -0,0 +1,3 @@
|
||||
require_cc
|
||||
install_package "readline-6.3" "http://ftpmirror.gnu.org/readline/readline-6.3.tar.gz#56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43" standard --if has_broken_mac_readline
|
||||
install_package "Python-3.2.6rc1" "https://www.python.org/ftp/python/3.2.6/Python-3.2.6rc1.tgz#b10c473f205793319e41e2855abcf7f46f0f845e6e8e5077183dbc1271c19743" ldflags_dirs standard verify_py32 ensurepip
|
||||
3
plugins/python-build/share/python-build/3.3.6rc1
Normal file
3
plugins/python-build/share/python-build/3.3.6rc1
Normal file
@@ -0,0 +1,3 @@
|
||||
require_cc
|
||||
install_package "readline-6.3" "http://ftpmirror.gnu.org/readline/readline-6.3.tar.gz#56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43" standard --if has_broken_mac_readline
|
||||
install_package "Python-3.3.6rc1" "https://www.python.org/ftp/python/3.3.6/Python-3.3.6rc1.tgz#1729a43107be4e13b8b4407926557242f2a28a93b97d2d861f8b002257467169" ldflags_dirs standard verify_py33 ensurepip
|
||||
3
plugins/python-build/share/python-build/3.4.2
Normal file
3
plugins/python-build/share/python-build/3.4.2
Normal file
@@ -0,0 +1,3 @@
|
||||
require_cc
|
||||
install_package "readline-6.3" "http://ftpmirror.gnu.org/readline/readline-6.3.tar.gz#56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43" standard --if has_broken_mac_readline
|
||||
install_package "Python-3.4.2" "https://www.python.org/ftp/python/3.4.2/Python-3.4.2.tgz#44a3c1ef1c7ca3e4fd25242af80ed72da941203cb4ed1a8c1b724d9078965dd8" ldflags_dirs standard verify_py34 ensurepip
|
||||
5
plugins/python-build/share/python-build/jython-2.7-beta3
Normal file
5
plugins/python-build/share/python-build/jython-2.7-beta3
Normal file
@@ -0,0 +1,5 @@
|
||||
require_java
|
||||
install_jar "jython-2.7-beta3" "http://search.maven.org/remotecontent?filepath=org/python/jython-installer/2.7-b3/jython-installer-2.7-b3.jar" jython ez_setup
|
||||
# pip (>= 1.3) does not work properly since it uses HTTPS for downloads
|
||||
# * https://github.com/yyuu/pyenv/issues/15
|
||||
install_package "pip-1.2.1" "https://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#12a9302acfca62cdc7bc5d83386cac3e0581db61ac39acdb3a4e766a16b88eb1" python
|
||||
@@ -0,0 +1,70 @@
|
||||
diff -r -u ../Python-3.3.3.orig/Modules/readline.c ./Modules/readline.c
|
||||
--- ../Python-3.3.3.orig/Modules/readline.c 2013-11-17 16:23:01.000000000 +0900
|
||||
+++ ./Modules/readline.c 2014-03-29 16:22:10.219305878 +0900
|
||||
@@ -231,8 +231,7 @@
|
||||
if (!PyArg_ParseTuple(args, buf, &function))
|
||||
return NULL;
|
||||
if (function == Py_None) {
|
||||
- Py_XDECREF(*hook_var);
|
||||
- *hook_var = NULL;
|
||||
+ Py_CLEAR(*hook_var);
|
||||
}
|
||||
else if (PyCallable_Check(function)) {
|
||||
PyObject *tmp = *hook_var;
|
||||
@@ -774,14 +773,22 @@
|
||||
}
|
||||
|
||||
static int
|
||||
+#if defined(_RL_FUNCTION_TYPEDEF)
|
||||
on_startup_hook(void)
|
||||
+#else
|
||||
+on_startup_hook()
|
||||
+#endif
|
||||
{
|
||||
return on_hook(startup_hook);
|
||||
}
|
||||
|
||||
#ifdef HAVE_RL_PRE_INPUT_HOOK
|
||||
static int
|
||||
+#if defined(_RL_FUNCTION_TYPEDEF)
|
||||
on_pre_input_hook(void)
|
||||
+#else
|
||||
+on_pre_input_hook()
|
||||
+#endif
|
||||
{
|
||||
return on_hook(pre_input_hook);
|
||||
}
|
||||
@@ -819,7 +826,7 @@
|
||||
(r != Py_None && PyLong_AsLong(r) == -1 && PyErr_Occurred())) {
|
||||
goto error;
|
||||
}
|
||||
- Py_XDECREF(r); r=NULL;
|
||||
+ Py_CLEAR(r);
|
||||
|
||||
if (0) {
|
||||
error:
|
||||
@@ -877,7 +884,7 @@
|
||||
* before calling the normal completer */
|
||||
|
||||
static char **
|
||||
-flex_complete(char *text, int start, int end)
|
||||
+flex_complete(const char *text, int start, int end)
|
||||
{
|
||||
#ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER
|
||||
rl_completion_append_character ='\0';
|
||||
@@ -936,12 +943,12 @@
|
||||
rl_bind_key_in_map ('\t', rl_complete, emacs_meta_keymap);
|
||||
rl_bind_key_in_map ('\033', rl_complete, emacs_meta_keymap);
|
||||
/* Set our hook functions */
|
||||
- rl_startup_hook = (Function *)on_startup_hook;
|
||||
+ rl_startup_hook = on_startup_hook;
|
||||
#ifdef HAVE_RL_PRE_INPUT_HOOK
|
||||
- rl_pre_input_hook = (Function *)on_pre_input_hook;
|
||||
+ rl_pre_input_hook = on_pre_input_hook;
|
||||
#endif
|
||||
/* Set our completion function */
|
||||
- rl_attempted_completion_function = (CPPFunction *)flex_complete;
|
||||
+ rl_attempted_completion_function = flex_complete;
|
||||
/* Set Python word break characters */
|
||||
completer_word_break_characters =
|
||||
rl_completer_word_break_characters =
|
||||
50
plugins/python-build/share/python-build/pypy-2.4-beta1
Normal file
50
plugins/python-build/share/python-build/pypy-2.4-beta1
Normal file
@@ -0,0 +1,50 @@
|
||||
require_distro() {
|
||||
if [[ "$(cat /etc/issue 2>/dev/null || true)" != "$1"* ]]; then
|
||||
{ echo
|
||||
colorize 1 "WARNING"
|
||||
echo ": The binary distribution of PyPy is built for $1."
|
||||
echo "installed binary may not run expectedly on other platforms."
|
||||
echo
|
||||
} >&2
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
case "$(pypy_architecture 2>/dev/null || true)" in
|
||||
"linux" )
|
||||
require_distro "Ubuntu 10.04" || true
|
||||
install_package "pypy-2.4-beta1-linux" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.4-beta1-linux.tar.bz2#8b63af8791ed7b5316b746af7c9a38f52e92f8153b4e97343778d01b0893ea6d" "pypy" verify_py27 ensurepip
|
||||
;;
|
||||
"linux-armel" )
|
||||
require_distro "Ubuntu 12.04" || true
|
||||
install_package "pypy-2.4-beta1-linux-armel" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.4-beta1-linux-armel.tar.bz2#429c6439f2492ab5541d95673cc71fd3f6e76f4c9695a047f3d23c25de33c849" "pypy" verify_py27 ensurepip
|
||||
;;
|
||||
"linux-armhf" )
|
||||
if [[ "$(cat /etc/issue 2>/dev/null || true)" == "Raspbian"* ]]; then
|
||||
install_package "pypy-2.4-beta1-linux-armhf-raspbian" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.4-beta1-linux-armhf-raspbian.tar.bz2#b6f4b253cfbeb4fb6e842ab29d432edefcd6c5f78b6505139d19c84dd4a2839a" "pypy" verify_py27 ensurepip
|
||||
else
|
||||
require_distro "Ubuntu 13.04" || true
|
||||
install_package "pypy-2.4-beta1-linux-armhf-raring" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.4-beta1-linux-armhf-raring.tar.bz2#ecc35b8ef369e3a1686b50de8574cee0b1971d9510a329d7e34851b71d774a71" "pypy" verify_py27 ensurepip
|
||||
fi
|
||||
;;
|
||||
"linux64" )
|
||||
require_distro "Ubuntu 12.04" || true
|
||||
install_package "pypy-2.4-beta1-linux64" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.4-beta1-linux64.tar.bz2#b526aa67c2fa84fbda7e36354648369573d4efc4e95b948210f79dc3b3330869" "pypy" verify_py27 ensurepip
|
||||
;;
|
||||
"osx64" )
|
||||
install_package "pypy-2.4-beta1-osx64" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.4-beta1-osx64.tar.bz2#aec6dc3eb1014940ade3b1ff77edb67a1b95e94cee6e9e49ac15b7edeffe92e1" "pypy" verify_py27 ensurepip
|
||||
;;
|
||||
"win32" )
|
||||
# FIXME: never tested on Windows
|
||||
install_zip "pypy-2.4-beta1-win32" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.4-beta1-win32.zip#763952626ffdad105d336b3a28f538c65263502eb08a9c37f073873693f75c32" "pypy" verify_py27 ensurepip
|
||||
;;
|
||||
* )
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true)."
|
||||
echo "try 'pypy-2.4-beta1-src' to build from soruce."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,2 @@
|
||||
require_gcc
|
||||
install_package "pypy-pypy-9f425c60afdf" "https://bitbucket.org/pypy/pypy/get/release-2.4-beta1.tar.bz2#4baa5663872cf47e18fb35232cc70503b087e0d3f927bd4cc4bbf7ef578b13bd" "pypy_builder" verify_py27 ensurepip
|
||||
50
plugins/python-build/share/python-build/pypy-2.4.0
Normal file
50
plugins/python-build/share/python-build/pypy-2.4.0
Normal file
@@ -0,0 +1,50 @@
|
||||
require_distro() {
|
||||
if [[ "$(cat /etc/issue 2>/dev/null || true)" != "$1"* ]]; then
|
||||
{ echo
|
||||
colorize 1 "WARNING"
|
||||
echo ": The binary distribution of PyPy is built for $1."
|
||||
echo "installed binary may not run expectedly on other platforms."
|
||||
echo
|
||||
} >&2
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
case "$(pypy_architecture 2>/dev/null || true)" in
|
||||
"linux" )
|
||||
require_distro "Ubuntu 10.04" || true
|
||||
install_package "pypy-2.4.0-linux" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.4.0-linux.tar.bz2#a24adb366f87ac0eba829d7188a156a7d897e71893689fab06502c3f4152ac0e" "pypy" verify_py27 ensurepip
|
||||
;;
|
||||
"linux-armel" )
|
||||
require_distro "Ubuntu 12.04" || true
|
||||
install_package "pypy-2.4.0-linux-armel" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.4.0-linux-armel.tar.bz2#8362d634bf86fbfb3b99b578b13c0a9fd673b2b7580d6d65b4a181934c659ccd" "pypy" verify_py27 ensurepip
|
||||
;;
|
||||
"linux-armhf" )
|
||||
if [[ "$(cat /etc/issue 2>/dev/null || true)" == "Raspbian"* ]]; then
|
||||
install_package "pypy-2.4.0-linux-armhf-raspbian" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.4.0-linux-armhf-raspbian.tar.bz2#5e0ba69b28ffbd5b61b0b6be2a130ab0c80e7d2da289d9530b0b6eac4302d5fa" "pypy" verify_py27 ensurepip
|
||||
else
|
||||
require_distro "Ubuntu 13.04" || true
|
||||
install_package "pypy-2.4.0-linux-armhf-raring" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.4.0-linux-armhf-raring.tar.bz2#ddbdd6207c41cf82d8c96d52a2a204a2cdada9301cb577f9b323f22394bb1f0a" "pypy" verify_py27 ensurepip
|
||||
fi
|
||||
;;
|
||||
"linux64" )
|
||||
require_distro "Ubuntu 12.04" || true
|
||||
install_package "pypy-2.4.0-linux64" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.4.0-linux64.tar.bz2#27cdc0d6e8bce2637678f6d076fc780877dffe1bf9aec9e253f95219af9ed099" "pypy" verify_py27 ensurepip
|
||||
;;
|
||||
"osx64" )
|
||||
install_package "pypy-2.4.0-osx64" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.4.0-osx64.tar.bz2#3eb8afdfa42bc9b08b4d3058e21d4ce978a52722fdcfdc67d6c3ee5013a51aaa" "pypy" verify_py27 ensurepip
|
||||
;;
|
||||
"win32" )
|
||||
# FIXME: never tested on Windows
|
||||
install_zip "pypy-2.4.0-win32" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.4.0-win32.zip#3eb8afdfa42bc9b08b4d3058e21d4ce978a52722fdcfdc67d6c3ee5013a51aaa" "pypy" verify_py27 ensurepip
|
||||
;;
|
||||
* )
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true)."
|
||||
echo "try 'pypy-2.4.0-src' to build from soruce."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
2
plugins/python-build/share/python-build/pypy-2.4.0-src
Normal file
2
plugins/python-build/share/python-build/pypy-2.4.0-src
Normal file
@@ -0,0 +1,2 @@
|
||||
require_gcc
|
||||
install_package "pypy-pypy-c6ad44ecf5d8" "https://bitbucket.org/pypy/pypy/get/release-2.4.0.tar.bz2#7e0dec2c40106f20f002121bdabb71939915254fb91bd55b01434e4b994113d2" "pypy_builder" verify_py27 ensurepip
|
||||
@@ -216,6 +216,7 @@ OUT
|
||||
@test "number of CPU cores defaults to 2" {
|
||||
cached_tarball "Python-3.2.1"
|
||||
|
||||
stub uname '-s : echo Darwin'
|
||||
stub uname '-s : echo Darwin'
|
||||
stub sysctl false
|
||||
stub_make_install
|
||||
@@ -240,6 +241,7 @@ OUT
|
||||
@test "number of CPU cores is detected on Mac" {
|
||||
cached_tarball "Python-3.2.1"
|
||||
|
||||
stub uname '-s : echo Darwin'
|
||||
stub uname '-s : echo Darwin'
|
||||
stub sysctl '-n hw.ncpu : echo 4'
|
||||
stub_make_install
|
||||
@@ -316,6 +318,7 @@ OUT
|
||||
@test "make on FreeBSD defaults to gmake" {
|
||||
cached_tarball "Python-3.2.1"
|
||||
|
||||
stub uname "-s : echo FreeBSD"
|
||||
stub uname "-s : echo FreeBSD"
|
||||
MAKE=gmake stub_make_install
|
||||
|
||||
@@ -389,3 +392,37 @@ OUT
|
||||
run python-build "${TMP}/build-definition" "$INSTALL_ROOT"
|
||||
assert_failure "python-build: TMPDIR=$TMPDIR is set to a non-accessible location"
|
||||
}
|
||||
|
||||
@test "setting MACOSX_DEPLOYMENT_TARGET from the product version of OS X" {
|
||||
stub uname '-s : echo Darwin'
|
||||
stub sw_vers '-productVersion : echo 10.9.4'
|
||||
|
||||
run_inline_definition <<DEF
|
||||
echo "MACOSX_DEPLOYMENT_TARGET=\${MACOSX_DEPLOYMENT_TARGET}" > "$INSTALL_ROOT/build.log"
|
||||
DEF
|
||||
assert_success
|
||||
|
||||
assert_build_log <<OUT
|
||||
MACOSX_DEPLOYMENT_TARGET=10.9
|
||||
OUT
|
||||
|
||||
unstub uname
|
||||
unstub sw_vers
|
||||
}
|
||||
|
||||
@test "not setting MACOSX_DEPLOYMENT_TARGET if the product version of OS X is not available" {
|
||||
stub uname '-s : echo Darwin'
|
||||
stub sw_vers false
|
||||
|
||||
run_inline_definition <<DEF
|
||||
echo "MACOSX_DEPLOYMENT_TARGET=\${MACOSX_DEPLOYMENT_TARGET}" > "$INSTALL_ROOT/build.log"
|
||||
DEF
|
||||
assert_success
|
||||
|
||||
assert_build_log <<OUT
|
||||
MACOSX_DEPLOYMENT_TARGET=
|
||||
OUT
|
||||
|
||||
unstub uname
|
||||
unstub sw_vers
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ load test_helper
|
||||
@test "blank invocation" {
|
||||
run pyenv
|
||||
assert_success
|
||||
assert [ "${lines[0]}" == "pyenv 20140705" ]
|
||||
assert [ "${lines[0]}" == "pyenv 20141008" ]
|
||||
}
|
||||
|
||||
@test "invalid command" {
|
||||
|
||||
Reference in New Issue
Block a user