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

Compare commits

...

42 Commits

Author SHA1 Message Date
Josh Friend
d6d6bc8bb0 v1.2.14 2019-10-15 10:15:56 -04:00
Josh Friend
a0a5822785 Remove 3.8.0 betas/rcs 2019-10-15 10:10:59 -04:00
Jeremiah Boby
3cfe81a3f8 Add Python 3.8.0 (stable release) (#1416)
Use stable 3.8.0 release for PYTHON_BUILD_VERSION
2019-10-15 10:08:32 -04:00
Yamashita, Yuu
f3d008fddd Merge pull request #1410 from felixonmars/patch-1
Correct a typo in python-build
2019-10-09 09:10:18 +09:00
Felix Yan
4039709dfe Correct a typo in python-build 2019-10-09 06:12:27 +08:00
Josh Friend
38de38e3d5 Add CPython 3.5.8rc1 (#1406) 2019-10-02 08:44:00 -04:00
Josh Friend
908d57d677 Add CPython 3.7.5rc1 (#1405) 2019-10-02 01:16:15 -04:00
Anton Petrov
9fc7ef3a17 Create 3.8.0rc1 (#1404)
Added Python version 3.8.0 Release Candidate 1
2019-10-02 01:11:03 -04:00
Daniel Hahler
ecd67c8223 pyenv-exec: no -a with exec to keep $PATH with system version (#1169)
Using `exec -a` caused Python to use $PATH to look up the full program name (for
`sys.executable`), which 314937d then tried to fix by changing $PATH
also for the system version.
This is not necessary anymore when not using the short name with `exec`.

This was rejected upstream
(https://github.com/rbenv/rbenv/pull/1089#issuecomment-394531896), since
it is not a problem with Ruby apparently.

Uses $PYENV_ROOT to check if system version is used.

Fixes https://github.com/pyenv/pyenv/issues/98.
Fixes https://github.com/pyenv/pyenv/issues/789.
2019-09-29 00:03:44 +02:00
Daniel Hahler
31b7e1c390 tests: remove "supports python -S <cmd>" (#1168)
This was imported semi-automatically in 0965577, but `ruby -S` is
different from `python -S`.

`ruby -S`: look for the script using PATH environment variable
`python -S`: don't imply 'import site' on initialization
2019-09-24 04:59:49 +02:00
Yamashita, Yuu
8a56fe641f Merge pull request #1397 from grahamannett/tcltk-fix
working with tcl-tk in PYTHON_CONFIGURE_OPTS
2019-09-19 17:10:42 +09:00
graham
b7f4ace335 working with tcl-tk in PYTHON_CONFIGURE_OPTS 2019-09-18 18:04:12 -07:00
Yamashita, Yuu
a7cba17fb7 Merge pull request #1396 from cdwilson/fix-micropython-build
Fix path to Unix port in micropython build
2019-09-19 09:24:17 +09:00
Christopher Wilson
a71e590a44 Fix path to Unix port in micropython build 2019-09-18 10:18:48 -07:00
Yamashita, Yuu
3798638a6a Merge pull request #1395 from cdwilson/add-micropython-1.11
Add micropython-1.11
2019-09-18 15:07:40 +09:00
Yamashita, Yuu
e29d2b666b Merge pull request #1394 from cdwilson/fix-micropython-build
Build mpy-cross dependency for micropython builds
2019-09-18 15:06:51 +09:00
Christopher Wilson
c9da22d559 Add micropython-1.11 2019-09-17 21:44:46 -07:00
Christopher Wilson
8bebdb7f1a Build mpy-cross dependency for micropython builds 2019-09-17 21:39:04 -07:00
Yamashita, Yuu
6563b64d0b Merge pull request #1390 from Juanlu001/add-cpython-380b4
Add CPython 3.8.0b4
2019-08-31 17:42:33 +09:00
Juan Luis Cano Rodríguez
eefdc57562 Add CPython 3.8.0b4
Fix #1389.
2019-08-31 09:57:46 +02:00
Yamashita, Yuu
0aeeb6fdcb Merge pull request #1382 from kenshohara/master
Support Anaconda-2019.07
2019-08-21 16:32:38 +09:00
kenshohara
b5547afbc8 Support Anaconda-2019.07 2019-08-21 14:57:25 +09:00
Josh Friend
17f44b7cd6 v1.2.13 2019-07-09 08:56:34 -04:00
Joe Siewert
10bf9d22c6 Add CPython 3.7.4 (#1370) 2019-07-08 22:00:12 -04:00
Yamashita, Yuu
525dac36f6 Merge pull request #1368 from joesiewert/python-3.6.9
Add CPython 3.6.9
2019-07-07 16:29:24 +09:00
Joe Siewert
d24bb6eb7e Add CPython 3.6.9 2019-07-06 18:48:56 -06:00
Yamashita, Yuu
eb68ec9488 Merge pull request #1358 from jonathanbranam/patch-1
Remove infocmp from shims
2019-06-21 12:42:40 +09:00
Jonathan Branam
aed0c91d61 Remove infocmp from shims
infocmp is a system utility that returns information about the user's terminal. When it is shimmed it can cause problems for various programs that use it to determine terminal settings. In particular, the library used by the Scala shell reads it and problems can occur where various control keys don't work (e.g. backspace does not work).
2019-06-20 22:04:20 -04:00
Josh Friend
a10c787f9b v1.2.12 2019-06-11 10:18:18 -04:00
Mikhail Bulash
4157973301 Find zlib from Xcode or brew on Mojave (#1353)
fixes #1219, #1333
2019-06-11 10:12:00 -04:00
Josh Friend
2350e57b00 Add CPython 3.8.0b1 2019-06-04 19:39:02 -04:00
Josh Friend
7dd50144d5 Link windows users to pyenv-win
see #62
2019-04-28 20:21:47 -04:00
Christopher Hunt
6103468023 Merge pull request #1337 from nvllsvm/1336
Revert "Merge pull request #1153 from cmcginty/remove-sbang"
2019-04-23 10:39:24 -04:00
Andrew Rabert
0f596d2504 Revert "Merge pull request #1153 from cmcginty/remove-sbang"
This reverts commit 070e1c859f, reversing
changes made to 3faeda67bb.
2019-04-23 10:23:33 -04:00
Christopher Hunt
070e1c859f Merge pull request #1153 from cmcginty/remove-sbang
Remove shebang lines from scripts for performance
2019-04-22 20:13:19 -04:00
Christopher Hunt
3faeda67bb Merge pull request #1216 from blueyed/abs_dirname
Fix abs_dirname for relative symlinks in same directory
2019-04-18 16:34:55 -04:00
Yamashita, Yuu
ec220c4476 Merge pull request #1335 from lazka/pypy-7.1.1
Add PyPy 7.1.1
2019-04-17 16:57:04 +09:00
Christoph Reiter
01f596e33c Add PyPy 7.1.1
https://pypy.readthedocs.io/en/latest/release-v7.1.1.html
2019-04-17 09:04:56 +02:00
Daniel Hahler
3768f1d7db Revert "also remove shebang with libexec/pyenv"
This reverts commit d352b4810d.
2019-03-07 22:38:15 +01:00
Daniel Hahler
d352b4810d also remove shebang with libexec/pyenv 2019-03-07 22:35:38 +01:00
Casey McGinty
83e5459cfb Remove shebang lines from scripts for performance
All scripts in libexec/ (excluding pyenv) are called through pyenv,
therefore the shebang lines are not necessary. On some systems this
provides a measurable increase in performance of the shell prompt.

Related to pyenv/pyenv-virtualenv#259
2019-03-07 22:15:14 +01:00
Daniel Hahler
4f21d9a2ea Fix abs_dirname for relative symlinks in same directory
Ref (abs_dirname in bats): https://github.com/sstephenson/bats/pull/224
Ref: https://github.com/rbenv/rbenv/pull/868

Fixes https://github.com/pyenv/pyenv/issues/580
2018-09-19 10:18:07 +02:00
26 changed files with 343 additions and 57 deletions

View File

@@ -23,9 +23,10 @@ dist:
osx_image: osx_image:
- xcode9.4 - xcode9.4
- xcode10 - xcode10
- xcode10.2
env: env:
- PYTHON_BUILD_VERSION=3.8-dev - PYTHON_BUILD_VERSION=3.8.0
- PYTHON_BUILD_VERSION=3.7.2 - PYTHON_BUILD_VERSION=3.7.2
before_install: before_install:
@@ -55,9 +56,11 @@ jobs:
# list, to prevent duplicate Linux builds. # list, to prevent duplicate Linux builds.
- os: linux - os: linux
osx_image: xcode9.4 osx_image: xcode9.4
- os: linux
osx_image: xcode10
allow_failures: allow_failures:
- env: PYTHON_BUILD_VERSION=3.8-dev - env: PYTHON_BUILD_VERSION=3.8.0
stages: stages:
- test shell - test shell

View File

@@ -1,5 +1,24 @@
## Version History ## Version History
## 1.2.14
* python-build: Add CPython 3.8.0 (#1416)
* python-build: Add Anaconda-2019.07 (#1382)
* python-build: Add Micropython 1.11 (#1395)
* python-build: Fix compatibility issues with Homebrew installed Tcl/Tk (#1397)
* pyenv-exec: Do not use `exec -a`, do not mangle PATH for system Python (#1169)
## 1.2.13
* python-build: Add CPython 3.7.4
* python-build: Add CPython 3.6.9
## 1.2.12
* python-build: Find zlib from Xcode or brew on Mojave (#1353)
* python-build: Add PyPy 7.1.1 (#1335)
* python-build: Add CPython 3.8.0b1
## 1.2.11 ## 1.2.11
* python-build: Fix `posix_close` name collision in 2.4 builds (#1321) * python-build: Fix `posix_close` name collision in 2.4 builds (#1321)

View File

@@ -169,6 +169,7 @@ We'd recommend to install pyenv-virtualenv as well if you have some plan to play
If you're on macOS, consider [installing with Homebrew](#homebrew-on-macos). If you're on macOS, consider [installing with Homebrew](#homebrew-on-macos).
If you're on Windows, consider using @kirankotari's [`pyenv-win`](https://github.com/pyenv-win/pyenv-win) fork. (`pyenv` does not work on windows outside the Windows Subsystem for Linux)
### The automatic installer ### The automatic installer

View File

@@ -41,12 +41,15 @@ else
# Use a subshell to avoid changing the current path # Use a subshell to avoid changing the current path
( (
while [ -n "$path" ]; do while [ -n "$path" ]; do
cd "${path%/*}" cd_path="${path%/*}"
local name="${path##*/}" if [[ "$cd_path" != "$path" ]]; then
cd "$cd_path"
fi
name="${path##*/}"
path="$(resolve_link "$name" || true)" path="$(resolve_link "$name" || true)"
done done
pwd echo "$PWD"
) )
} }
fi fi

View File

@@ -12,7 +12,7 @@
set -e set -e
[ -n "$PYENV_DEBUG" ] && set -x [ -n "$PYENV_DEBUG" ] && set -x
version="1.2.11" version="1.2.14"
git_revision="" git_revision=""
if cd "${BASH_SOURCE%/*}" 2>/dev/null && git remote -v 2>/dev/null | grep -q pyenv; then if cd "${BASH_SOURCE%/*}" 2>/dev/null && git remote -v 2>/dev/null | grep -q pyenv; then

View File

@@ -41,7 +41,8 @@ for script in "${scripts[@]}"; do
done done
shift 1 shift 1
# CPython's `sys.executable` requires the `PYENV_BIN_PATH` to be at the top of the `PATH`. if [ "${PYENV_BIN_PATH#${PYENV_ROOT}}" != "${PYENV_BIN_PATH}" ]; then
# https://github.com/pyenv/pyenv/issues/98 # Only add to $PATH for non-system version.
export PATH="${PYENV_BIN_PATH}:${PATH}" export PATH="${PYENV_BIN_PATH}:${PATH}"
exec -a "$PYENV_COMMAND" "$PYENV_COMMAND_PATH" "$@" fi
exec "$PYENV_COMMAND_PATH" "$@"

View File

@@ -60,20 +60,21 @@ resolve_link() {
} }
abs_dirname() { abs_dirname() {
local cwd="$(pwd)"
local path="$1" local path="$1"
# Use a subshell to avoid modifying the current path # Use a subshell to avoid changing the current path
( (
while [ -n "$path" ]; do while [ -n "$path" ]; do
cd "${path%/*}" cd_path="${path%/*}"
local name="${path##*/}" if [[ "$cd_path" != "$path" ]]; then
cd "$cd_path"
fi
name="${path##*/}"
path="$(resolve_link "$name" || true)" path="$(resolve_link "$name" || true)"
done done
pwd echo "$PWD"
) )
# cd "$cwd"
} }
capitalize() { capitalize() {
@@ -758,7 +759,10 @@ build_package_standard_build() {
local PACKAGE_CFLAGS="${package_var_name}_CFLAGS" local PACKAGE_CFLAGS="${package_var_name}_CFLAGS"
if [ "$package_var_name" = "PYTHON" ]; then if [ "$package_var_name" = "PYTHON" ]; then
use_homebrew_readline || use_freebsd_pkg ||true use_homebrew_readline || use_freebsd_pkg || true
if is_mac -ge 1014; then
use_xcode_sdk_zlib || use_homebrew_zlib || true
fi
fi fi
( if [ "${CFLAGS+defined}" ] || [ "${!PACKAGE_CFLAGS+defined}" ]; then ( if [ "${CFLAGS+defined}" ] || [ "${!PACKAGE_CFLAGS+defined}" ]; then
@@ -795,7 +799,7 @@ build_package_standard_install_with_bundled_gems() {
build_package_standard_install "$@" build_package_standard_install "$@"
} }
# Backword Compatibility for standard function # Backward Compatibility for standard function
build_package_standard() { build_package_standard() {
build_package_standard_build "$@" build_package_standard_build "$@"
build_package_standard_install "$@" build_package_standard_install "$@"
@@ -1004,7 +1008,9 @@ build_package_micropython() {
elif [ -z "${MAKE_OPTS+defined}" ]; then elif [ -z "${MAKE_OPTS+defined}" ]; then
MAKE_OPTS="-j $(num_cpu_cores)" MAKE_OPTS="-j $(num_cpu_cores)"
fi fi
{ cd ports/unix { cd mpy-cross
"$MAKE" $MAKE_OPTS
cd ../ports/unix
"$MAKE" $MAKE_OPTS axtls "$MAKE" $MAKE_OPTS axtls
"$MAKE" $MAKE_OPTS CFLAGS_EXTRA="-DMICROPY_PY_SYS_PATH_DEFAULT='\"${PREFIX_PATH}/lib/micropython\"'" "$MAKE" $MAKE_OPTS CFLAGS_EXTRA="-DMICROPY_PY_SYS_PATH_DEFAULT='\"${PREFIX_PATH}/lib/micropython\"'"
"$MAKE" install $MAKE_INSTALL_OPTS PREFIX="${PREFIX_PATH}" "$MAKE" install $MAKE_INSTALL_OPTS PREFIX="${PREFIX_PATH}"
@@ -1627,6 +1633,22 @@ build_package_verify_openssl() {
' "$(basename "$(type -p yum apt-get | head -1)")" >&4 2>&1 ' "$(basename "$(type -p yum apt-get | head -1)")" >&4 2>&1
} }
use_homebrew_zlib() {
local brew_zlib="$(brew --prefix zlib 2>/dev/null || true)"
if [ -d "$brew_zlib" ]; then
echo "python-build: use zlib from homebrew"
export CFLAGS="-I${brew_zlib} ${CFLAGS}"
fi
}
use_xcode_sdk_zlib() {
local xc_sdk_path="$(xcrun --show-sdk-path 2>/dev/null || true)"
if [ -d "$xc_sdk_path" ]; then
echo "python-build: use zlib from xcode sdk"
export CFLAGS="-I${xc_sdk_path}/usr/include ${CFLAGS}"
fi
}
# Ensure that directories listed in LDFLAGS exist # Ensure that directories listed in LDFLAGS exist
build_package_ldflags_dirs() { build_package_ldflags_dirs() {
local arg dir local arg dir
@@ -1888,6 +1910,11 @@ build_package_verify_py38() {
build_package_verify_py37 "$1" "${2:-3.8}" build_package_verify_py37 "$1" "${2:-3.8}"
} }
# Post-install check for Python 3.9.x
build_package_verify_py39() {
build_package_verify_py38 "$1" "${2:-3.9}"
}
# Copy Tools/gdb/libpython.py to pythonX.Y-gdb.py (#1190) # Copy Tools/gdb/libpython.py to pythonX.Y-gdb.py (#1190)
build_package_copy_python_gdb() { build_package_copy_python_gdb() {
if [ -e "$BUILD_PATH/$1/Tools/gdb/libpython.py" ]; then if [ -e "$BUILD_PATH/$1/Tools/gdb/libpython.py" ]; then
@@ -2195,6 +2222,19 @@ if [[ "$PYTHON_CONFIGURE_OPTS" != *"--enable-unicode="* ]]; then
fi fi
fi fi
# regex_to_match="(--with-tcltk-libs='([^']+)')"
if [[ "$PYTHON_CONFIGURE_OPTS" =~ (--with-tcltk-libs=\'([^\']+)\') ]]; then
tcltk_match="${BASH_REMATCH[1]}"
tcltk_match_quoted="${tcltk_match//--with-tcltk-libs=/}"
# remove it from PYTHON_CONFIGURE_OPTS since it will mess up compile
PYTHON_CONFIGURE_OPTS="${PYTHON_CONFIGURE_OPTS//$tcltk_match/}"
# having issues passing the single quoted part, couldnt pass as single var and still work
package_option python configure "--with-tcltk-libs='${tcltk_match_quoted}'"
unset tcltk_match
unset tcltk_match_quoted
fi
# Unset `PIP_REQUIRE_VENV` during build (#216) # Unset `PIP_REQUIRE_VENV` during build (#216)
unset PIP_REQUIRE_VENV unset PIP_REQUIRE_VENV
unset PIP_REQUIRE_VIRTUALENV unset PIP_REQUIRE_VIRTUALENV

View File

@@ -0,0 +1,9 @@
#require_gcc
prefer_openssl11
install_package "openssl-1.1.0j" "https://www.openssl.org/source/openssl-1.1.0j.tar.gz#31bec6c203ce1a8e93d5994f4ed304c63ccf07676118b6634edded12ad1b3246" mac_openssl --if has_broken_mac_openssl
install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline
if has_tar_xz_support; then
install_package "Python-3.5.8rc1" "https://www.python.org/ftp/python/3.5.8/Python-3.5.8rc1.tar.xz#4ebf6c2b432064d68cd6804fde7bb6a2df567776b74205d9636a5ea6e4f3122a" ldflags_dirs standard verify_py35 ensurepip
else
install_package "Python-3.5.8rc1" "https://www.python.org/ftp/python/3.5.8/Python-3.5.8rc1.tgz#fd80351d0f2a08f102e33eb1b24e6dfb8c755f11928abc05ccae480321ffd13a" ldflags_dirs standard verify_py35 ensurepip
fi

View File

@@ -0,0 +1,9 @@
#require_gcc
prefer_openssl11
install_package "openssl-1.1.0j" "https://www.openssl.org/source/openssl-1.1.0j.tar.gz#31bec6c203ce1a8e93d5994f4ed304c63ccf07676118b6634edded12ad1b3246" mac_openssl --if has_broken_mac_openssl
install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline
if has_tar_xz_support; then
install_package "Python-3.6.9" "https://www.python.org/ftp/python/3.6.9/Python-3.6.9.tar.xz#5e2f5f554e3f8f7f0296f7e73d8600c4e9acbaee6b2555b83206edf5153870da" ldflags_dirs standard verify_py37 copy_python_gdb ensurepip
else
install_package "Python-3.6.9" "https://www.python.org/ftp/python/3.6.9/Python-3.6.9.tgz#47fc92a1dcb946b9ed0abc311d3767b7215c54e655b17fd1d3f9b538195525aa" ldflags_dirs standard verify_py37 copy_python_gdb ensurepip
fi

View File

@@ -0,0 +1,10 @@
#require_gcc
prefer_openssl11
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
install_package "openssl-1.1.0j" "https://www.openssl.org/source/openssl-1.1.0j.tar.gz#31bec6c203ce1a8e93d5994f4ed304c63ccf07676118b6634edded12ad1b3246" mac_openssl --if has_broken_mac_openssl
install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline
if has_tar_xz_support; then
install_package "Python-3.7.4" "https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tar.xz#fb799134b868199930b75f26678f18932214042639cd52b16da7fd134cd9b13f" ldflags_dirs standard verify_py37 copy_python_gdb ensurepip
else
install_package "Python-3.7.4" "https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz#d63e63e14e6d29e17490abbe6f7d17afb3db182dbd801229f14e55f4157c4ba3" ldflags_dirs standard verify_py37 copy_python_gdb ensurepip
fi

View File

@@ -0,0 +1,10 @@
#require_gcc
prefer_openssl11
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
install_package "openssl-1.1.0j" "https://www.openssl.org/source/openssl-1.1.0j.tar.gz#31bec6c203ce1a8e93d5994f4ed304c63ccf07676118b6634edded12ad1b3246" mac_openssl --if has_broken_mac_openssl
install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline
if has_tar_xz_support; then
install_package "Python-3.7.5rc1" "https://www.python.org/ftp/python/3.7.5/Python-3.7.5rc1.tar.xz#6aea4110c8cb9c828b149041f03b01a1247497b8b587b39e5857cdc53179373a" ldflags_dirs standard verify_py37 copy_python_gdb ensurepip
else
install_package "Python-3.7.5rc1" "https://www.python.org/ftp/python/3.7.5/Python-3.7.5rc1.tgz#161aa1ae37feadb21a0964bfe02e0136a15e246a9201fca09fbfce63723771ed" ldflags_dirs standard verify_py37 copy_python_gdb ensurepip
fi

View File

@@ -3,4 +3,4 @@ prefer_openssl11
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
install_package "openssl-1.1.0j" "https://www.openssl.org/source/openssl-1.1.0j.tar.gz#31bec6c203ce1a8e93d5994f4ed304c63ccf07676118b6634edded12ad1b3246" mac_openssl --if has_broken_mac_openssl install_package "openssl-1.1.0j" "https://www.openssl.org/source/openssl-1.1.0j.tar.gz#31bec6c203ce1a8e93d5994f4ed304c63ccf07676118b6634edded12ad1b3246" mac_openssl --if has_broken_mac_openssl
install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline
install_git "Python-3.8-dev" "https://github.com/python/cpython" master standard verify_py38 copy_python_gdb ensurepip install_git "Python-3.8-dev" "https://github.com/python/cpython" "3.8" standard verify_py38 copy_python_gdb ensurepip

View File

@@ -0,0 +1,10 @@
#require_gcc
prefer_openssl11
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
install_package "openssl-1.1.0j" "https://www.openssl.org/source/openssl-1.1.0j.tar.gz#31bec6c203ce1a8e93d5994f4ed304c63ccf07676118b6634edded12ad1b3246" mac_openssl --if has_broken_mac_openssl
install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline
if has_tar_xz_support; then
install_package "Python-3.8.0" "https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tar.xz#b356244e13fb5491da890b35b13b2118c3122977c2cd825e3eb6e7d462030d84" ldflags_dirs standard verify_py38 copy_python_gdb ensurepip
else
install_package "Python-3.8.0" "https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tgz#f1069ad3cae8e7ec467aa98a6565a62a48ef196cb8f1455a245a08db5e1792df" ldflags_dirs standard verify_py38 copy_python_gdb ensurepip
fi

View File

@@ -0,0 +1,6 @@
#require_gcc
prefer_openssl11
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
install_package "openssl-1.1.0j" "https://www.openssl.org/source/openssl-1.1.0j.tar.gz#31bec6c203ce1a8e93d5994f4ed304c63ccf07676118b6634edded12ad1b3246" mac_openssl --if has_broken_mac_openssl
install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline
install_git "Python-3.9-dev" "https://github.com/python/cpython" master standard verify_py39 copy_python_gdb ensurepip

View File

@@ -0,0 +1,19 @@
case "$(anaconda_architecture 2>/dev/null || true)" in
"Linux-ppc64le" )
install_script "Anaconda2-2019.07-Linux-ppc64le" "https://repo.continuum.io/archive/Anaconda2-2019.07-Linux-ppc64le.sh#ee7f61dab233cdd0acb376ad55e977b16fdc03602f87a98dafb10d5fe9f5a190" "anaconda" verify_py27
;;
"Linux-x86_64" )
install_script "Anaconda2-2019.07-Linux-x86_64" "https://repo.continuum.io/archive/Anaconda2-2019.07-Linux-x86_64.sh#189e16e7adf9ba4b7b7d06ecdc10ce4ad4153e5e3505b9331f3d142243e18e97" "anaconda" verify_py27
;;
"MacOSX-x86_64" )
install_script "Anaconda2-2019.07-MacOSX-x86_64" "https://repo.continuum.io/archive/Anaconda2-2019.07-MacOSX-x86_64.sh#3e63919eed116826e683ed7d480d06517de79564788fbc27cb8d8879697eb654" "anaconda" verify_py27
;;
* )
{ echo
colorize 1 "ERROR"
echo ": The binary distribution of Anaconda3 is not available for $(anaconda_architecture 2>/dev/null || true)."
echo
} >&2
exit 1
;;
esac

View File

@@ -0,0 +1,19 @@
case "$(anaconda_architecture 2>/dev/null || true)" in
"Linux-ppc64le" )
install_script "Anaconda3-2019.07-Linux-ppc64le" "https://repo.continuum.io/archive/Anaconda3-2019.07-Linux-ppc64le.sh#e788094f7a18bfe14038accb26c8809a81291ed97f1fce29425f366aa8105548" "anaconda" verify_py37
;;
"Linux-x86_64" )
install_script "Anaconda3-2019.07-Linux-x86_64" "https://repo.continuum.io/archive/Anaconda3-2019.07-Linux-x86_64.sh#69581cf739365ec7fb95608eef694ba959d7d33b36eb961953f2b82cb25bdf5a" "anaconda" verify_py37
;;
"MacOSX-x86_64" )
install_script "Anaconda3-2019.07-MacOSX-x86_64" "https://repo.continuum.io/archive/Anaconda3-2019.07-MacOSX-x86_64.sh#dcbddbab37c5b5f3873fe24d2617a4325bc7da28c0cd1d23a2edc7f0ebe08b7d" "anaconda" verify_py37
;;
* )
{ echo
colorize 1 "ERROR"
echo ": The binary distribution of Anaconda3 is not available for $(anaconda_architecture 2>/dev/null || true)."
echo
} >&2
exit 1
;;
esac

View File

@@ -0,0 +1,5 @@
#require_gcc
has_tar_xz_support \
&& src="https://micropython.org/resources/source/micropython-1.11.tar.xz#c3d4918149e3b9427a318a8a78efb928f2b724123832f1feb4d7921af490269d" \
|| src="https://github.com/micropython/micropython/releases/download/v1.11/micropython-1.11.tar.gz#2edda4ffe283899af6d7b59dd0a0a59f8b845fe0f26017f1a180661338eca35f"
install_package micropython-1.11 "$src" micropython

View File

@@ -0,0 +1,47 @@
case "$(pypy_architecture 2>/dev/null || true)" in
"linux" )
if require_distro "Ubuntu 12.04" "Ubuntu 14.04" "Ubuntu 16.04" 1>/dev/null 2>&1; then
install_package "pypy2.7-v7.1.1-linux32" "https://bitbucket.org/pypy/pypy/downloads/pypy2.7-v7.1.1-linux32.tar.bz2#41ca390a76ca0d47b8353a0d6a20d5aab5fad8b0bb647b960d8c33e873d18ef5" "pypy" verify_py27 ensurepip
else
{ echo
colorize 1 "ERROR"
echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true)."
echo "try 'pypy2.7-7.1.1-src' to build from source."
echo
} >&2
exit 1
fi
;;
"linux64" )
if require_distro "Ubuntu 12.04" "Ubuntu 14.04" "Ubuntu 16.04" 1>/dev/null 2>&1; then
install_package "pypy2.7-v7.1.1-linux64" "https://bitbucket.org/pypy/pypy/downloads/pypy2.7-v7.1.1-linux64.tar.bz2#73b09ef0860eb9ad7997af3030b22909806a273d90786d78420926df53279d66" "pypy" verify_py27 ensurepip
else
install_package "pypy-7.1.1-linux_x86_64-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-7.1.1-linux_x86_64-portable.tar.bz2#d0b226d2dd656c622cee4e3e982225e1b346653823b49f736d8b0ddc06fd0c73" "pypy" verify_py27 ensurepip
fi
;;
"osx64" )
if require_osx_version "10.13"; then
install_package "pypy2.7-v7.1.1-osx64" "https://bitbucket.org/pypy/pypy/downloads/pypy2.7-v7.1.1-osx64.tar.bz2#31a17294dec96c2191885c776b4ee02112957dc874f7ba03e570537a77b78c35" "pypy" verify_py27 ensurepip
else
{ echo
colorize 1 "ERROR"
echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true), OS X < 10.13."
echo "try 'pypy2.7-7.1.1-src' to build from source."
echo
} >&2
exit 1
fi
;;
"win32" )
install_zip "pypy2.7-v7.1.1-win32" "https://bitbucket.org/pypy/pypy/downloads/pypy2.7-v7.1.1-win32.zip#9c59226311f216a181e70ee7b5aa4d9665a15d00f24ae02acec9af7d96355f63" "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 'pypy2.7-7.1.1-src' to build from source."
echo
} >&2
exit 1
;;
esac

View File

@@ -0,0 +1,4 @@
#require_gcc
prefer_openssl11
install_package "openssl-1.1.0j" "https://www.openssl.org/source/openssl-1.1.0j.tar.gz#31bec6c203ce1a8e93d5994f4ed304c63ccf07676118b6634edded12ad1b3246" mac_openssl --if has_broken_mac_openssl
install_package "pypy2.7-v7.1.1-src" "https://bitbucket.org/pypy/pypy/downloads/pypy2.7-v7.1.1-src.tar.bz2#5f06bede6d71dce8dfbfe797aab26c8e35cb990e16b826914652dc093ad74451" "pypy_builder" verify_py27 ensurepip

View File

@@ -0,0 +1,47 @@
case "$(pypy_architecture 2>/dev/null || true)" in
"linux" )
if require_distro "Ubuntu 12.04" "Ubuntu 14.04" "Ubuntu 16.04" 1>/dev/null 2>&1; then
install_package "pypy3.6-v7.1.1-linux32" "https://bitbucket.org/pypy/pypy/downloads/pypy3.6-v7.1.1-linux32.tar.bz2#cb11ef4b0df569c28390b1ee93029159e1b90bfbad98df6abd629d5203b2abd9" "pypy" verify_py27 ensurepip
else
{ echo
colorize 1 "ERROR"
echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true)."
echo "try 'pypy3.6-7.1.1-src' to build from source."
echo
} >&2
exit 1
fi
;;
"linux64" )
if require_distro "Ubuntu 12.04" "Ubuntu 14.04" "Ubuntu 16.04" 1>/dev/null 2>&1; then
install_package "pypy3.6-v7.1.1-linux64" "https://bitbucket.org/pypy/pypy/downloads/pypy3.6-v7.1.1-linux64.tar.bz2#8014f63b1a34b155548852c7bf73aab2d41ebddf2c8fb603dc9dd8509be93db0" "pypy" verify_py36 ensurepip
else
install_package "pypy3.6-7.1.1-beta-linux_x86_64-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy3.6-7.1.1-beta-linux_x86_64-portable.tar.bz2#82c878b61ad34fc2cf1686fa600a7a002d352e1b33a99a43007eec486ecd068e" "pypy" verify_py36 ensurepip
fi
;;
"osx64" )
if require_osx_version "10.13"; then
install_package "pypy3.6-v7.1.1-osx64" "https://bitbucket.org/pypy/pypy/downloads/pypy3.6-v7.1.1-osx64.tar.bz2#a5c2f2bfa2b4a4d29e8a67baab95699b169054066df218a14f171bb84a6df0c0" "pypy" verify_py36 ensurepip
else
{ echo
colorize 1 "ERROR"
echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true), OS X < 10.13."
echo "try 'pypy3.6-7.1.1-src' to build from source."
echo
} >&2
exit 1
fi
;;
"win32" )
install_zip "pypy3.6-v7.1.1-win32" "https://bitbucket.org/pypy/pypy/downloads/pypy3.6-v7.1.1-win32.zip#8b513b254de5f31890f5956569de9aec3a0a91d7aba72fc89d66901f4a8ccf49" "pypy" verify_py36 ensurepip
;;
* )
{ echo
colorize 1 "ERROR"
echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true)."
echo "try 'pypy3.6-7.1.1-src' to build from source."
echo
} >&2
exit 1
;;
esac

View File

@@ -0,0 +1,4 @@
#require_gcc
prefer_openssl11
install_package "openssl-1.1.0j" "https://www.openssl.org/source/openssl-1.1.0j.tar.gz#31bec6c203ce1a8e93d5994f4ed304c63ccf07676118b6634edded12ad1b3246" mac_openssl --if has_broken_mac_openssl
install_package "pypy3.6-v7.1.1-src" "https://bitbucket.org/pypy/pypy/downloads/pypy3.6-v7.1.1-src.tar.bz2#6a3ef876e3691a54f4cff045028ec3be94ab9beb2e99f051b83175302c1899a8" "pypy_builder" verify_py36 ensurepip

View File

@@ -65,7 +65,7 @@ assert_build_log() {
# pyenv/pyenv#1026 # pyenv/pyenv#1026
stub uname false false stub uname false false
stub uname '-s : echo Linux' stub uname '-s : echo Linux' '-s : echo Linux'
stub brew false stub brew false
stub_make_install stub_make_install
stub_make_install stub_make_install
@@ -95,7 +95,7 @@ OUT
# pyenv/pyenv#1026 # pyenv/pyenv#1026
stub uname false false stub uname false false
stub uname '-s : echo Linux' stub uname '-s : echo Linux' '-s : echo Linux'
stub brew false stub brew false
stub_make_install stub_make_install
stub_make_install stub_make_install
@@ -125,7 +125,7 @@ OUT
cached_tarball "yaml-0.1.6" cached_tarball "yaml-0.1.6"
cached_tarball "Python-3.6.2" cached_tarball "Python-3.6.2"
stub uname '-s : echo Linux' stub uname '-s : echo Linux' '-s : echo Linux'
stub brew false stub brew false
stub_make_install stub_make_install
stub_make_install stub_make_install
@@ -164,6 +164,7 @@ OUT
stub uname false false stub uname false false
stub uname '-s : echo Linux' stub uname '-s : echo Linux'
stub uname '-s : echo Darwin'
stub brew "--prefix libyaml : echo '$brew_libdir'" false stub brew "--prefix libyaml : echo '$brew_libdir'" false
stub_make_install stub_make_install
@@ -251,7 +252,7 @@ OUT
# yyuu/pyenv#257 # yyuu/pyenv#257
stub uname '-s : echo Darwin' stub uname '-s : echo Darwin'
stub uname '-s : echo Darwin' false stub uname '-s : echo Darwin' false '-s : echo Darwin'
stub sysctl false stub sysctl false
stub_make_install stub_make_install
@@ -282,7 +283,7 @@ OUT
# yyuu/pyenv#257 # yyuu/pyenv#257
stub uname '-s : echo Darwin' stub uname '-s : echo Darwin'
stub uname '-s : echo Darwin' false stub uname '-s : echo Darwin' false '-s : echo Darwin'
stub sysctl '-n hw.ncpu : echo 4' stub sysctl '-n hw.ncpu : echo 4'
stub_make_install stub_make_install
@@ -310,7 +311,7 @@ OUT
# pyenv/pyenv#1026 # pyenv/pyenv#1026
stub uname false false stub uname false false
stub uname '-s : echo FreeBSD' false stub uname '-s : echo FreeBSD' false false
stub sysctl '-n hw.ncpu : echo 1' stub sysctl '-n hw.ncpu : echo 1'
stub_make_install stub_make_install
@@ -336,7 +337,7 @@ OUT
cached_tarball "Python-3.6.2" cached_tarball "Python-3.6.2"
# pyenv/pyenv#1026 # pyenv/pyenv#1026
stub uname false false stub uname false false false
stub uname '-s : echo Linux' stub uname '-s : echo Linux'
stub_make_install stub_make_install
@@ -362,7 +363,7 @@ OUT
cached_tarball "Python-3.6.2" cached_tarball "Python-3.6.2"
# pyenv/pyenv#1026 # pyenv/pyenv#1026
stub uname false false stub uname false false false
stub uname '-s : echo Linux' stub uname '-s : echo Linux'
stub_make_install stub_make_install
@@ -399,7 +400,7 @@ OUT
stub uname "-s : echo FreeBSD" "-r : echo 9.1" false stub uname "-s : echo FreeBSD" "-r : echo 9.1" false
# pyenv/pyenv#1026 # pyenv/pyenv#1026
stub uname false false stub uname false false false
MAKE=gmake stub_make_install MAKE=gmake stub_make_install
@@ -416,7 +417,7 @@ OUT
stub uname "-s : echo FreeBSD" "-r : echo 10.0-RELEASE" false stub uname "-s : echo FreeBSD" "-r : echo 10.0-RELEASE" false
# pyenv/pyenv#1026 # pyenv/pyenv#1026
stub uname false false stub uname false false false
stub_make_install stub_make_install
@@ -432,7 +433,7 @@ OUT
stub uname "-s : echo FreeBSD" "-r : echo 11.0-RELEASE" false stub uname "-s : echo FreeBSD" "-r : echo 11.0-RELEASE" false
# pyenv/pyenv#1026 # pyenv/pyenv#1026
stub uname false false stub uname false false false
stub_make_install stub_make_install
@@ -458,6 +459,7 @@ CONF
# yyuu/pyenv#257 # yyuu/pyenv#257
stub uname '-s : echo Linux' stub uname '-s : echo Linux'
stub uname '-s : echo Linux' stub uname '-s : echo Linux'
stub uname '-s : echo Linux'
export PYTHON_CONFIGURE="${TMP}/custom-configure" export PYTHON_CONFIGURE="${TMP}/custom-configure"
run_inline_definition <<DEF run_inline_definition <<DEF

View File

@@ -64,9 +64,11 @@ DEF
cd "$INSTALL_ROOT" cd "$INSTALL_ROOT"
# pyenv/pyenv#1026 # pyenv/pyenv#1026
stub uname false '-s : echo Darwin' false '-s : echo Darwin' stub uname false '-s : echo Darwin' false '-s : echo Darwin' '-s : echo Darwin'
stub sw_vers '-productVersion : echo 10.10' stub sw_vers '-productVersion : echo 10.10'
stub sw_vers '-productVersion : echo 10.10'
stub sw_vers '-productVersion : echo 10.10'
stub sw_vers '-productVersion : echo 10.10' stub sw_vers '-productVersion : echo 10.10'
stub cc 'false' stub cc 'false'
stub brew 'false' stub brew 'false'

View File

@@ -22,6 +22,7 @@ gsettings
gio-querymodules gio-querymodules
glib-compile-resources glib-compile-resources
glib-compile-schemas glib-compile-schemas
infocmp
# libpng # libpng
libpng-config libpng-config
# libxml2 # libxml2

View File

@@ -78,32 +78,38 @@ ${PYENV_ROOT}/versions/3.4/bin/python
OUT OUT
} }
@test "supports python -S <cmd>" { @test "sys.executable with system version (#98)" {
export PYENV_VERSION="3.4" system_python=$(which python)
# emulate `python -S' behavior PYENV_VERSION="custom"
create_executable "python" <<SH create_executable "python" ""
#!$BASH unset PYENV_VERSION
if [[ \$1 == "-S"* ]]; then
found="\$(PATH="\${PYTHONPATH:-\$PATH}" which \$2)"
# assert that the found executable has python for shebang
if head -1 "\$found" | grep python >/dev/null; then
\$BASH "\$found"
else
echo "python: no Python script found in input (LoadError)" >&2
exit 1
fi
else
echo 'python 3.4 (pyenv test)'
fi
SH
create_executable "fab" <<SH
#!/usr/bin/env python
echo hello fab
SH
pyenv-rehash pyenv-rehash
run python -S fab run pyenv-exec python -c 'import sys; print(sys.executable)'
assert_success "hello fab" assert_success "${system_python}"
}
@test '$PATH is not modified with system Python' {
# Create a wrapper executable that verifies PATH.
PYENV_VERSION="custom"
create_executable "python" '[[ "$PATH" == "${PYENV_TEST_DIR}/root/versions/custom/bin:"* ]] || { echo "unexpected:$PATH"; exit 2;}'
unset PYENV_VERSION
pyenv-rehash
# Path is not modified with system Python.
run pyenv-exec python -c 'import os; print(os.getenv("PATH"))'
assert_success "$PATH"
# Path is modified with custom Python.
PYENV_VERSION=custom run pyenv-exec python
assert_success
# Path is modified with custom:system Python.
PYENV_VERSION=custom:system run pyenv-exec python
assert_success
# Path is not modified with system:custom Python.
PYENV_VERSION=system:custom run pyenv-exec python -c 'import os; print(os.getenv("PATH"))'
assert_success "$PATH"
} }

View File

@@ -28,3 +28,12 @@ load test_helper
PYENV_FILE_ARG="${PYENV_TEST_DIR}/dir2/symlink.py" run pyenv echo PYENV_DIR PYENV_FILE_ARG="${PYENV_TEST_DIR}/dir2/symlink.py" run pyenv echo PYENV_DIR
assert_output "${PYENV_TEST_DIR}/dir1" assert_output "${PYENV_TEST_DIR}/dir1"
} }
@test "should handle relative symlinks for file argument (#580)" {
mkdir -p "${PYENV_TEST_DIR}"
cd "${PYENV_TEST_DIR}"
touch file.py
ln -s file.py symlink.py
PYENV_FILE_ARG="symlink.py" run pyenv echo PYENV_DIR
assert_output "${PYENV_TEST_DIR}"
}