1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-14 06:13:53 -05:00

Compare commits

...

7 Commits

Author SHA1 Message Date
Yamashita Yuu
9146f44db1 v20150204 2015-02-04 10:33:21 +09:00
Yamashita Yuu
b9ae43a9df Add PyPy 2.5.0 release (fixes #311) 2015-02-04 09:33:37 +09:00
Yamashita Yuu
f6a77549eb Latest pip can't be installed into 3.0.1 (fixes #309) 2015-01-31 16:19:39 +09:00
Yamashita Yuu
cbd246acff Symlink pythonX.Y-config to python-config if python-config is missing (fixes #296) 2015-01-31 16:13:26 +09:00
Yamashita Yuu
9d21169ee0 Fix regression of #255 and add test 2015-01-31 15:35:40 +09:00
Yamashita Yuu
7bceb85067 Update README 2015-01-31 15:24:05 +09:00
Yamashita Yuu
eeb69b1b79 Add note about --enable-shared and RPATH (fixes #217) 2015-01-31 15:14:58 +09:00
9 changed files with 102 additions and 8 deletions

View File

@@ -1,5 +1,13 @@
## Version History ## Version History
#### 20150204
* python-build: Add PyPy 2.5.0 release (#311)
* python-build: Add note about `--enable-shared` and RPATH (#217)
* python-build: Fix regression of `PYTHON_MAKE_INSTALL_TARGET` and add test (#255)
* python-build: Symlink `pythonX.Y-config` to `python-config` if `python-config` is missing (#296)
* python-build: Latest `pip` can't be installed into `3.0.1` (#309)
#### 20150124 #### 20150124
* python-build: Import recent changes from ruby-build v20150112 * python-build: Import recent changes from ruby-build v20150112

View File

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

View File

@@ -105,6 +105,20 @@ process.
configure and make options for buildling CPython. These variables will configure and make options for buildling CPython. These variables will
be passed to Python only, not any dependent packages (e.g. libyaml). be passed to Python only, not any dependent packages (e.g. libyaml).
### Building as `--enable-shared`
You can build CPython with `--enable-shared` to install a version with
shared object.
If `--enabled-shared` was found in `PYTHON_CONFIGURE_OPTS` or `CONFIGURE_OPTS`,
`python-build` will automatically set `RPATH` to the pyenv's prefix directory.
This means you don't have to set `LD_LIBRARY_PATH` or `DYLD_LIBRARY_PATH` for
the version(s) installed with `--enable-shared`.
```sh
$ env PYTHON_CONFIGURE_OPTS="--enable-shared` pyenv install 2.7.9
```
### Checksum verification ### Checksum verification
If you have the `shasum`, `openssl`, or `sha256sum` tool installed, If you have the `shasum`, `openssl`, or `sha256sum` tool installed,

View File

@@ -654,6 +654,7 @@ build_package_standard() {
local PACKAGE_MAKE_OPTS_ARRAY="${package_var_name}_MAKE_OPTS_ARRAY[@]" local PACKAGE_MAKE_OPTS_ARRAY="${package_var_name}_MAKE_OPTS_ARRAY[@]"
local PACKAGE_MAKE_INSTALL_OPTS="${package_var_name}_MAKE_INSTALL_OPTS" local PACKAGE_MAKE_INSTALL_OPTS="${package_var_name}_MAKE_INSTALL_OPTS"
local PACKAGE_MAKE_INSTALL_OPTS_ARRAY="${package_var_name}_MAKE_INSTALL_OPTS_ARRAY[@]" local PACKAGE_MAKE_INSTALL_OPTS_ARRAY="${package_var_name}_MAKE_INSTALL_OPTS_ARRAY[@]"
local PACKAGE_MAKE_INSTALL_TARGET="${package_var_name}_MAKE_INSTALL_TARGET"
local PACKAGE_CFLAGS="${package_var_name}_CFLAGS" local PACKAGE_CFLAGS="${package_var_name}_CFLAGS"
[ "$package_var_name" = "PYTHON" ] && use_homebrew_readline || true [ "$package_var_name" = "PYTHON" ] && use_homebrew_readline || true
@@ -670,7 +671,7 @@ build_package_standard() {
) >&4 2>&1 ) >&4 2>&1
{ "$MAKE" $MAKE_OPTS ${!PACKAGE_MAKE_OPTS} "${!PACKAGE_MAKE_OPTS_ARRAY}" { "$MAKE" $MAKE_OPTS ${!PACKAGE_MAKE_OPTS} "${!PACKAGE_MAKE_OPTS_ARRAY}"
"$MAKE" install $MAKE_INSTALL_OPTS ${!PACKAGE_MAKE_INSTALL_OPTS} "${!PACKAGE_MAKE_INSTALL_OPTS_ARRAY}" "$MAKE" "${!PACKAGE_MAKE_INSTALL_TARGET:-install}" $MAKE_INSTALL_OPTS ${!PACKAGE_MAKE_INSTALL_OPTS} "${!PACKAGE_MAKE_INSTALL_OPTS_ARRAY}"
} >&4 2>&1 } >&4 2>&1
} }
@@ -1337,13 +1338,21 @@ verify_python() {
# Not create symlinks on `altinstall` (#255) # Not create symlinks on `altinstall` (#255)
if [[ "$PYTHON_MAKE_INSTALL_TARGET" != *"altinstall"* ]]; then if [[ "$PYTHON_MAKE_INSTALL_TARGET" != *"altinstall"* ]]; then
local suffix="${1#python}" local suffix="${1#python}"
local file local file link
shopt -s nullglob shopt -s nullglob
for file in "${PREFIX_PATH}/bin"/*; do for file in "${PREFIX_PATH}/bin"/*; do
local link unset link
case "${file}" in case "${file}" in
*"-${suffix}" ) link="${file%%-${suffix}}" ;; */"python${suffix}-config" )
*"${suffix}" ) link="${file%%${suffix}}" ;; # Symlink `pythonX.Y-config` to `python-config` if `python-config` is missing (#296)
link="${file%/*}/python-config"
;;
*/*"-${suffix}" )
link="${file%%-${suffix}}"
;;
*/*"${suffix}" )
link="${file%%${suffix}}"
;;
esac esac
if [ -n "$link" ] && [ ! -e "$link" ]; then if [ -n "$link" ] && [ ! -e "$link" ]; then
( cd "${file%/*}" && ln -fs "${file##*/}" "${link##*/}" ) ( cd "${file%/*}" && ln -fs "${file##*/}" "${link##*/}" )

View File

@@ -1,3 +1,5 @@
#require_gcc #require_gcc
install_package "readline-6.3" "http://ftpmirror.gnu.org/readline/readline-6.3.tar.gz#56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43" standard --if has_broken_mac_readline 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.0.1" "http://python.org/ftp/python/3.0.1/Python-3.0.1.tgz#7d5f2feae9035f1d3d9e6bb7f092dbf374d6bb4b25abd0d2d11f13bba1cb04de" ldflags_dirs standard verify_py30 ensurepip install_package "Python-3.0.1" "http://python.org/ftp/python/3.0.1/Python-3.0.1.tgz#7d5f2feae9035f1d3d9e6bb7f092dbf374d6bb4b25abd0d2d11f13bba1cb04de" ldflags_dirs standard verify_py30
install_package "setuptools-1.4.2" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.4.2.tar.gz#263986a60a83aba790a5bffc7d009ac88114ba4e908e5c90e453b3bf2155dbbd" python
install_package "pip-1.3.1" "https://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#145eaa5d1ea1b062663da1f3a97780d7edea4c63c68a37c463b1deedf7bb4957" python

View File

@@ -0,0 +1,38 @@
case "$(pypy_architecture 2>/dev/null || true)" in
"linux" )
require_distro "Ubuntu 12.04" "Ubuntu 12.10" "Ubuntu 13.04" "Ubuntu 13.10" "Ubuntu 14.04" || true
install_package "pypy-2.5.0-linux" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.5.0-linux.tar.bz2#3dfd56a986d25929b4ed9f40a5484f72f1d513cd816cf8aaa683106c3391247c" "pypy" verify_py27 ensurepip
;;
"linux-armel" )
require_distro "Ubuntu 12.04" "Ubuntu 12.10" "Ubuntu 13.04" "Ubuntu 13.10" "Ubuntu 14.04" || true
install_package "pypy-2.5.0-linux-armel" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.5.0-linux-armel.tar.bz2#277fa6c61d63af96893dafd19e1ffea7b988397c6a0fd66cd99dc0db1029be56" "pypy" verify_py27 ensurepip
;;
"linux-armhf" )
if [[ "$(cat /etc/issue 2>/dev/null || true)" == "Raspbian"* ]]; then
install_package "pypy-2.5.0-linux-armhf-raspbian" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.5.0-linux-armhf-raspbian.tar.bz2#6c975e39f0e7d57176b49a987a08862a3cbd9aeb52f47eb4ab148ea334e747fd" "pypy" verify_py27 ensurepip
else
require_distro "Ubuntu 13.04" || true
install_package "pypy-2.5.0-linux-armhf-raring" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.5.0-linux-armhf-raring.tar.bz2#1866bf2b8a8144c68d64f2ba982c6c545849913167b4602b762716332ec1fa0b" "pypy" verify_py27 ensurepip
fi
;;
"linux64" )
require_distro "Ubuntu 12.04" || true
install_package "pypy-2.5.0-linux64" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.5.0-linux64.tar.bz2#7764fb6b662407f8709eaa334c542aac9cb6bfe3291ac198dad0980ca129f3c2" "pypy" verify_py27 ensurepip
;;
"osx64" )
install_package "pypy-2.5.0-osx64" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.5.0-osx64.tar.bz2#30b392b969b54cde281b07f5c10865a7f2e11a229c46b8af384ca1d3fe8d4e6e" "pypy" verify_py27 ensurepip
;;
"win32" )
# FIXME: never tested on Windows
install_zip "pypy-2.5.0-win32" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.5.0-win32.zip#692391434cf14016d74c6b8bda8f93135ef026f48c8327f3195bfa24d314317d" "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.5.0-src' to build from soruce."
echo
} >&2
exit 1
;;
esac

View File

@@ -0,0 +1,2 @@
require_gcc
install_package "pypy-pypy-c6ad44ecf5d8" "https://bitbucket.org/pypy/pypy/get/release-2.5.0.tar.bz2#8d644a55a3150cf3d18536c784e3410bb3f3438c1505000c4f761863bacedf88" "pypy_builder" verify_py27 ensurepip

View File

@@ -138,3 +138,24 @@ OUT
unstub make unstub make
unstub patch unstub patch
} }
@test "allow custom make install target" {
cached_tarball "Python-3.2.1"
stub brew false
stub "$MAKE" \
" : echo \"$MAKE \$@\" >> build.log" \
" : echo \"$MAKE \$@\" >> build.log && cat build.log >> '$INSTALL_ROOT/build.log'"
PYTHON_MAKE_INSTALL_TARGET="altinstall" TMPDIR="$TMP" install_tmp_fixture definitions/vanilla-python < /dev/null
assert_success
assert_build_log <<OUT
Python-3.2.1: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
Python-3.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib
make -j 2
make altinstall
OUT
unstub make
}

View File

@@ -5,7 +5,7 @@ load test_helper
@test "blank invocation" { @test "blank invocation" {
run pyenv run pyenv
assert_success assert_success
assert [ "${lines[0]}" == "pyenv 20150124" ] assert [ "${lines[0]}" == "pyenv 20150204" ]
} }
@test "invalid command" { @test "invalid command" {