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

Compare commits

...

50 Commits

Author SHA1 Message Date
Josh Friend
c452da8084 v20150913 2015-09-13 11:03:52 -04:00
Josh Friend
e6090f00f3 Add CPython 3.5.0
Closes #440
2015-09-13 10:55:55 -04:00
Yamashita, Yuu
6868d3053a Merge pull request #439 from recruit-mtl/master
Fixed anaconda3 repo's paths. #438
2015-09-11 15:42:09 +09:00
kasajei
10d3123caa Fixed anaconda3 repo's paths. 2015-09-11 15:37:53 +09:00
Yamashita, Yuu
2d16c638e9 Merge pull request #437 from zmwangx/cpython-3.5.0rc4
Add CPython 3.5.0rc4
2015-09-09 23:30:39 +09:00
Josh Friend
3ae068b492 Add CPython 3.5.0rc4 2015-09-09 10:19:24 -04:00
Zhiming Wang
824f7e6b21 Add CPython 3.5.0rc4 2015-09-09 22:15:00 +08:00
Josh Friend
5d247793e6 Add CPython 3.5.0rc3 2015-09-07 22:27:36 -04:00
Josh Friend
ed700c0185 Merge pull request #435 from jimmywan/miniconda-3.16.0
Add miniconda-3.16.0 and miniconda3-3.16.0
2015-09-01 15:18:49 -04:00
Josh Friend
193e64b6b2 v20150901 2015-09-01 13:59:13 -04:00
Josh Friend
5ba585769b Add pypy2.6.1 portable 2015-09-01 13:57:15 -04:00
Jimmy Wan
5540e235ab Add scripts for miniconda*-3.16.0. 2015-09-01 16:35:19 +00:00
Josh Friend
c9268bb0dc Add PyPy 2.6.1
Will add portable when squeaky-pl/portable-pypy#17 is closed.
2015-08-31 14:32:22 -04:00
Josh Friend
5ddc14704c Add 3.5.0rc2 2015-08-25 18:53:13 -04:00
Josh Friend
5fcb4cf0bf Remove 3.5.0 betas 2015-08-25 18:52:59 -04:00
Yamashita, Yuu
0f288f2462 Import changes from ruby-build v20150818 2015-08-25 15:37:31 +09:00
Yamashita, Yuu
0c81c97926 remove patch that cannot be applied to CPython 3.1.1 and 3.1.2 (#421) 2015-08-18 10:57:26 +09:00
Yamashita, Yuu
5ff089de9c add PyPy-STM 2.3 and 2.5.1 (fixes #428) 2015-08-16 23:12:30 +09:00
Yamashita, Yuu
459725df3c Merge branch 'disable-fortify-source' (fixes #422) 2015-08-16 13:37:19 +09:00
Yamashita, Yuu
ec3b7d815d add fortify_crash_workaround patch for CPython (>= 2.4, <= 2.4.3) (#422) 2015-08-16 13:29:44 +09:00
Yamashita, Yuu
afe86aef52 disable _FORTITY_SOURCE to fix build of CPython (>= 2.4, <= 2.4.3) (#422) 2015-08-16 13:17:38 +09:00
Yamashita, Yuu
461ae27a19 add patches for 3.1, 3.1.1, 3.1.2 to fix build with recent version of openssl (fixes #421) 2015-08-15 13:34:34 +09:00
Yamashita, Yuu
c0f691fc57 Merge pull request #424 from zmwangx/python-3.5.0rc1
Add Python 3.5.0rc1
2015-08-11 10:18:43 +09:00
Zhiming Wang
ffc899475a Add Python 3.5.0rc1
https://www.python.org/downloads/release/python-350rc1/
2015-08-10 18:14:25 -07:00
Yamashita, Yuu
57d1c9d6be Merge pull request #419 from takluyver/35b4
Add Python 3.5.0b4
2015-07-31 07:02:57 +09:00
Thomas Kluyver
9d488c9760 Add Python 3.5.0b4
I copied and modified the file for beta 3.
2015-07-30 13:30:52 -07:00
Yamashita, Yuu
3db1ac13d2 Merge pull request #414 from jimmywan/master
Add miniconda-3.10.1 and miniconda3-3.10.1.
2015-07-23 08:03:13 +09:00
Jimmy Wan
880fa46156 Add miniconda-3.10.1 and miniconda3-3.10.1. 2015-07-22 20:36:04 +00:00
Yamashita, Yuu
24ad375a35 Merge branch 'issue411' 2015-07-22 10:49:49 +09:00
Yamashita, Yuu
7f32e96c28 v20150719 2015-07-19 13:07:24 +09:00
Yamashita, Yuu
294738842c pin pip version to 1.5.6 for python 3.1.5 (fixes #351) 2015-07-19 12:33:56 +09:00
Yamashita, Yuu
ce671398f8 Ignore user's site-packages on ensurepip/get-pip (#411)
https://www.python.org/dev/peps/pep-0370/
2015-07-18 14:22:58 +09:00
Yamashita, Yuu
a3bea25ddc Use original CPython repository as the source of CPython *-dev versions (#409) 2015-07-18 13:23:13 +09:00
Yamashita, Yuu
1a66a9141b Build 3.5-dev from "3.5" branch (#409) 2015-07-18 13:22:36 +09:00
Yamashita, Yuu
78c1d7186d CPython 3.1 branch is no longer maintained (#409) 2015-07-18 13:21:20 +09:00
Yamashita, Yuu
9b60d73ec8 Merge pull request #413 from BanzaiMan/ha-feature-py36
Add `3.6-dev`
2015-07-18 11:48:53 +09:00
Hiro Asari
8a9d2557a0 Add 3.6-dev 2015-07-17 22:14:18 -04:00
Yamashita, Yuu
2a79db00b0 Merge pull request #412 from BanzaiMan/patch-1
Point to the canonical Python repository
2015-07-18 09:47:46 +09:00
Hiro Asari
3e7839c5b7 Point to the canonical Python repository
BitBucket mirror is no longer up to date with the canonical repository.

Fixes https://github.com/yyuu/pyenv/issues/409.
2015-07-17 20:46:59 -04:00
Yamashita, Yuu
36c5cbf74f Add Anaconda/Anaconda3 2.3.0 2015-07-08 15:49:58 +09:00
Yamashita, Yuu
608ad6f9d0 Merge pull request #402 from mrjefftang/master
2.7.10 - Stop '/Library/Python/X.X/site-packages' from being added to sys.path
2015-07-08 00:17:54 +09:00
Jeff Tang
7a6eb38a36 add patches to stop '/Library/Python/X.X/site-packages' from being added
to sys.path
2015-07-07 11:14:14 -04:00
Yamashita, Yuu
cd40335ba4 Merge pull request #400 from transcranial/master
Add python 3.5.0b3
2015-07-06 07:29:42 +09:00
Leon Chen
26450fd0ab Add python 3.5.0b3 2015-07-05 17:21:31 -04:00
Yamashita Yuu
22ecefd572 Use custom MACOSX_DEPLOYMENT_TARGET if defined (fixes #312) 2015-06-28 13:50:45 +09:00
Yamashita Yuu
abae52ae20 Add tests for some of python-build specific features 2015-06-28 13:34:59 +09:00
Yamashita Yuu
114063495f pyenv-prefix should return proper prefix of system version (fixes #391) 2015-06-27 01:07:18 +09:00
Yamashita, Yuu
7b797c3797 Merge pull request #393 from nikolas/patch-1
fix typo in readme
2015-06-23 08:19:50 +09:00
Nik Nyby
8e276a009e fix typo in readme 2015-06-22 18:54:03 -04:00
Yamashita Yuu
4198280142 Fix download URL of portable PyPy 2.6 (fixes #389) 2015-06-10 21:41:20 +09:00
47 changed files with 1006 additions and 53 deletions

View File

@@ -1,5 +1,32 @@
## Version History
### 20150913
* python-build: Add CPython 3.5.0
* python-build: Remove CPython 3.5.0 release candidates
* python-build: Fixed anaconda3 repo's paths (#439)
* python-build: Add miniconda-3.16.0 and miniconda3-3.16.0 (#435)
### 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
* python-build: Add CPython `3.6-dev` (#413)
* python-build: Add Anaconda/Anaconda3 2.3.0
* python-build: Fix download URL of portable PyPy 2.6 (fixes #389)
* python-build: Use custom `MACOSX_DEPLOYMENT_TARGET` if defined (#312)
* python-build: Use original CPython repository instead of mirror at bitbucket.org as the source of `*-dev` versions (#409)
* python-build: Pin pip version to 1.5.6 for python 3.1.5 (#351)
#### 20150601
* python-build: Add PyPy 2.6.0

View File

@@ -126,7 +126,7 @@ reading it from the following sources, in this order:
Python. (In other words, whatever version would run if pyenv weren't in your
`PATH`.)
**NOTE:** You can activate multiple versions at the same time, including mulitple
**NOTE:** You can activate multiple versions at the same time, including multiple
versions of Python2 or Python3 simultaneously. This allows for parallel usage of
Python2 and Python3, and is required with tools like `tox`. For example, to set
your path to first use your `system` Python and Python3 (set to 2.7.9 and 3.4.2

View File

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

View File

@@ -30,7 +30,7 @@ OLDIFS="$IFS"
{ IFS=:
for version in ${PYENV_VERSION}; do
if [ "$version" = "system" ]; then
if PYTHON_PATH="$(pyenv-which python 2>/dev/null)"; then
if PYTHON_PATH="$(PYENV_VERSION="${version}" pyenv-which python 2>/dev/null)"; then
PYENV_PREFIX_PATH="${PYTHON_PATH%/bin/*}"
else
echo "pyenv: system version not found in PATH" >&2

View File

@@ -47,8 +47,7 @@ fi
eval "$(python-build --lib)"
usage() {
# We can remove the sed fallback once pyenv 0.4.0 is widely available.
pyenv-help install 2>/dev/null || sed -ne '/^#/!q;s/.//;s/.//;1,4d;p' < "$0"
pyenv-help install 2>/dev/null
[ -z "$1" ] || exit "$1"
}

View File

@@ -18,8 +18,7 @@ if [ "$1" = "--complete" ]; then
fi
usage() {
# We can remove the sed fallback once pyenv 0.4.0 is widely available
pyenv-help uninstall 2>/dev/null || sed -ne '/^#/!q;s/.//;s/.//;1,4d;p' < "$0"
pyenv-help uninstall 2>/dev/null
[ -z "$1" ] || exit "$1"
}

View File

@@ -12,7 +12,7 @@
# -g/--debug Build a debug version
#
PYTHON_BUILD_VERSION="20150519"
PYTHON_BUILD_VERSION="20150818"
set -E
exec 3<&2 # preserve original stderr at fd 3
@@ -890,10 +890,18 @@ pypy_architecture() {
build_package_pypy() {
build_package_copy
mkdir -p "${PREFIX_PATH}/bin" "${PREFIX_PATH}/lib"
local pypy libpypy
local pypy libpypy python
shopt -s nullglob
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
for libpypy in "bin/libpypy-c."*; do
( cd "${PREFIX_PATH}/lib" && ln -fs "../bin/$(basename "${libpypy}")" "$(basename "${libpypy}")" )
@@ -1124,12 +1132,13 @@ require_llvm() {
local llvm_version="$1"
if [ "$(uname -s)" = "Darwin" ] && [ "$(osx_version)" -ge 1010 ]; 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"
else
local llvm_prefix="$(brew --prefix llvm 2>/dev/null || true)"
local llvm_config="${llvm_prefix}/bin/llvm-config"
if [ -x "$llvm_config" ]; then
;;
3.5 )
local llvm_config="$(locate_llvm "$llvm_version")"
if [ -n "$llvm_config" ]; then
package_option python configure --llvm-config="$llvm_config"
else
{ echo
@@ -1140,16 +1149,31 @@ require_llvm() {
colorize 1 "TO FIX THE PROBLEM"
echo ": Install Homebrew's llvm package with this"
echo -n "command: "
colorize 4 "brew install llvm"
colorize 4 "brew tap homebrew/versions ; brew install llvm35"
echo
} >&3
return 1
fi
fi
;;
esac
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
done
shopt -u nullglob
}
require_java() {
local java="$(command -v java || true)"
@@ -1517,6 +1541,11 @@ build_package_verify_py35() {
build_package_verify_py34 "$1" "${2:-3.5}"
}
# Post-install check for Python 3.6.x
build_package_verify_py36() {
build_package_verify_py35 "$1" "${2:-3.6}"
}
build_package_ez_setup() {
local ez_setup="${BUILD_PATH}/ez_setup.py"
rm -f "${ez_setup}"
@@ -1547,7 +1576,7 @@ build_package_get_pip() {
http get "${GET_PIP_URL}"
fi
} 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
return 1
}
@@ -1560,7 +1589,7 @@ build_package_ensurepip() {
ensurepip_opts="--altinstall"
fi
# 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() {
@@ -1815,10 +1844,12 @@ fi
# Set MACOSX_DEPLOYMENT_TARGET from the product version of OS X (#219, #220)
if [[ "Darwin" == "$(uname -s)" ]]; then
MACOS_VERSION="$(sw_vers -productVersion 2>/dev/null || true)"
MACOS_VERSION_ARRAY=(${MACOS_VERSION//\./ })
if [ "${#MACOS_VERSION_ARRAY[@]}" -ge 2 ]; then
export MACOSX_DEPLOYMENT_TARGET="${MACOS_VERSION_ARRAY[0]}.${MACOS_VERSION_ARRAY[1]}"
if [ -z "${MACOSX_DEPLOYMENT_TARGET}" ]; then
MACOS_VERSION="$(sw_vers -productVersion 2>/dev/null || true)"
MACOS_VERSION_ARRAY=(${MACOS_VERSION//\./ })
if [ "${#MACOS_VERSION_ARRAY[@]}" -ge 2 ]; then
export MACOSX_DEPLOYMENT_TARGET="${MACOS_VERSION_ARRAY[0]}.${MACOS_VERSION_ARRAY[1]}"
fi
fi
fi

View File

@@ -1,3 +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_hg "Python-2.7-dev" "https://bitbucket.org/mirror/cpython" "2.7" standard verify_py27 ensurepip
install_hg "Python-2.7-dev" "https://hg.python.org/cpython" "2.7" standard verify_py27 ensurepip

View File

@@ -1,3 +1,4 @@
#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.1.5" "http://python.org/ftp/python/3.1.5/Python-3.1.5.tgz#d12dae6d06f52ef6bf1271db4d5b4d14b5dd39813e324314e72b648ef1bc0103" ldflags_dirs standard verify_py31 ensurepip
install_package "Python-3.1.5" "http://python.org/ftp/python/3.1.5/Python-3.1.5.tgz#d12dae6d06f52ef6bf1271db4d5b4d14b5dd39813e324314e72b648ef1bc0103" ldflags_dirs standard verify_py31 ez_setup
install_package "pip-1.5.6" "https://pypi.python.org/packages/source/p/pip/pip-1.5.6.tar.gz#b1a4ae66baf21b7eb05a5e4f37c50c2706fa28ea1f8780ce8efe14dcd9f1726c" python

View File

@@ -1,3 +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_hg "Python-3.2-dev" "https://bitbucket.org/mirror/cpython" "3.2" standard verify_py32 ensurepip
install_hg "Python-3.2-dev" "https://hg.python.org/cpython" "3.2" standard verify_py32 ensurepip

View File

@@ -1,3 +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_hg "Python-3.3-dev" "https://bitbucket.org/mirror/cpython" "3.3" standard verify_py33 ensurepip
install_hg "Python-3.3-dev" "https://hg.python.org/cpython" "3.3" standard verify_py33 ensurepip

View File

@@ -1,3 +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_hg "Python-3.4-dev" "https://bitbucket.org/mirror/cpython" "3.4" standard verify_py34 ensurepip
install_hg "Python-3.4-dev" "https://hg.python.org/cpython" "3.4" standard verify_py34 ensurepip

View File

@@ -1,3 +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_hg "Python-3.5-dev" "https://bitbucket.org/mirror/cpython" "default" standard verify_py35 ensurepip
install_hg "Python-3.5-dev" "https://hg.python.org/cpython" "3.5" standard verify_py35 ensurepip

View File

@@ -1,3 +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.0b1" "https://www.python.org/ftp/python/3.5.0/Python-3.5.0b1.tgz#1a4f57ad2ec0dd9b17703e13b46b96256b55b28d9e6529005e72f3d660e3f8a1" ldflags_dirs standard verify_py35 ensurepip
install_package "Python-3.5.0" "https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tgz#584e3d5a02692ca52fce505e68ecd77248a6f2c99adf9db144a39087336b0fe0" ldflags_dirs standard verify_py35 ensurepip

View File

@@ -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

View File

@@ -1,3 +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_hg "Python-3.1-dev" "https://bitbucket.org/mirror/cpython" "3.1" standard verify_py31 ensurepip
install_hg "Python-3.6-dev" "https://hg.python.org/cpython" "default" standard verify_py36 ensurepip

View File

@@ -0,0 +1,19 @@
case "$(anaconda_architecture 2>/dev/null || true)" in
"Linux-x86" )
install_script "Anaconda-2.3.0-Linux-x86" "http://repo.continuum.io/archive/Anaconda-2.3.0-Linux-x86.sh#73fdbbb3e38207ed18e5059f71676d18d48fdccbc455a1272eb45a60376cd818" "anaconda" verify_py27
;;
"Linux-x86_64" )
install_script "Anaconda-2.3.0-Linux-x86_64" "http://repo.continuum.io/archive/Anaconda-2.3.0-Linux-x86_64.sh#7c02499e9511c127d225992cfe1cd815e88fd46cd8a5b3cdf764f3fb4d8d4576" "anaconda" verify_py27
;;
"MacOSX-x86_64" )
install_script "Anaconda-2.3.0-MacOSX-x86_64" "http://repo.continuum.io/archive/Anaconda-2.3.0-MacOSX-x86_64.sh#c4bb59a57bf44dde80612041bbbcfd2e5cab8534842209ef456da7a46f919c33" "anaconda" verify_py27
;;
* )
{ echo
colorize 1 "ERROR"
echo ": The binary distribution of Anaconda is not available for $(anaconda_architecture 2>/dev/null || true)."
echo
} >&2
exit 1
;;
esac

View File

@@ -1,12 +1,12 @@
case "$(anaconda_architecture 2>/dev/null || true)" in
"Linux-x86" )
install_script "Anaconda3-2.0.0-Linux-x86" "http://repo.continuum.io/anaconda3/Anaconda3-2.0.0-Linux-x86.sh#439761159d5604e182951650a478dd53caff52e9dccf17c20ae66689b7b289dd" "anaconda" verify_py34
install_script "Anaconda3-2.0.0-Linux-x86" "http://repo.continuum.io/archive/Anaconda3-2.0.0-Linux-x86.sh#439761159d5604e182951650a478dd53caff52e9dccf17c20ae66689b7b289dd" "anaconda" verify_py34
;;
"Linux-x86_64" )
install_script "Anaconda3-2.0.0-Linux-x86_64" "http://repo.continuum.io/anaconda3/Anaconda3-2.0.0-Linux-x86_64.sh#57ce4f97e300cf94c5724f72d992e9eecef708fdaa13bc672ae9779773056540" "anaconda" verify_py34
install_script "Anaconda3-2.0.0-Linux-x86_64" "http://repo.continuum.io/archive/Anaconda3-2.0.0-Linux-x86_64.sh#57ce4f97e300cf94c5724f72d992e9eecef708fdaa13bc672ae9779773056540" "anaconda" verify_py34
;;
"MacOSX-x86_64" )
install_script "Anaconda3-2.0.0-MacOSX-x86_64" "http://repo.continuum.io/anaconda3/Anaconda3-2.0.0-MacOSX-x86_64.sh#776a1cf8a8e898b41bb6558c093632cc922698dc48486fee35d1e8eae3f604fa" "anaconda" verify_py34
install_script "Anaconda3-2.0.0-MacOSX-x86_64" "http://repo.continuum.io/archive/Anaconda3-2.0.0-MacOSX-x86_64.sh#776a1cf8a8e898b41bb6558c093632cc922698dc48486fee35d1e8eae3f604fa" "anaconda" verify_py34
;;
* )
{ echo

View File

@@ -1,12 +1,12 @@
case "$(anaconda_architecture 2>/dev/null || true)" in
"Linux-x86" )
install_script "Anaconda3-2.0.1-Linux-x86" "http://repo.continuum.io/anaconda3/Anaconda3-2.0.1-Linux-x86.sh#21293fabbd3d5cfbb1afe0c9a8b39e0bc4d283cd7dbe3c84a60b335481a41ef3" "anaconda" verify_py34
install_script "Anaconda3-2.0.1-Linux-x86" "http://repo.continuum.io/archive/Anaconda3-2.0.1-Linux-x86.sh#21293fabbd3d5cfbb1afe0c9a8b39e0bc4d283cd7dbe3c84a60b335481a41ef3" "anaconda" verify_py34
;;
"Linux-x86_64" )
install_script "Anaconda3-2.0.1-Linux-x86_64" "http://repo.continuum.io/anaconda3/Anaconda3-2.0.1-Linux-x86_64.sh#3c3b834793e461f3316ad1d9a9178c67859a9d74aaf7bcade076f04134dd1e26" "anaconda" verify_py34
install_script "Anaconda3-2.0.1-Linux-x86_64" "http://repo.continuum.io/archive/Anaconda3-2.0.1-Linux-x86_64.sh#3c3b834793e461f3316ad1d9a9178c67859a9d74aaf7bcade076f04134dd1e26" "anaconda" verify_py34
;;
"MacOSX-x86_64" )
install_script "Anaconda3-2.0.1-MacOSX-x86_64" "http://repo.continuum.io/anaconda3/Anaconda3-2.0.1-MacOSX-x86_64.sh#7a08509d4e45efcc7055a6d06d8406a773716500bd869a4e85312ff131155bd6" "anaconda" verify_py34
install_script "Anaconda3-2.0.1-MacOSX-x86_64" "http://repo.continuum.io/archive/Anaconda3-2.0.1-MacOSX-x86_64.sh#7a08509d4e45efcc7055a6d06d8406a773716500bd869a4e85312ff131155bd6" "anaconda" verify_py34
;;
* )
{ echo

View File

@@ -1,12 +1,12 @@
case "$(anaconda_architecture 2>/dev/null || true)" in
"Linux-x86" )
install_script "Anaconda3-2.1.0-Linux-x86" "http://repo.continuum.io/anaconda3/Anaconda3-2.1.0-Linux-x86.sh#657cb599004c21e37ce693515ea33922e0084fd7c159ef1b96b57c86eed8385f" "anaconda" verify_py34
install_script "Anaconda3-2.1.0-Linux-x86" "http://repo.continuum.io/archive/Anaconda3-2.1.0-Linux-x86.sh#657cb599004c21e37ce693515ea33922e0084fd7c159ef1b96b57c86eed8385f" "anaconda" verify_py34
;;
"Linux-x86_64" )
install_script "Anaconda3-2.1.0-Linux-x86_64" "http://repo.continuum.io/anaconda3/Anaconda3-2.1.0-Linux-x86_64.sh#af3225ccbe8df0ffb918939e009aa57740e35058ebf9dfcf5fec794a77556c3c" "anaconda" verify_py34
install_script "Anaconda3-2.1.0-Linux-x86_64" "http://repo.continuum.io/archive/Anaconda3-2.1.0-Linux-x86_64.sh#af3225ccbe8df0ffb918939e009aa57740e35058ebf9dfcf5fec794a77556c3c" "anaconda" verify_py34
;;
"MacOSX-x86_64" )
install_script "Anaconda3-2.1.0-MacOSX-x86_64" "http://repo.continuum.io/anaconda3/Anaconda3-2.1.0-MacOSX-x86_64.sh#efdb7e9d1e539cbed62dc3874b0de6a141f36684e6fbc05018e072b217e24077" "anaconda" verify_py34
install_script "Anaconda3-2.1.0-MacOSX-x86_64" "http://repo.continuum.io/archive/Anaconda3-2.1.0-MacOSX-x86_64.sh#efdb7e9d1e539cbed62dc3874b0de6a141f36684e6fbc05018e072b217e24077" "anaconda" verify_py34
;;
* )
{ echo

View File

@@ -0,0 +1,19 @@
case "$(anaconda_architecture 2>/dev/null || true)" in
"Linux-x86" )
install_script "Anaconda3-2.3.0-Linux-x86" "http://repo.continuum.io/archive/Anaconda3-2.3.0-Linux-x86.sh#4cc10d65c303191004ada2b6d75562c8ed84e42bf9871af06440dd956077b555" "anaconda" verify_py34
;;
"Linux-x86_64" )
install_script "Anaconda3-2.3.0-Linux-x86_64" "http://repo.continuum.io/archive/Anaconda3-2.3.0-Linux-x86_64.sh#3be5410b2d9db45882c7de07c554cf4f1034becc274ec9074b23fd37a5c87a6f" "anaconda" verify_py34
;;
"MacOSX-x86_64" )
install_script "Anaconda3-2.3.0-MacOSX-x86_64" "http://repo.continuum.io/archive/Anaconda3-2.3.0-MacOSX-x86_64.sh#6a0c94a49f41f9fda0138c8e966bd7b0a8965d6648fd21ffbd645d1453848ba5" "anaconda" verify_py34
;;
* )
{ 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-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

View File

@@ -0,0 +1,19 @@
case "$(anaconda_architecture 2>/dev/null || true)" in
"Linux-x86" )
install_script "Miniconda-3.16.0-Linux-x86" "http://repo.continuum.io/miniconda/Miniconda-3.16.0-Linux-x86.sh#57e9659848e6322cb18c1c4a5c844a4f7dc5e784dbd8977245769ff9db28dade" "miniconda" verify_py27
;;
"Linux-x86_64" )
install_script "Miniconda-3.16.0-Linux-x86_64" "http://repo.continuum.io/miniconda/Miniconda-3.16.0-Linux-x86_64.sh#b1facded0d33850e3a467d6e4589830be477bd4f819407b99b033a4d22601e4d" "miniconda" verify_py27
;;
"MacOSX-x86_64" )
install_script "Miniconda-3.16.0-MacOSX-x86_64" "http://repo.continuum.io/miniconda/Miniconda-3.16.0-MacOSX-x86_64.sh#e93517696d4ede4f8ff21ea42272f24508023b83f1e2e2c989d1b32ab19347a9" "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

View 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

View File

@@ -0,0 +1,19 @@
case "$(anaconda_architecture 2>/dev/null || true)" in
"Linux-x86" )
install_script "Miniconda3-3.16.0-Linux-x86" "http://repo.continuum.io/miniconda/Miniconda3-3.16.0-Linux-x86.sh#faedb7a75584d48d563f0f9b449cb00bf8d05ddb3e1ede1936bf522f03f0e1e2" "miniconda" verify_py34
;;
"Linux-x86_64" )
install_script "Miniconda3-3.16.0-Linux-x86_64" "http://repo.continuum.io/miniconda/Miniconda3-3.16.0-Linux-x86_64.sh#3becbcdd36761711850cffa11064b87cfe067dbeb4a5eda544dc341af482de87" "miniconda" verify_py34
;;
"MacOSX-x86_64" )
install_script "Miniconda3-3.16.0-MacOSX-x86_64" "http://repo.continuum.io/miniconda/Miniconda3-3.16.0-MacOSX-x86_64.sh#36fe954548a6900249270f9632b76252e247313cc9d551c096d7e1f526a88631" "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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -0,0 +1,13 @@
Only in .: 003_system_library_path_in_sys_path.patch
diff -ur ../Python-2.7.10/Lib/site.py ./Lib/site.py
--- ../Python-2.7.10/Lib/site.py 2014-06-30 05:05:30.000000000 +0300
+++ ./Lib/site.py 2014-12-12 11:42:33.000000000 +0200
@@ -300,7 +300,7 @@
# locations.
from sysconfig import get_config_var
framework = get_config_var("PYTHONFRAMEWORK")
- if framework:
+ if False and framework:
sitepackages.append(
os.path.join("/Library", framework,
sys.version[:3], "site-packages"))

View File

@@ -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.

View File

@@ -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",

View File

@@ -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.

View File

@@ -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",

View File

@@ -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.

View File

@@ -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",

View File

@@ -3,7 +3,7 @@ case "$(pypy_architecture 2>/dev/null || true)" in
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.0-linux" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.6.0-linux.tar.bz2#6e0b052c40a59bf5a85ee239980bbcab8b031b4c2bc33b99efe1b072977d9910" "pypy" verify_py27 ensurepip
else
install_package "pypy-2.6.0-linux_i686-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-2.6.0-linux_i686-portable.tar.bz2#e01db0984f7fecd80dadfb1d5f65118e596e3984d12643b4d552e83f92bff549" "pypy" verify_py27 ensurepip
install_package "pypy-2.6-linux_i686-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-2.6-linux_i686-portable.tar.bz2#e01db0984f7fecd80dadfb1d5f65118e596e3984d12643b4d552e83f92bff549" "pypy" verify_py27 ensurepip
fi
;;
"linux-armel" )
@@ -22,7 +22,7 @@ case "$(pypy_architecture 2>/dev/null || true)" in
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.0-linux64" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.6.0-linux64.tar.bz2#f5d2b0e3594cec57e32d3e43a951041ec330e1e962a836be470d591633e51388" "pypy" verify_py27 ensurepip
else
install_package "pypy-2.6.0-linux_x86_64-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-2.6.0-linux_x86_64-portable.tar.bz2#97284b66476c5d1b17a62f5017569a0073730928e19f95b49d78d6bc60b69495" "pypy" verify_py27 ensurepip
install_package "pypy-2.6-linux_x86_64-portable" "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-2.6-linux_x86_64-portable.tar.bz2#97284b66476c5d1b17a62f5017569a0073730928e19f95b49d78d6bc60b69495" "pypy" verify_py27 ensurepip
fi
;;
"osx64" )

View 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

View 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

View 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

View 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

View 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

View File

@@ -2,7 +2,7 @@
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
local definition="${TMP}/build-definition"
echo '' > "$definition"

View File

@@ -149,39 +149,61 @@ OUT
@test "not enough arguments for pyenv-install" {
stub_python_build
stub pyenv-help 'install : true'
run pyenv-install
assert_failure
assert_output_contains 'Usage: pyenv install'
unstub pyenv-help
}
@test "too many arguments for pyenv-install" {
stub_python_build
stub pyenv-help 'install : true'
run pyenv-install 3.4.1 3.4.2
assert_failure
assert_output_contains 'Usage: pyenv install'
unstub pyenv-help
}
@test "show help for pyenv-install" {
stub_python_build
stub pyenv-help 'install : true'
run pyenv-install -h
assert_success
unstub pyenv-help
}
@test "pyenv-install has usage help preface" {
run head "$(which pyenv-install)"
assert_output_contains 'Usage: pyenv install'
}
@test "not enough arguments pyenv-uninstall" {
stub pyenv-help 'uninstall : true'
run pyenv-uninstall
assert_failure
assert_output_contains 'Usage: pyenv uninstall'
unstub pyenv-help
}
@test "too many arguments for pyenv-uninstall" {
stub pyenv-help 'uninstall : true'
run pyenv-uninstall 3.4.1 3.4.2
assert_failure
assert_output_contains 'Usage: pyenv uninstall'
unstub pyenv-help
}
@test "show help for pyenv-uninstall" {
stub pyenv-help 'uninstall : true'
run pyenv-uninstall -h
assert_success
unstub pyenv-help
}
@test "pyenv-uninstall has usage help preface" {
run head "$(which pyenv-uninstall)"
assert_output_contains 'Usage: pyenv uninstall'
}

View File

@@ -87,6 +87,10 @@ install_tmp_fixture() {
run python-build $args "$TMP_FIXTURES/$name" "$destination"
}
resolve_link() {
$(type -p greadlink readlink | head -1) "$1"
}
@test "apply built-in python patch before building" {
cached_tarball "Python-3.2.1"
@@ -174,7 +178,7 @@ OUT
assert_success
assert_build_log <<OUT
python -m ensurepip
python -s -m ensurepip
OUT
}
@@ -192,6 +196,87 @@ OUT
assert_success
assert_build_log <<OUT
python -m ensurepip --altinstall
python -s -m ensurepip --altinstall
OUT
}
@test "python3-config" {
mkdir -p "${INSTALL_ROOT}/bin"
touch "${INSTALL_ROOT}/bin/python3"
chmod +x "${INSTALL_ROOT}/bin/python3"
touch "${INSTALL_ROOT}/bin/python3.4"
chmod +x "${INSTALL_ROOT}/bin/python3.4"
touch "${INSTALL_ROOT}/bin/python3-config"
chmod +x "${INSTALL_ROOT}/bin/python3-config"
touch "${INSTALL_ROOT}/bin/python3.4-config"
chmod +x "${INSTALL_ROOT}/bin/python3.4-config"
TMPDIR="$TMP" run_inline_definition <<OUT
verify_python python3.4
OUT
assert_success
[ -L "${INSTALL_ROOT}/bin/python" ]
[ -L "${INSTALL_ROOT}/bin/python-config" ]
[[ "$(resolve_link "${INSTALL_ROOT}/bin/python")" == "python3.4" ]]
[[ "$(resolve_link "${INSTALL_ROOT}/bin/python-config")" == "python3.4-config" ]]
}
@test "--enable-framework" {
mkdir -p "${INSTALL_ROOT}/Python.framework/Versions/Current/bin"
touch "${INSTALL_ROOT}/Python.framework/Versions/Current/bin/python3"
chmod +x "${INSTALL_ROOT}/Python.framework/Versions/Current/bin/python3"
touch "${INSTALL_ROOT}/Python.framework/Versions/Current/bin/python3.4"
chmod +x "${INSTALL_ROOT}/Python.framework/Versions/Current/bin/python3.4"
touch "${INSTALL_ROOT}/Python.framework/Versions/Current/bin/python3-config"
chmod +x "${INSTALL_ROOT}/Python.framework/Versions/Current/bin/python3-config"
touch "${INSTALL_ROOT}/Python.framework/Versions/Current/bin/python3.4-config"
chmod +x "${INSTALL_ROOT}/Python.framework/Versions/Current/bin/python3.4-config"
stub uname '-s : echo Darwin'
PYTHON_CONFIGURE_OPTS="--enable-framework" TMPDIR="$TMP" run_inline_definition <<OUT
echo "PYTHON_CONFIGURE_OPTS_ARRAY=(\${PYTHON_CONFIGURE_OPTS_ARRAY[@]})"
verify_python python3.4
OUT
assert_success
assert_output <<EOS
PYTHON_CONFIGURE_OPTS_ARRAY=(--enable-framework=${TMP}/install)
EOS
[ -L "${INSTALL_ROOT}/Python.framework/Versions/Current/bin/python" ]
[ -L "${INSTALL_ROOT}/Python.framework/Versions/Current/bin/python-config" ]
}
@test "--enable-universalsdk" {
stub uname '-s : echo Darwin'
PYTHON_CONFIGURE_OPTS="--enable-universalsdk" TMPDIR="$TMP" run_inline_definition <<OUT
echo "PYTHON_CONFIGURE_OPTS_ARRAY=(\${PYTHON_CONFIGURE_OPTS_ARRAY[@]})"
OUT
assert_success
assert_output <<EOS
PYTHON_CONFIGURE_OPTS_ARRAY=(--enable-universalsdk=/ --with-universal-archs=intel)
EOS
}
@test "default MACOSX_DEPLOYMENT_TARGET" {
stub uname '-s : echo Darwin'
stub sw_vers '-productVersion : echo 10.10'
TMPDIR="$TMP" run_inline_definition <<OUT
echo "\${MACOSX_DEPLOYMENT_TARGET}"
OUT
assert_success
assert_output "10.10"
}
@test "use custom MACOSX_DEPLOYMENT_TARGET if defined" {
stub uname '-s : echo Darwin'
MACOSX_DEPLOYMENT_TARGET="10.4" TMPDIR="$TMP" run_inline_definition <<OUT
echo "\${MACOSX_DEPLOYMENT_TARGET}"
OUT
assert_success
assert_output "10.4"
}

View File

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

View File

@@ -1,3 +1,14 @@
#!/usr/bin/env bats
load test_helper
@test "prefixes" {
mkdir -p "${PYENV_TEST_DIR}/bin"
touch "${PYENV_TEST_DIR}/bin/python"
chmod +x "${PYENV_TEST_DIR}/bin/python"
mkdir -p "${PYENV_ROOT}/versions/2.7.10"
PYENV_VERSION="system:2.7.10" run pyenv-prefix
assert_success "${PYENV_TEST_DIR}:${PYENV_ROOT}/versions/2.7.10"
PYENV_VERSION="2.7.10:system" run pyenv-prefix
assert_success "${PYENV_ROOT}/versions/2.7.10:${PYENV_TEST_DIR}"
}