mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-08 11:33:49 -05:00
Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d6d6bc8bb0 | ||
|
|
a0a5822785 | ||
|
|
3cfe81a3f8 | ||
|
|
f3d008fddd | ||
|
|
4039709dfe | ||
|
|
38de38e3d5 | ||
|
|
908d57d677 | ||
|
|
9fc7ef3a17 | ||
|
|
ecd67c8223 | ||
|
|
31b7e1c390 | ||
|
|
8a56fe641f | ||
|
|
b7f4ace335 | ||
|
|
a7cba17fb7 | ||
|
|
a71e590a44 | ||
|
|
3798638a6a | ||
|
|
e29d2b666b | ||
|
|
c9da22d559 | ||
|
|
8bebdb7f1a | ||
|
|
6563b64d0b | ||
|
|
eefdc57562 | ||
|
|
0aeeb6fdcb | ||
|
|
b5547afbc8 |
@@ -26,7 +26,7 @@ osx_image:
|
||||
- xcode10.2
|
||||
|
||||
env:
|
||||
- PYTHON_BUILD_VERSION=3.8-dev
|
||||
- PYTHON_BUILD_VERSION=3.8.0
|
||||
- PYTHON_BUILD_VERSION=3.7.2
|
||||
|
||||
before_install:
|
||||
@@ -60,7 +60,7 @@ jobs:
|
||||
osx_image: xcode10
|
||||
|
||||
allow_failures:
|
||||
- env: PYTHON_BUILD_VERSION=3.8-dev
|
||||
- env: PYTHON_BUILD_VERSION=3.8.0
|
||||
|
||||
stages:
|
||||
- test shell
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
## 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
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
version="1.2.13"
|
||||
version="1.2.14"
|
||||
git_revision=""
|
||||
|
||||
if cd "${BASH_SOURCE%/*}" 2>/dev/null && git remote -v 2>/dev/null | grep -q pyenv; then
|
||||
|
||||
@@ -41,7 +41,8 @@ for script in "${scripts[@]}"; do
|
||||
done
|
||||
|
||||
shift 1
|
||||
# CPython's `sys.executable` requires the `PYENV_BIN_PATH` to be at the top of the `PATH`.
|
||||
# https://github.com/pyenv/pyenv/issues/98
|
||||
export PATH="${PYENV_BIN_PATH}:${PATH}"
|
||||
exec -a "$PYENV_COMMAND" "$PYENV_COMMAND_PATH" "$@"
|
||||
if [ "${PYENV_BIN_PATH#${PYENV_ROOT}}" != "${PYENV_BIN_PATH}" ]; then
|
||||
# Only add to $PATH for non-system version.
|
||||
export PATH="${PYENV_BIN_PATH}:${PATH}"
|
||||
fi
|
||||
exec "$PYENV_COMMAND_PATH" "$@"
|
||||
|
||||
@@ -799,7 +799,7 @@ build_package_standard_install_with_bundled_gems() {
|
||||
build_package_standard_install "$@"
|
||||
}
|
||||
|
||||
# Backword Compatibility for standard function
|
||||
# Backward Compatibility for standard function
|
||||
build_package_standard() {
|
||||
build_package_standard_build "$@"
|
||||
build_package_standard_install "$@"
|
||||
@@ -1008,7 +1008,9 @@ build_package_micropython() {
|
||||
elif [ -z "${MAKE_OPTS+defined}" ]; then
|
||||
MAKE_OPTS="-j $(num_cpu_cores)"
|
||||
fi
|
||||
{ cd ports/unix
|
||||
{ cd mpy-cross
|
||||
"$MAKE" $MAKE_OPTS
|
||||
cd ../ports/unix
|
||||
"$MAKE" $MAKE_OPTS axtls
|
||||
"$MAKE" $MAKE_OPTS CFLAGS_EXTRA="-DMICROPY_PY_SYS_PATH_DEFAULT='\"${PREFIX_PATH}/lib/micropython\"'"
|
||||
"$MAKE" install $MAKE_INSTALL_OPTS PREFIX="${PREFIX_PATH}"
|
||||
@@ -2220,6 +2222,19 @@ if [[ "$PYTHON_CONFIGURE_OPTS" != *"--enable-unicode="* ]]; then
|
||||
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
|
||||
unset PIP_REQUIRE_VIRTUALENV
|
||||
|
||||
9
plugins/python-build/share/python-build/3.5.8rc1
Normal file
9
plugins/python-build/share/python-build/3.5.8rc1
Normal 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
|
||||
10
plugins/python-build/share/python-build/3.7.5rc1
Normal file
10
plugins/python-build/share/python-build/3.7.5rc1
Normal 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
|
||||
10
plugins/python-build/share/python-build/3.8.0
Normal file
10
plugins/python-build/share/python-build/3.8.0
Normal 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
|
||||
19
plugins/python-build/share/python-build/anaconda2-2019.07
Normal file
19
plugins/python-build/share/python-build/anaconda2-2019.07
Normal 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
|
||||
19
plugins/python-build/share/python-build/anaconda3-2019.07
Normal file
19
plugins/python-build/share/python-build/anaconda3-2019.07
Normal 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
|
||||
5
plugins/python-build/share/python-build/micropython-1.11
Normal file
5
plugins/python-build/share/python-build/micropython-1.11
Normal 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
|
||||
@@ -78,32 +78,38 @@ ${PYENV_ROOT}/versions/3.4/bin/python
|
||||
OUT
|
||||
}
|
||||
|
||||
@test "supports python -S <cmd>" {
|
||||
export PYENV_VERSION="3.4"
|
||||
@test "sys.executable with system version (#98)" {
|
||||
system_python=$(which python)
|
||||
|
||||
# emulate `python -S' behavior
|
||||
create_executable "python" <<SH
|
||||
#!$BASH
|
||||
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_VERSION="custom"
|
||||
create_executable "python" ""
|
||||
unset PYENV_VERSION
|
||||
|
||||
pyenv-rehash
|
||||
run python -S fab
|
||||
assert_success "hello fab"
|
||||
run pyenv-exec python -c 'import sys; print(sys.executable)'
|
||||
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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user