mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-15 06:43:53 -05:00
Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
193e64b6b2 | ||
|
|
5ba585769b | ||
|
|
c9268bb0dc | ||
|
|
5ddc14704c | ||
|
|
5fcb4cf0bf | ||
|
|
0f288f2462 | ||
|
|
0c81c97926 | ||
|
|
5ff089de9c | ||
|
|
459725df3c | ||
|
|
ec3b7d815d | ||
|
|
afe86aef52 | ||
|
|
461ae27a19 | ||
|
|
c0f691fc57 | ||
|
|
ffc899475a | ||
|
|
57d1c9d6be | ||
|
|
9d488c9760 | ||
|
|
3db1ac13d2 | ||
|
|
880fa46156 | ||
|
|
24ad375a35 | ||
|
|
ce671398f8 |
11
CHANGELOG.md
11
CHANGELOG.md
@@ -1,5 +1,16 @@
|
|||||||
## Version History
|
## Version History
|
||||||
|
|
||||||
|
### 20150901
|
||||||
|
|
||||||
|
* python-build: Add CPython 3.5.0 release candidates; 3.5.0rc1 and 3.5.0rc2
|
||||||
|
* python-build: Disabled `_FORTITY_SOURCE` to fix CPython >= 2.4, <= 2.4.3 builds (#422)
|
||||||
|
* python-build: Removed CPython 3.5.0 betas
|
||||||
|
* python-build: Add miniconda-3.10.1 and miniconda3-3.10.1 (#414)
|
||||||
|
* python-build: Add PyPy 2.6.1 (#433)
|
||||||
|
* python-build: Add PyPy-STM 2.3 and 2.5.1 (#428)
|
||||||
|
* python-build: Ignore user's site-packages on ensurepip/get-pip (#411)
|
||||||
|
* pyenv: Import recent changes from ruby-build v20150818
|
||||||
|
|
||||||
#### 20150719
|
#### 20150719
|
||||||
|
|
||||||
* python-build: Add CPython `3.6-dev` (#413)
|
* python-build: Add CPython `3.6-dev` (#413)
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
set -e
|
set -e
|
||||||
[ -n "$PYENV_DEBUG" ] && set -x
|
[ -n "$PYENV_DEBUG" ] && set -x
|
||||||
|
|
||||||
version="20150719"
|
version="20150901"
|
||||||
|
|
||||||
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)"
|
||||||
|
|||||||
@@ -47,8 +47,7 @@ fi
|
|||||||
eval "$(python-build --lib)"
|
eval "$(python-build --lib)"
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
# We can remove the sed fallback once pyenv 0.4.0 is widely available.
|
pyenv-help install 2>/dev/null
|
||||||
pyenv-help install 2>/dev/null || sed -ne '/^#/!q;s/.//;s/.//;1,4d;p' < "$0"
|
|
||||||
[ -z "$1" ] || exit "$1"
|
[ -z "$1" ] || exit "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,8 +18,7 @@ if [ "$1" = "--complete" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
# We can remove the sed fallback once pyenv 0.4.0 is widely available
|
pyenv-help uninstall 2>/dev/null
|
||||||
pyenv-help uninstall 2>/dev/null || sed -ne '/^#/!q;s/.//;s/.//;1,4d;p' < "$0"
|
|
||||||
[ -z "$1" ] || exit "$1"
|
[ -z "$1" ] || exit "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
# -g/--debug Build a debug version
|
# -g/--debug Build a debug version
|
||||||
#
|
#
|
||||||
|
|
||||||
PYTHON_BUILD_VERSION="20150519"
|
PYTHON_BUILD_VERSION="20150818"
|
||||||
|
|
||||||
set -E
|
set -E
|
||||||
exec 3<&2 # preserve original stderr at fd 3
|
exec 3<&2 # preserve original stderr at fd 3
|
||||||
@@ -890,10 +890,18 @@ pypy_architecture() {
|
|||||||
build_package_pypy() {
|
build_package_pypy() {
|
||||||
build_package_copy
|
build_package_copy
|
||||||
mkdir -p "${PREFIX_PATH}/bin" "${PREFIX_PATH}/lib"
|
mkdir -p "${PREFIX_PATH}/bin" "${PREFIX_PATH}/lib"
|
||||||
local pypy libpypy
|
local pypy libpypy python
|
||||||
shopt -s nullglob
|
shopt -s nullglob
|
||||||
for pypy in "bin/pypy"*; do
|
for pypy in "bin/pypy"*; do
|
||||||
( cd "${PREFIX_PATH}/bin" && ln -fs "$(basename "${pypy}")" "$(basename "${pypy}" | sed -e 's/pypy/python/')" )
|
case "${pypy##*/}" in
|
||||||
|
"pypy-stm" )
|
||||||
|
python="bin/python"
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
python="$(basename "${pypy}" | sed -e 's/pypy/python/')"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
( cd "${PREFIX_PATH}/bin" && ln -fs "${pypy##*/}" "${python##*/}" )
|
||||||
done
|
done
|
||||||
for libpypy in "bin/libpypy-c."*; do
|
for libpypy in "bin/libpypy-c."*; do
|
||||||
( cd "${PREFIX_PATH}/lib" && ln -fs "../bin/$(basename "${libpypy}")" "$(basename "${libpypy}")" )
|
( cd "${PREFIX_PATH}/lib" && ln -fs "../bin/$(basename "${libpypy}")" "$(basename "${libpypy}")" )
|
||||||
@@ -1124,12 +1132,13 @@ require_llvm() {
|
|||||||
local llvm_version="$1"
|
local llvm_version="$1"
|
||||||
if [ "$(uname -s)" = "Darwin" ] && [ "$(osx_version)" -ge 1010 ]; then
|
if [ "$(uname -s)" = "Darwin" ] && [ "$(osx_version)" -ge 1010 ]; then
|
||||||
if [[ "$PYTHON_CONFIGURE_OPTS" != *--llvm-* ]]; then
|
if [[ "$PYTHON_CONFIGURE_OPTS" != *--llvm-* ]]; then
|
||||||
if [ "$llvm_version" = "3.2" ]; then
|
case "$llvm_version" in
|
||||||
|
3.2 )
|
||||||
package_option python configure --prebuilt-name="llvm-3.2-x86_64-apple-darwin13.tar.bz2"
|
package_option python configure --prebuilt-name="llvm-3.2-x86_64-apple-darwin13.tar.bz2"
|
||||||
else
|
;;
|
||||||
local llvm_prefix="$(brew --prefix llvm 2>/dev/null || true)"
|
3.5 )
|
||||||
local llvm_config="${llvm_prefix}/bin/llvm-config"
|
local llvm_config="$(locate_llvm "$llvm_version")"
|
||||||
if [ -x "$llvm_config" ]; then
|
if [ -n "$llvm_config" ]; then
|
||||||
package_option python configure --llvm-config="$llvm_config"
|
package_option python configure --llvm-config="$llvm_config"
|
||||||
else
|
else
|
||||||
{ echo
|
{ echo
|
||||||
@@ -1140,14 +1149,29 @@ require_llvm() {
|
|||||||
colorize 1 "TO FIX THE PROBLEM"
|
colorize 1 "TO FIX THE PROBLEM"
|
||||||
echo ": Install Homebrew's llvm package with this"
|
echo ": Install Homebrew's llvm package with this"
|
||||||
echo -n "command: "
|
echo -n "command: "
|
||||||
colorize 4 "brew install llvm"
|
colorize 4 "brew tap homebrew/versions ; brew install llvm35"
|
||||||
echo
|
echo
|
||||||
} >&3
|
} >&3
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
locate_llvm() {
|
||||||
|
local llvm_version="$1"
|
||||||
|
local package llvm_config
|
||||||
|
shopt -s nullglob
|
||||||
|
for package in `brew list 2>/dev/null | grep "^llvm"`; do
|
||||||
|
llvm_config="$(echo "$(brew --prefix "$package")/bin/llvm-config"*)"
|
||||||
|
if [ -n "$llvm_config" ] && [[ "$("$llvm_config" --version)" = "$llvm_version"* ]]; then
|
||||||
|
echo "$llvm_config"
|
||||||
|
break
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
shopt -u nullglob
|
||||||
}
|
}
|
||||||
|
|
||||||
require_java() {
|
require_java() {
|
||||||
@@ -1552,7 +1576,7 @@ build_package_get_pip() {
|
|||||||
http get "${GET_PIP_URL}"
|
http get "${GET_PIP_URL}"
|
||||||
fi
|
fi
|
||||||
} 1> "${get_pip}"
|
} 1> "${get_pip}"
|
||||||
"${PYTHON_BIN}" "${get_pip}" ${GET_PIP_OPTS} 1>&4 2>&1 || {
|
"${PYTHON_BIN}" -s "${get_pip}" ${GET_PIP_OPTS} 1>&4 2>&1 || {
|
||||||
echo "error: failed to install pip via get-pip.py" >&2
|
echo "error: failed to install pip via get-pip.py" >&2
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
@@ -1565,7 +1589,7 @@ build_package_ensurepip() {
|
|||||||
ensurepip_opts="--altinstall"
|
ensurepip_opts="--altinstall"
|
||||||
fi
|
fi
|
||||||
# FIXME: `--altinstall` with `get-pip.py`
|
# FIXME: `--altinstall` with `get-pip.py`
|
||||||
"$PYTHON_BIN" -m ensurepip ${ensurepip_opts} 1>/dev/null 2>&1 || build_package_get_pip "$@" || return 1
|
"$PYTHON_BIN" -s -m ensurepip ${ensurepip_opts} 1>/dev/null 2>&1 || build_package_get_pip "$@" || return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
version() {
|
version() {
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
#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 "Python-3.5.0b1" "https://www.python.org/ftp/python/3.5.0/Python-3.5.0b1.tgz#1a4f57ad2ec0dd9b17703e13b46b96256b55b28d9e6529005e72f3d660e3f8a1" ldflags_dirs standard verify_py35 ensurepip
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
#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 "Python-3.5.0b2" "https://www.python.org/ftp/python/3.5.0/Python-3.5.0b2.tgz#3487dbdea5b78ec25be73321e5d54f56d76e8de22bf818e2a529eeb9feb34fe8" ldflags_dirs standard verify_py35 ensurepip
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
#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 "Python-3.5.0b3" "https://www.python.org/ftp/python/3.5.0/Python-3.5.0b3.tgz#5d1437676e75826963028eece5e84c31a8f6e4a781b86d860df89607ddb62f29" ldflags_dirs standard verify_py35 ensurepip
|
|
||||||
3
plugins/python-build/share/python-build/3.5.0rc1
Normal file
3
plugins/python-build/share/python-build/3.5.0rc1
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
#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 "Python-3.5.0rc1" "https://www.python.org/ftp/python/3.5.0/Python-3.5.0rc1.tgz#af300225b740401aaa3cb741568cd8a12fdb870b5f395ef8b1015dd45a6330bf" ldflags_dirs standard verify_py35 ensurepip
|
||||||
3
plugins/python-build/share/python-build/3.5.0rc2
Normal file
3
plugins/python-build/share/python-build/3.5.0rc2
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
#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 "Python-3.5.0rc2" "https://www.python.org/ftp/python/3.5.0/Python-3.5.0rc2.tgz#e6df2ab1bc368e0fa4dc471f36fef28312b9af76ee3828bf257ff03cb95e9041" ldflags_dirs standard verify_py35 ensurepip
|
||||||
19
plugins/python-build/share/python-build/miniconda-3.10.1
Normal file
19
plugins/python-build/share/python-build/miniconda-3.10.1
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
case "$(anaconda_architecture 2>/dev/null || true)" in
|
||||||
|
"Linux-x86" )
|
||||||
|
install_script "Miniconda-3.10.1-Linux-x86" "http://repo.continuum.io/miniconda/Miniconda-3.10.1-Linux-x86.sh#509ee56f1590705472fdac4a00aa7191f79a6a09daf4af088e92f93c648d815e" "miniconda" verify_py27
|
||||||
|
;;
|
||||||
|
"Linux-x86_64" )
|
||||||
|
install_script "Miniconda-3.10.1-Linux-x86_64" "http://repo.continuum.io/miniconda/Miniconda-3.10.1-Linux-x86_64.sh#363f56f5608d1552325549e7371fcf460c5ed45484eb300058e3b99c997808b5" "miniconda" verify_py27
|
||||||
|
;;
|
||||||
|
"MacOSX-x86_64" )
|
||||||
|
install_script "Miniconda-3.10.1-MacOSX-x86_64" "http://repo.continuum.io/miniconda/Miniconda-3.10.1-MacOSX-x86_64.sh#61a1e468a79cca45a518b1760033e7af89108bf88487afead79f96e3229b422a" "miniconda" verify_py27
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
{ echo
|
||||||
|
colorize 1 "ERROR"
|
||||||
|
echo ": The binary distribution of Miniconda is not available for $(anaconda_architecture 2>/dev/null || true)."
|
||||||
|
echo
|
||||||
|
} >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
19
plugins/python-build/share/python-build/miniconda3-3.10.1
Normal file
19
plugins/python-build/share/python-build/miniconda3-3.10.1
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
case "$(anaconda_architecture 2>/dev/null || true)" in
|
||||||
|
"Linux-x86" )
|
||||||
|
install_script "Miniconda3-3.10.1-Linux-x86" "http://repo.continuum.io/miniconda/Miniconda3-3.10.1-Linux-x86.sh#e9b751fa8bc5372731512e058fa3867ad9e54983b48d462b4c8f7a031953c2bc" "miniconda" verify_py34
|
||||||
|
;;
|
||||||
|
"Linux-x86_64" )
|
||||||
|
install_script "Miniconda3-3.10.1-Linux-x86_64" "http://repo.continuum.io/miniconda/Miniconda3-3.10.1-Linux-x86_64.sh#cbd86f49008319416d1e57f9ac43a42445058f06aaeebe5ab974769887a8628b" "miniconda" verify_py34
|
||||||
|
;;
|
||||||
|
"MacOSX-x86_64" )
|
||||||
|
install_script "Miniconda3-3.10.1-MacOSX-x86_64" "http://repo.continuum.io/miniconda/Miniconda3-3.10.1-MacOSX-x86_64.sh#58ba40cbd1cf5bba680f94321d2ce22685a2b06ad9252044f06a0018fe99bd62" "miniconda" verify_py34
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
{ echo
|
||||||
|
colorize 1 "ERROR"
|
||||||
|
echo ": The binary distribution of Miniconda is not available for $(anaconda_architecture 2>/dev/null || true)."
|
||||||
|
echo
|
||||||
|
} >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
Author: Dwayne Litzenberger <dlitz@dlitz.net>
|
||||||
|
Date: Sun Jun 22 01:15:05 2014 -0700
|
||||||
|
|
||||||
|
Patch configure to handle Ubuntu Bug#286334
|
||||||
|
|
||||||
|
Fixes this crash:
|
||||||
|
|
||||||
|
*** buffer overflow detected ***: ./python terminated
|
||||||
|
======= Backtrace: =========
|
||||||
|
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x37)[0x2b08765c9007]
|
||||||
|
|
||||||
|
diff --git configure configure
|
||||||
|
index 4838393..654de3f 100755
|
||||||
|
--- configure
|
||||||
|
+++ configure
|
||||||
|
@@ -20798,6 +20798,15 @@ done
|
||||||
|
echo "$as_me:$LINENO: result: done" >&5
|
||||||
|
echo "${ECHO_T}done" >&6
|
||||||
|
|
||||||
|
+case $ac_sys_system in
|
||||||
|
+Linux*)
|
||||||
|
+# Workaround for bug in Ubuntu 10.10 amd64 gcc-4.4
|
||||||
|
+# See http://orip.org/2008/10/building-python-235-on-ubuntu-intrepid.html
|
||||||
|
+# and Ubuntu Bug #286334
|
||||||
|
+BASECFLAGS="$BASECFLAGS -U_FORTIFY_SOURCE"
|
||||||
|
+;;
|
||||||
|
+esac
|
||||||
|
+
|
||||||
|
# generate output files
|
||||||
|
ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
|
||||||
|
|
||||||
|
diff --git configure.in configure.in
|
||||||
|
index ba7a011..060a73f 100644
|
||||||
|
--- configure.in
|
||||||
|
+++ configure.in
|
||||||
|
@@ -3072,6 +3072,15 @@ for dir in $SRCDIRS; do
|
||||||
|
done
|
||||||
|
AC_MSG_RESULT(done)
|
||||||
|
|
||||||
|
+case $ac_sys_system in
|
||||||
|
+Linux*)
|
||||||
|
+# Workaround for bug in Ubuntu 10.10 amd64 gcc-4.4
|
||||||
|
+# See http://orip.org/2008/10/building-python-235-on-ubuntu-intrepid.html
|
||||||
|
+# and Ubuntu Bug #286334
|
||||||
|
+BASECFLAGS="$BASECFLAGS -U_FORTIFY_SOURCE"
|
||||||
|
+;;
|
||||||
|
+esac
|
||||||
|
+
|
||||||
|
# generate output files
|
||||||
|
AC_CONFIG_FILES(Makefile.pre Modules/Setup.config)
|
||||||
|
AC_OUTPUT
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
Author: Dwayne Litzenberger <dlitz@dlitz.net>
|
||||||
|
Date: Sun Jun 22 01:15:05 2014 -0700
|
||||||
|
|
||||||
|
Patch configure to handle Ubuntu Bug#286334
|
||||||
|
|
||||||
|
Fixes this crash:
|
||||||
|
|
||||||
|
*** buffer overflow detected ***: ./python terminated
|
||||||
|
======= Backtrace: =========
|
||||||
|
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x37)[0x2b08765c9007]
|
||||||
|
|
||||||
|
diff --git configure configure
|
||||||
|
index 4838393..654de3f 100755
|
||||||
|
--- configure
|
||||||
|
+++ configure
|
||||||
|
@@ -20798,6 +20798,15 @@ done
|
||||||
|
echo "$as_me:$LINENO: result: done" >&5
|
||||||
|
echo "${ECHO_T}done" >&6
|
||||||
|
|
||||||
|
+case $ac_sys_system in
|
||||||
|
+Linux*)
|
||||||
|
+# Workaround for bug in Ubuntu 10.10 amd64 gcc-4.4
|
||||||
|
+# See http://orip.org/2008/10/building-python-235-on-ubuntu-intrepid.html
|
||||||
|
+# and Ubuntu Bug #286334
|
||||||
|
+BASECFLAGS="$BASECFLAGS -U_FORTIFY_SOURCE"
|
||||||
|
+;;
|
||||||
|
+esac
|
||||||
|
+
|
||||||
|
# generate output files
|
||||||
|
ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
|
||||||
|
|
||||||
|
diff --git configure.in configure.in
|
||||||
|
index ba7a011..060a73f 100644
|
||||||
|
--- configure.in
|
||||||
|
+++ configure.in
|
||||||
|
@@ -3072,6 +3072,15 @@ for dir in $SRCDIRS; do
|
||||||
|
done
|
||||||
|
AC_MSG_RESULT(done)
|
||||||
|
|
||||||
|
+case $ac_sys_system in
|
||||||
|
+Linux*)
|
||||||
|
+# Workaround for bug in Ubuntu 10.10 amd64 gcc-4.4
|
||||||
|
+# See http://orip.org/2008/10/building-python-235-on-ubuntu-intrepid.html
|
||||||
|
+# and Ubuntu Bug #286334
|
||||||
|
+BASECFLAGS="$BASECFLAGS -U_FORTIFY_SOURCE"
|
||||||
|
+;;
|
||||||
|
+esac
|
||||||
|
+
|
||||||
|
# generate output files
|
||||||
|
AC_CONFIG_FILES(Makefile.pre Modules/Setup.config)
|
||||||
|
AC_OUTPUT
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
Author: Dwayne Litzenberger <dlitz@dlitz.net>
|
||||||
|
Date: Sun Jun 22 01:15:05 2014 -0700
|
||||||
|
|
||||||
|
Patch configure to handle Ubuntu Bug#286334
|
||||||
|
|
||||||
|
Fixes this crash:
|
||||||
|
|
||||||
|
*** buffer overflow detected ***: ./python terminated
|
||||||
|
======= Backtrace: =========
|
||||||
|
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x37)[0x2b08765c9007]
|
||||||
|
|
||||||
|
diff --git configure configure
|
||||||
|
index 4838393..654de3f 100755
|
||||||
|
--- configure
|
||||||
|
+++ configure
|
||||||
|
@@ -20798,6 +20798,15 @@ done
|
||||||
|
echo "$as_me:$LINENO: result: done" >&5
|
||||||
|
echo "${ECHO_T}done" >&6
|
||||||
|
|
||||||
|
+case $ac_sys_system in
|
||||||
|
+Linux*)
|
||||||
|
+# Workaround for bug in Ubuntu 10.10 amd64 gcc-4.4
|
||||||
|
+# See http://orip.org/2008/10/building-python-235-on-ubuntu-intrepid.html
|
||||||
|
+# and Ubuntu Bug #286334
|
||||||
|
+BASECFLAGS="$BASECFLAGS -U_FORTIFY_SOURCE"
|
||||||
|
+;;
|
||||||
|
+esac
|
||||||
|
+
|
||||||
|
# generate output files
|
||||||
|
ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
|
||||||
|
|
||||||
|
diff --git configure.in configure.in
|
||||||
|
index ba7a011..060a73f 100644
|
||||||
|
--- configure.in
|
||||||
|
+++ configure.in
|
||||||
|
@@ -3072,6 +3072,15 @@ for dir in $SRCDIRS; do
|
||||||
|
done
|
||||||
|
AC_MSG_RESULT(done)
|
||||||
|
|
||||||
|
+case $ac_sys_system in
|
||||||
|
+Linux*)
|
||||||
|
+# Workaround for bug in Ubuntu 10.10 amd64 gcc-4.4
|
||||||
|
+# See http://orip.org/2008/10/building-python-235-on-ubuntu-intrepid.html
|
||||||
|
+# and Ubuntu Bug #286334
|
||||||
|
+BASECFLAGS="$BASECFLAGS -U_FORTIFY_SOURCE"
|
||||||
|
+;;
|
||||||
|
+esac
|
||||||
|
+
|
||||||
|
# generate output files
|
||||||
|
AC_CONFIG_FILES(Makefile.pre Modules/Setup.config)
|
||||||
|
AC_OUTPUT
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
Author: Dwayne Litzenberger <dlitz@dlitz.net>
|
||||||
|
Date: Sun Jun 22 01:15:05 2014 -0700
|
||||||
|
|
||||||
|
Patch configure to handle Ubuntu Bug#286334
|
||||||
|
|
||||||
|
Fixes this crash:
|
||||||
|
|
||||||
|
*** buffer overflow detected ***: ./python terminated
|
||||||
|
======= Backtrace: =========
|
||||||
|
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x37)[0x2b08765c9007]
|
||||||
|
|
||||||
|
diff --git configure configure
|
||||||
|
index 4838393..654de3f 100755
|
||||||
|
--- configure
|
||||||
|
+++ configure
|
||||||
|
@@ -20798,6 +20798,15 @@ done
|
||||||
|
echo "$as_me:$LINENO: result: done" >&5
|
||||||
|
echo "${ECHO_T}done" >&6
|
||||||
|
|
||||||
|
+case $ac_sys_system in
|
||||||
|
+Linux*)
|
||||||
|
+# Workaround for bug in Ubuntu 10.10 amd64 gcc-4.4
|
||||||
|
+# See http://orip.org/2008/10/building-python-235-on-ubuntu-intrepid.html
|
||||||
|
+# and Ubuntu Bug #286334
|
||||||
|
+BASECFLAGS="$BASECFLAGS -U_FORTIFY_SOURCE"
|
||||||
|
+;;
|
||||||
|
+esac
|
||||||
|
+
|
||||||
|
# generate output files
|
||||||
|
ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
|
||||||
|
|
||||||
|
diff --git configure.in configure.in
|
||||||
|
index ba7a011..060a73f 100644
|
||||||
|
--- configure.in
|
||||||
|
+++ configure.in
|
||||||
|
@@ -3072,6 +3072,15 @@ for dir in $SRCDIRS; do
|
||||||
|
done
|
||||||
|
AC_MSG_RESULT(done)
|
||||||
|
|
||||||
|
+case $ac_sys_system in
|
||||||
|
+Linux*)
|
||||||
|
+# Workaround for bug in Ubuntu 10.10 amd64 gcc-4.4
|
||||||
|
+# See http://orip.org/2008/10/building-python-235-on-ubuntu-intrepid.html
|
||||||
|
+# and Ubuntu Bug #286334
|
||||||
|
+BASECFLAGS="$BASECFLAGS -U_FORTIFY_SOURCE"
|
||||||
|
+;;
|
||||||
|
+esac
|
||||||
|
+
|
||||||
|
# generate output files
|
||||||
|
AC_CONFIG_FILES(Makefile.pre Modules/Setup.config)
|
||||||
|
AC_OUTPUT
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
diff -r -u ../Python-3.1/setup.py ./setup.py
|
||||||
|
--- ../Python-3.1/setup.py 2009-05-24 02:13:14.000000000 +0900
|
||||||
|
+++ ./setup.py 2015-08-15 13:29:18.300777605 +0900
|
||||||
|
@@ -14,6 +14,7 @@
|
||||||
|
from distutils.command.build_ext import build_ext
|
||||||
|
from distutils.command.install import install
|
||||||
|
from distutils.command.install_lib import install_lib
|
||||||
|
+from distutils.spawn import find_executable
|
||||||
|
|
||||||
|
# This global variable is used to hold the list of modules to be disabled.
|
||||||
|
disabled_module_list = []
|
||||||
|
@@ -293,10 +294,33 @@
|
||||||
|
return platform
|
||||||
|
return sys.platform
|
||||||
|
|
||||||
|
+ def add_multiarch_paths(self):
|
||||||
|
+ # Debian/Ubuntu multiarch support.
|
||||||
|
+ # https://wiki.ubuntu.com/MultiarchSpec
|
||||||
|
+ if not find_executable('dpkg-architecture'):
|
||||||
|
+ return
|
||||||
|
+ tmpfile = os.path.join(self.build_temp, 'multiarch')
|
||||||
|
+ if not os.path.exists(self.build_temp):
|
||||||
|
+ os.makedirs(self.build_temp)
|
||||||
|
+ ret = os.system(
|
||||||
|
+ 'dpkg-architecture -qDEB_HOST_MULTIARCH > %s 2> /dev/null' %
|
||||||
|
+ tmpfile)
|
||||||
|
+ try:
|
||||||
|
+ if ret >> 8 == 0:
|
||||||
|
+ with open(tmpfile) as fp:
|
||||||
|
+ multiarch_path_component = fp.readline().strip()
|
||||||
|
+ add_dir_to_list(self.compiler.library_dirs,
|
||||||
|
+ '/usr/lib/' + multiarch_path_component)
|
||||||
|
+ add_dir_to_list(self.compiler.include_dirs,
|
||||||
|
+ '/usr/include/' + multiarch_path_component)
|
||||||
|
+ finally:
|
||||||
|
+ os.unlink(tmpfile)
|
||||||
|
+
|
||||||
|
def detect_modules(self):
|
||||||
|
# Ensure that /usr/local is always used
|
||||||
|
add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
|
||||||
|
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
|
||||||
|
+ self.add_multiarch_paths()
|
||||||
|
|
||||||
|
# Add paths specified in the environment variables LDFLAGS and
|
||||||
|
# CPPFLAGS for header and library files.
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
diff -r -u ../Python-3.1/Lib/ssl.py ./Lib/ssl.py
|
||||||
|
--- ../Python-3.1/Lib/ssl.py 2009-06-04 18:42:55.000000000 +0900
|
||||||
|
+++ ./Lib/ssl.py 2015-08-15 13:12:22.270915671 +0900
|
||||||
|
@@ -60,8 +60,20 @@
|
||||||
|
|
||||||
|
from _ssl import SSLError
|
||||||
|
from _ssl import CERT_NONE, CERT_OPTIONAL, CERT_REQUIRED
|
||||||
|
-from _ssl import (PROTOCOL_SSLv2, PROTOCOL_SSLv3, PROTOCOL_SSLv23,
|
||||||
|
+from _ssl import (PROTOCOL_SSLv3, PROTOCOL_SSLv23,
|
||||||
|
PROTOCOL_TLSv1)
|
||||||
|
+_PROTOCOL_NAMES = {
|
||||||
|
+ PROTOCOL_TLSv1: "TLSv1",
|
||||||
|
+ PROTOCOL_SSLv23: "SSLv23",
|
||||||
|
+ PROTOCOL_SSLv3: "SSLv3",
|
||||||
|
+}
|
||||||
|
+try:
|
||||||
|
+ from _ssl import PROTOCOL_SSLv2
|
||||||
|
+ _SSLv2_IF_EXISTS = PROTOCOL_SSLv2
|
||||||
|
+except ImportError:
|
||||||
|
+ _SSLv2_IF_EXISTS = None
|
||||||
|
+else:
|
||||||
|
+ _PROTOCOL_NAMES[PROTOCOL_SSLv2] = "SSLv2"
|
||||||
|
from _ssl import RAND_status, RAND_egd, RAND_add
|
||||||
|
from _ssl import (
|
||||||
|
SSL_ERROR_ZERO_RETURN,
|
||||||
|
@@ -434,13 +446,4 @@
|
||||||
|
return DER_cert_to_PEM_cert(dercert)
|
||||||
|
|
||||||
|
def get_protocol_name(protocol_code):
|
||||||
|
- if protocol_code == PROTOCOL_TLSv1:
|
||||||
|
- return "TLSv1"
|
||||||
|
- elif protocol_code == PROTOCOL_SSLv23:
|
||||||
|
- return "SSLv23"
|
||||||
|
- elif protocol_code == PROTOCOL_SSLv2:
|
||||||
|
- return "SSLv2"
|
||||||
|
- elif protocol_code == PROTOCOL_SSLv3:
|
||||||
|
- return "SSLv3"
|
||||||
|
- else:
|
||||||
|
- return "<unknown>"
|
||||||
|
+ return _PROTOCOL_NAMES.get(protocol_code, '<unknown>')
|
||||||
|
diff -r -u ../Python-3.1/Modules/_ssl.c ./Modules/_ssl.c
|
||||||
|
--- ../Python-3.1/Modules/_ssl.c 2009-05-06 07:31:58.000000000 +0900
|
||||||
|
+++ ./Modules/_ssl.c 2015-08-15 13:13:23.812369742 +0900
|
||||||
|
@@ -62,7 +62,9 @@
|
||||||
|
};
|
||||||
|
|
||||||
|
enum py_ssl_version {
|
||||||
|
+#ifndef OPENSSL_NO_SSL2
|
||||||
|
PY_SSL_VERSION_SSL2,
|
||||||
|
+#endif
|
||||||
|
PY_SSL_VERSION_SSL3,
|
||||||
|
PY_SSL_VERSION_SSL23,
|
||||||
|
PY_SSL_VERSION_TLS1,
|
||||||
|
@@ -301,8 +303,10 @@
|
||||||
|
self->ctx = SSL_CTX_new(TLSv1_method()); /* Set up context */
|
||||||
|
else if (proto_version == PY_SSL_VERSION_SSL3)
|
||||||
|
self->ctx = SSL_CTX_new(SSLv3_method()); /* Set up context */
|
||||||
|
+#ifndef OPENSSL_NO_SSL2
|
||||||
|
else if (proto_version == PY_SSL_VERSION_SSL2)
|
||||||
|
self->ctx = SSL_CTX_new(SSLv2_method()); /* Set up context */
|
||||||
|
+#endif
|
||||||
|
else if (proto_version == PY_SSL_VERSION_SSL23)
|
||||||
|
self->ctx = SSL_CTX_new(SSLv23_method()); /* Set up context */
|
||||||
|
PySSL_END_ALLOW_THREADS
|
||||||
|
@@ -1693,8 +1697,10 @@
|
||||||
|
PY_SSL_CERT_REQUIRED);
|
||||||
|
|
||||||
|
/* protocol versions */
|
||||||
|
+#ifndef OPENSSL_NO_SSL2
|
||||||
|
PyModule_AddIntConstant(m, "PROTOCOL_SSLv2",
|
||||||
|
PY_SSL_VERSION_SSL2);
|
||||||
|
+#endif
|
||||||
|
PyModule_AddIntConstant(m, "PROTOCOL_SSLv3",
|
||||||
|
PY_SSL_VERSION_SSL3);
|
||||||
|
PyModule_AddIntConstant(m, "PROTOCOL_SSLv23",
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
diff -r -u ../Python-3.1/setup.py ./setup.py
|
||||||
|
--- ../Python-3.1/setup.py 2009-05-24 02:13:14.000000000 +0900
|
||||||
|
+++ ./setup.py 2015-08-15 13:29:18.300777605 +0900
|
||||||
|
@@ -14,6 +14,7 @@
|
||||||
|
from distutils.command.build_ext import build_ext
|
||||||
|
from distutils.command.install import install
|
||||||
|
from distutils.command.install_lib import install_lib
|
||||||
|
+from distutils.spawn import find_executable
|
||||||
|
|
||||||
|
# This global variable is used to hold the list of modules to be disabled.
|
||||||
|
disabled_module_list = []
|
||||||
|
@@ -293,10 +294,33 @@
|
||||||
|
return platform
|
||||||
|
return sys.platform
|
||||||
|
|
||||||
|
+ def add_multiarch_paths(self):
|
||||||
|
+ # Debian/Ubuntu multiarch support.
|
||||||
|
+ # https://wiki.ubuntu.com/MultiarchSpec
|
||||||
|
+ if not find_executable('dpkg-architecture'):
|
||||||
|
+ return
|
||||||
|
+ tmpfile = os.path.join(self.build_temp, 'multiarch')
|
||||||
|
+ if not os.path.exists(self.build_temp):
|
||||||
|
+ os.makedirs(self.build_temp)
|
||||||
|
+ ret = os.system(
|
||||||
|
+ 'dpkg-architecture -qDEB_HOST_MULTIARCH > %s 2> /dev/null' %
|
||||||
|
+ tmpfile)
|
||||||
|
+ try:
|
||||||
|
+ if ret >> 8 == 0:
|
||||||
|
+ with open(tmpfile) as fp:
|
||||||
|
+ multiarch_path_component = fp.readline().strip()
|
||||||
|
+ add_dir_to_list(self.compiler.library_dirs,
|
||||||
|
+ '/usr/lib/' + multiarch_path_component)
|
||||||
|
+ add_dir_to_list(self.compiler.include_dirs,
|
||||||
|
+ '/usr/include/' + multiarch_path_component)
|
||||||
|
+ finally:
|
||||||
|
+ os.unlink(tmpfile)
|
||||||
|
+
|
||||||
|
def detect_modules(self):
|
||||||
|
# Ensure that /usr/local is always used
|
||||||
|
add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
|
||||||
|
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
|
||||||
|
+ self.add_multiarch_paths()
|
||||||
|
|
||||||
|
# Add paths specified in the environment variables LDFLAGS and
|
||||||
|
# CPPFLAGS for header and library files.
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
diff -r -u ../Python-3.1/Lib/ssl.py ./Lib/ssl.py
|
||||||
|
--- ../Python-3.1/Lib/ssl.py 2009-06-04 18:42:55.000000000 +0900
|
||||||
|
+++ ./Lib/ssl.py 2015-08-15 13:12:22.270915671 +0900
|
||||||
|
@@ -60,8 +60,20 @@
|
||||||
|
|
||||||
|
from _ssl import SSLError
|
||||||
|
from _ssl import CERT_NONE, CERT_OPTIONAL, CERT_REQUIRED
|
||||||
|
-from _ssl import (PROTOCOL_SSLv2, PROTOCOL_SSLv3, PROTOCOL_SSLv23,
|
||||||
|
+from _ssl import (PROTOCOL_SSLv3, PROTOCOL_SSLv23,
|
||||||
|
PROTOCOL_TLSv1)
|
||||||
|
+_PROTOCOL_NAMES = {
|
||||||
|
+ PROTOCOL_TLSv1: "TLSv1",
|
||||||
|
+ PROTOCOL_SSLv23: "SSLv23",
|
||||||
|
+ PROTOCOL_SSLv3: "SSLv3",
|
||||||
|
+}
|
||||||
|
+try:
|
||||||
|
+ from _ssl import PROTOCOL_SSLv2
|
||||||
|
+ _SSLv2_IF_EXISTS = PROTOCOL_SSLv2
|
||||||
|
+except ImportError:
|
||||||
|
+ _SSLv2_IF_EXISTS = None
|
||||||
|
+else:
|
||||||
|
+ _PROTOCOL_NAMES[PROTOCOL_SSLv2] = "SSLv2"
|
||||||
|
from _ssl import RAND_status, RAND_egd, RAND_add
|
||||||
|
from _ssl import (
|
||||||
|
SSL_ERROR_ZERO_RETURN,
|
||||||
|
@@ -434,13 +446,4 @@
|
||||||
|
return DER_cert_to_PEM_cert(dercert)
|
||||||
|
|
||||||
|
def get_protocol_name(protocol_code):
|
||||||
|
- if protocol_code == PROTOCOL_TLSv1:
|
||||||
|
- return "TLSv1"
|
||||||
|
- elif protocol_code == PROTOCOL_SSLv23:
|
||||||
|
- return "SSLv23"
|
||||||
|
- elif protocol_code == PROTOCOL_SSLv2:
|
||||||
|
- return "SSLv2"
|
||||||
|
- elif protocol_code == PROTOCOL_SSLv3:
|
||||||
|
- return "SSLv3"
|
||||||
|
- else:
|
||||||
|
- return "<unknown>"
|
||||||
|
+ return _PROTOCOL_NAMES.get(protocol_code, '<unknown>')
|
||||||
|
diff -r -u ../Python-3.1/Modules/_ssl.c ./Modules/_ssl.c
|
||||||
|
--- ../Python-3.1/Modules/_ssl.c 2009-05-06 07:31:58.000000000 +0900
|
||||||
|
+++ ./Modules/_ssl.c 2015-08-15 13:13:23.812369742 +0900
|
||||||
|
@@ -62,7 +62,9 @@
|
||||||
|
};
|
||||||
|
|
||||||
|
enum py_ssl_version {
|
||||||
|
+#ifndef OPENSSL_NO_SSL2
|
||||||
|
PY_SSL_VERSION_SSL2,
|
||||||
|
+#endif
|
||||||
|
PY_SSL_VERSION_SSL3,
|
||||||
|
PY_SSL_VERSION_SSL23,
|
||||||
|
PY_SSL_VERSION_TLS1,
|
||||||
|
@@ -301,8 +303,10 @@
|
||||||
|
self->ctx = SSL_CTX_new(TLSv1_method()); /* Set up context */
|
||||||
|
else if (proto_version == PY_SSL_VERSION_SSL3)
|
||||||
|
self->ctx = SSL_CTX_new(SSLv3_method()); /* Set up context */
|
||||||
|
+#ifndef OPENSSL_NO_SSL2
|
||||||
|
else if (proto_version == PY_SSL_VERSION_SSL2)
|
||||||
|
self->ctx = SSL_CTX_new(SSLv2_method()); /* Set up context */
|
||||||
|
+#endif
|
||||||
|
else if (proto_version == PY_SSL_VERSION_SSL23)
|
||||||
|
self->ctx = SSL_CTX_new(SSLv23_method()); /* Set up context */
|
||||||
|
PySSL_END_ALLOW_THREADS
|
||||||
|
@@ -1693,8 +1697,10 @@
|
||||||
|
PY_SSL_CERT_REQUIRED);
|
||||||
|
|
||||||
|
/* protocol versions */
|
||||||
|
+#ifndef OPENSSL_NO_SSL2
|
||||||
|
PyModule_AddIntConstant(m, "PROTOCOL_SSLv2",
|
||||||
|
PY_SSL_VERSION_SSL2);
|
||||||
|
+#endif
|
||||||
|
PyModule_AddIntConstant(m, "PROTOCOL_SSLv3",
|
||||||
|
PY_SSL_VERSION_SSL3);
|
||||||
|
PyModule_AddIntConstant(m, "PROTOCOL_SSLv23",
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
diff -r -u ../Python-3.1/setup.py ./setup.py
|
||||||
|
--- ../Python-3.1/setup.py 2009-05-24 02:13:14.000000000 +0900
|
||||||
|
+++ ./setup.py 2015-08-15 13:29:18.300777605 +0900
|
||||||
|
@@ -14,6 +14,7 @@
|
||||||
|
from distutils.command.build_ext import build_ext
|
||||||
|
from distutils.command.install import install
|
||||||
|
from distutils.command.install_lib import install_lib
|
||||||
|
+from distutils.spawn import find_executable
|
||||||
|
|
||||||
|
# This global variable is used to hold the list of modules to be disabled.
|
||||||
|
disabled_module_list = []
|
||||||
|
@@ -293,10 +294,33 @@
|
||||||
|
return platform
|
||||||
|
return sys.platform
|
||||||
|
|
||||||
|
+ def add_multiarch_paths(self):
|
||||||
|
+ # Debian/Ubuntu multiarch support.
|
||||||
|
+ # https://wiki.ubuntu.com/MultiarchSpec
|
||||||
|
+ if not find_executable('dpkg-architecture'):
|
||||||
|
+ return
|
||||||
|
+ tmpfile = os.path.join(self.build_temp, 'multiarch')
|
||||||
|
+ if not os.path.exists(self.build_temp):
|
||||||
|
+ os.makedirs(self.build_temp)
|
||||||
|
+ ret = os.system(
|
||||||
|
+ 'dpkg-architecture -qDEB_HOST_MULTIARCH > %s 2> /dev/null' %
|
||||||
|
+ tmpfile)
|
||||||
|
+ try:
|
||||||
|
+ if ret >> 8 == 0:
|
||||||
|
+ with open(tmpfile) as fp:
|
||||||
|
+ multiarch_path_component = fp.readline().strip()
|
||||||
|
+ add_dir_to_list(self.compiler.library_dirs,
|
||||||
|
+ '/usr/lib/' + multiarch_path_component)
|
||||||
|
+ add_dir_to_list(self.compiler.include_dirs,
|
||||||
|
+ '/usr/include/' + multiarch_path_component)
|
||||||
|
+ finally:
|
||||||
|
+ os.unlink(tmpfile)
|
||||||
|
+
|
||||||
|
def detect_modules(self):
|
||||||
|
# Ensure that /usr/local is always used
|
||||||
|
add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
|
||||||
|
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
|
||||||
|
+ self.add_multiarch_paths()
|
||||||
|
|
||||||
|
# Add paths specified in the environment variables LDFLAGS and
|
||||||
|
# CPPFLAGS for header and library files.
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
diff -r -u ../Python-3.1/Lib/ssl.py ./Lib/ssl.py
|
||||||
|
--- ../Python-3.1/Lib/ssl.py 2009-06-04 18:42:55.000000000 +0900
|
||||||
|
+++ ./Lib/ssl.py 2015-08-15 13:12:22.270915671 +0900
|
||||||
|
@@ -60,8 +60,20 @@
|
||||||
|
|
||||||
|
from _ssl import SSLError
|
||||||
|
from _ssl import CERT_NONE, CERT_OPTIONAL, CERT_REQUIRED
|
||||||
|
-from _ssl import (PROTOCOL_SSLv2, PROTOCOL_SSLv3, PROTOCOL_SSLv23,
|
||||||
|
+from _ssl import (PROTOCOL_SSLv3, PROTOCOL_SSLv23,
|
||||||
|
PROTOCOL_TLSv1)
|
||||||
|
+_PROTOCOL_NAMES = {
|
||||||
|
+ PROTOCOL_TLSv1: "TLSv1",
|
||||||
|
+ PROTOCOL_SSLv23: "SSLv23",
|
||||||
|
+ PROTOCOL_SSLv3: "SSLv3",
|
||||||
|
+}
|
||||||
|
+try:
|
||||||
|
+ from _ssl import PROTOCOL_SSLv2
|
||||||
|
+ _SSLv2_IF_EXISTS = PROTOCOL_SSLv2
|
||||||
|
+except ImportError:
|
||||||
|
+ _SSLv2_IF_EXISTS = None
|
||||||
|
+else:
|
||||||
|
+ _PROTOCOL_NAMES[PROTOCOL_SSLv2] = "SSLv2"
|
||||||
|
from _ssl import RAND_status, RAND_egd, RAND_add
|
||||||
|
from _ssl import (
|
||||||
|
SSL_ERROR_ZERO_RETURN,
|
||||||
|
@@ -434,13 +446,4 @@
|
||||||
|
return DER_cert_to_PEM_cert(dercert)
|
||||||
|
|
||||||
|
def get_protocol_name(protocol_code):
|
||||||
|
- if protocol_code == PROTOCOL_TLSv1:
|
||||||
|
- return "TLSv1"
|
||||||
|
- elif protocol_code == PROTOCOL_SSLv23:
|
||||||
|
- return "SSLv23"
|
||||||
|
- elif protocol_code == PROTOCOL_SSLv2:
|
||||||
|
- return "SSLv2"
|
||||||
|
- elif protocol_code == PROTOCOL_SSLv3:
|
||||||
|
- return "SSLv3"
|
||||||
|
- else:
|
||||||
|
- return "<unknown>"
|
||||||
|
+ return _PROTOCOL_NAMES.get(protocol_code, '<unknown>')
|
||||||
|
diff -r -u ../Python-3.1/Modules/_ssl.c ./Modules/_ssl.c
|
||||||
|
--- ../Python-3.1/Modules/_ssl.c 2009-05-06 07:31:58.000000000 +0900
|
||||||
|
+++ ./Modules/_ssl.c 2015-08-15 13:13:23.812369742 +0900
|
||||||
|
@@ -62,7 +62,9 @@
|
||||||
|
};
|
||||||
|
|
||||||
|
enum py_ssl_version {
|
||||||
|
+#ifndef OPENSSL_NO_SSL2
|
||||||
|
PY_SSL_VERSION_SSL2,
|
||||||
|
+#endif
|
||||||
|
PY_SSL_VERSION_SSL3,
|
||||||
|
PY_SSL_VERSION_SSL23,
|
||||||
|
PY_SSL_VERSION_TLS1,
|
||||||
|
@@ -301,8 +303,10 @@
|
||||||
|
self->ctx = SSL_CTX_new(TLSv1_method()); /* Set up context */
|
||||||
|
else if (proto_version == PY_SSL_VERSION_SSL3)
|
||||||
|
self->ctx = SSL_CTX_new(SSLv3_method()); /* Set up context */
|
||||||
|
+#ifndef OPENSSL_NO_SSL2
|
||||||
|
else if (proto_version == PY_SSL_VERSION_SSL2)
|
||||||
|
self->ctx = SSL_CTX_new(SSLv2_method()); /* Set up context */
|
||||||
|
+#endif
|
||||||
|
else if (proto_version == PY_SSL_VERSION_SSL23)
|
||||||
|
self->ctx = SSL_CTX_new(SSLv23_method()); /* Set up context */
|
||||||
|
PySSL_END_ALLOW_THREADS
|
||||||
|
@@ -1693,8 +1697,10 @@
|
||||||
|
PY_SSL_CERT_REQUIRED);
|
||||||
|
|
||||||
|
/* protocol versions */
|
||||||
|
+#ifndef OPENSSL_NO_SSL2
|
||||||
|
PyModule_AddIntConstant(m, "PROTOCOL_SSLv2",
|
||||||
|
PY_SSL_VERSION_SSL2);
|
||||||
|
+#endif
|
||||||
|
PyModule_AddIntConstant(m, "PROTOCOL_SSLv3",
|
||||||
|
PY_SSL_VERSION_SSL3);
|
||||||
|
PyModule_AddIntConstant(m, "PROTOCOL_SSLv23",
|
||||||
44
plugins/python-build/share/python-build/pypy-2.6.1
Normal file
44
plugins/python-build/share/python-build/pypy-2.6.1
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
case "$(pypy_architecture 2>/dev/null || true)" in
|
||||||
|
"linux" )
|
||||||
|
if require_distro "Ubuntu 12.04" "Ubuntu 12.10" "Ubuntu 13.04" "Ubuntu 13.10" "Ubuntu 14.04" 1>/dev/null 2>&1; then
|
||||||
|
install_package "pypy-2.6.1-linux" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.6.1-linux.tar.bz2#d010b1f1aafdb01beb107f16843985508ce81698260ce830690686d9b2768c88" "pypy" verify_py27 ensurepip
|
||||||
|
else
|
||||||
|
install_package "pypy-2.6.1-linux_i686-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-2.6.1-linux_i686-portable.tar.bz2#af8f05790fe21bffdb0619d39f2890e2ecabe47bbd3b21c2c97b9778e4cdb378" "pypy" verify_py27 ensurepip
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
"linux-armel" )
|
||||||
|
require_distro "Ubuntu 12.04" "Ubuntu 12.10" "Ubuntu 13.04" "Ubuntu 13.10" "Ubuntu 14.04" || true
|
||||||
|
install_package "pypy-2.6.1-linux-armel" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.6.1-linux-armel.tar.bz2#0ca15d289e78a82f927b375a016b7c3246accac5d7eebded4e32a496fb3245ab" "pypy" verify_py27 ensurepip
|
||||||
|
;;
|
||||||
|
"linux-armhf" )
|
||||||
|
if [[ "$(cat /etc/issue 2>/dev/null || true)" == "Raspbian"* ]]; then
|
||||||
|
install_package "pypy-2.6.1-linux-armhf-raspbian" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.6.1-linux-armhf-raspbian.tar.bz2#13d983805ebc6d9a3627dea3c34898375a4e4e7b6f0171cfbde463c1c04a92aa" "pypy" verify_py27 ensurepip
|
||||||
|
else
|
||||||
|
require_distro "Ubuntu 13.04" || true
|
||||||
|
install_package "pypy-2.6.1-linux-armhf-raring" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.6.1-linux-armhf-raring.tar.bz2#4caa7c1922a212cca4690bfa181cd368760a23b50163b3cbbd6d28401dd5cef5" "pypy" verify_py27 ensurepip
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
"linux64" )
|
||||||
|
if require_distro "Ubuntu 12.04" "Ubuntu 12.10" "Ubuntu 13.04" "Ubuntu 13.10" "Ubuntu 14.04" 1>/dev/null 2>&1; then
|
||||||
|
install_package "pypy-2.6.1-linux64" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.6.1-linux64.tar.bz2#78a48490d1b2dba8571156c2bf822324ca7dae6f6a56a4bbb96d3e8e8885367b" "pypy" verify_py27 ensurepip
|
||||||
|
else
|
||||||
|
install_package "pypy-2.6.1-linux_x86_64-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-2.6.1-linux_x86_64-portable.tar.bz2#ed6a35dee4c982123af716e62975039e18920b599afc4f6a2f3c7c89d0403389" "pypy" verify_py27 ensurepip
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
"osx64" )
|
||||||
|
install_package "pypy-2.6.1-osx64" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.6.1-osx64.tar.bz2#4a78ef76ec38a49a9de40225c337e89486fa09938c600df2bd2dd60110066f65" "pypy" verify_py27 ensurepip
|
||||||
|
;;
|
||||||
|
"win32" )
|
||||||
|
# FIXME: never tested on Windows
|
||||||
|
install_zip "pypy-2.6.1-win32" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.6.1-win32.zip#ccea3940fdedc03e2fcb5acf6badfe6d9c1ae876d5faf0a004e1d94edd7fd856" "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.6.1-src' to build from soruce."
|
||||||
|
echo
|
||||||
|
} >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
2
plugins/python-build/share/python-build/pypy-2.6.1-src
Normal file
2
plugins/python-build/share/python-build/pypy-2.6.1-src
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
require_gcc
|
||||||
|
install_package "pypy-2.6.1-src" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.6.1-src.tar.bz2#7fddd414c9348c2f899f79ad86adc3fc2b19443855b5243f58487e1f0ac46560" "pypy_builder" verify_py27 ensurepip
|
||||||
16
plugins/python-build/share/python-build/pypy-portable-2.6.1
Normal file
16
plugins/python-build/share/python-build/pypy-portable-2.6.1
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
case "$(pypy_architecture 2>/dev/null || true)" in
|
||||||
|
"linux" )
|
||||||
|
install_package "pypy-2.6.1-linux_i686-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-2.6.1-linux_i686-portable.tar.bz2#af8f05790fe21bffdb0619d39f2890e2ecabe47bbd3b21c2c97b9778e4cdb378" "pypy" verify_py27 ensurepip
|
||||||
|
;;
|
||||||
|
"linux64" )
|
||||||
|
install_package "pypy-2.6.1-linux_x86_64-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-2.6.1-linux_x86_64-portable.tar.bz2#ed6a35dee4c982123af716e62975039e18920b599afc4f6a2f3c7c89d0403389" "pypy" verify_py27 ensurepip
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
{ echo
|
||||||
|
colorize 1 "ERROR"
|
||||||
|
echo ": Portable PyPy is not available for $(pypy_architecture 2>/dev/null || true)."
|
||||||
|
echo
|
||||||
|
} >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
14
plugins/python-build/share/python-build/pypy-stm-2.3
Normal file
14
plugins/python-build/share/python-build/pypy-stm-2.3
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
case "$(pypy_architecture 2>/dev/null || true)" in
|
||||||
|
"linux64" )
|
||||||
|
require_distro "Ubuntu 12.04" "Ubuntu 12.10" "Ubuntu 13.04" "Ubuntu 13.10" "Ubuntu 14.04" || true
|
||||||
|
install_package "pypy-stm-2.3-linux64" "https://bitbucket.org/pypy/pypy/downloads/pypy-stm-2.3-linux64.tar.bz2#2a489280c679503442219782a87a2d16504a1467cac85ad4be1361a21d1f4d54" "pypy" verify_py27 ensurepip
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
{ echo
|
||||||
|
colorize 1 "ERROR"
|
||||||
|
echo ": The binary distribution of PyPy-STM is not available for $(pypy_architecture 2>/dev/null || true)."
|
||||||
|
echo
|
||||||
|
} >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
14
plugins/python-build/share/python-build/pypy-stm-2.5.1
Normal file
14
plugins/python-build/share/python-build/pypy-stm-2.5.1
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
case "$(pypy_architecture 2>/dev/null || true)" in
|
||||||
|
"linux64" )
|
||||||
|
require_distro "Ubuntu 12.04" "Ubuntu 12.10" "Ubuntu 13.04" "Ubuntu 13.10" "Ubuntu 14.04" || true
|
||||||
|
install_package "pypy-stm-2.5.1-linux64" "https://bitbucket.org/pypy/pypy/downloads/pypy-stm-2.5.1-linux64.tar.bz2#f280788002f2acf8690b8f9c479bb5b6f0e699ebb42f8bf203da3f70f1a38134" "pypy" verify_py27 ensurepip
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
{ echo
|
||||||
|
colorize 1 "ERROR"
|
||||||
|
echo ": The binary distribution of PyPy-STM is not available for $(pypy_architecture 2>/dev/null || true)."
|
||||||
|
echo
|
||||||
|
} >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
load test_helper
|
load test_helper
|
||||||
|
|
||||||
@test "not enought arguments for python-build" {
|
@test "not enough arguments for python-build" {
|
||||||
# use empty inline definition so nothing gets built anyway
|
# use empty inline definition so nothing gets built anyway
|
||||||
local definition="${TMP}/build-definition"
|
local definition="${TMP}/build-definition"
|
||||||
echo '' > "$definition"
|
echo '' > "$definition"
|
||||||
|
|||||||
@@ -149,39 +149,61 @@ OUT
|
|||||||
|
|
||||||
@test "not enough arguments for pyenv-install" {
|
@test "not enough arguments for pyenv-install" {
|
||||||
stub_python_build
|
stub_python_build
|
||||||
|
stub pyenv-help 'install : true'
|
||||||
|
|
||||||
run pyenv-install
|
run pyenv-install
|
||||||
assert_failure
|
assert_failure
|
||||||
assert_output_contains 'Usage: pyenv install'
|
unstub pyenv-help
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "too many arguments for pyenv-install" {
|
@test "too many arguments for pyenv-install" {
|
||||||
stub_python_build
|
stub_python_build
|
||||||
|
stub pyenv-help 'install : true'
|
||||||
|
|
||||||
run pyenv-install 3.4.1 3.4.2
|
run pyenv-install 3.4.1 3.4.2
|
||||||
assert_failure
|
assert_failure
|
||||||
assert_output_contains 'Usage: pyenv install'
|
unstub pyenv-help
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "show help for pyenv-install" {
|
@test "show help for pyenv-install" {
|
||||||
stub_python_build
|
stub_python_build
|
||||||
|
stub pyenv-help 'install : true'
|
||||||
|
|
||||||
run pyenv-install -h
|
run pyenv-install -h
|
||||||
assert_success
|
assert_success
|
||||||
|
unstub pyenv-help
|
||||||
|
}
|
||||||
|
|
||||||
|
@test "pyenv-install has usage help preface" {
|
||||||
|
run head "$(which pyenv-install)"
|
||||||
assert_output_contains 'Usage: pyenv install'
|
assert_output_contains 'Usage: pyenv install'
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "not enough arguments pyenv-uninstall" {
|
@test "not enough arguments pyenv-uninstall" {
|
||||||
|
stub pyenv-help 'uninstall : true'
|
||||||
|
|
||||||
run pyenv-uninstall
|
run pyenv-uninstall
|
||||||
assert_failure
|
assert_failure
|
||||||
assert_output_contains 'Usage: pyenv uninstall'
|
unstub pyenv-help
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "too many arguments for pyenv-uninstall" {
|
@test "too many arguments for pyenv-uninstall" {
|
||||||
|
stub pyenv-help 'uninstall : true'
|
||||||
|
|
||||||
run pyenv-uninstall 3.4.1 3.4.2
|
run pyenv-uninstall 3.4.1 3.4.2
|
||||||
assert_failure
|
assert_failure
|
||||||
assert_output_contains 'Usage: pyenv uninstall'
|
unstub pyenv-help
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "show help for pyenv-uninstall" {
|
@test "show help for pyenv-uninstall" {
|
||||||
|
stub pyenv-help 'uninstall : true'
|
||||||
|
|
||||||
run pyenv-uninstall -h
|
run pyenv-uninstall -h
|
||||||
assert_success
|
assert_success
|
||||||
|
unstub pyenv-help
|
||||||
|
}
|
||||||
|
|
||||||
|
@test "pyenv-uninstall has usage help preface" {
|
||||||
|
run head "$(which pyenv-uninstall)"
|
||||||
assert_output_contains 'Usage: pyenv uninstall'
|
assert_output_contains 'Usage: pyenv uninstall'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ OUT
|
|||||||
assert_success
|
assert_success
|
||||||
|
|
||||||
assert_build_log <<OUT
|
assert_build_log <<OUT
|
||||||
python -m ensurepip
|
python -s -m ensurepip
|
||||||
OUT
|
OUT
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -196,7 +196,7 @@ OUT
|
|||||||
assert_success
|
assert_success
|
||||||
|
|
||||||
assert_build_log <<OUT
|
assert_build_log <<OUT
|
||||||
python -m ensurepip --altinstall
|
python -s -m ensurepip --altinstall
|
||||||
OUT
|
OUT
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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 20150719" ]
|
assert [ "${lines[0]}" == "pyenv 20150901" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "invalid command" {
|
@test "invalid command" {
|
||||||
|
|||||||
Reference in New Issue
Block a user