mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
Merge pull request #978 from pyenv/skip-enable-unicode-py33
Skip passing `--enable-unicode` for CPython 3.3+ (fixes #912)
This commit is contained in:
commit
4fb078c4c5
6 changed files with 82 additions and 74 deletions
|
@ -1978,7 +1978,15 @@ fi
|
||||||
# Compile with `--enable-unicode=ucs4` by default (#257)
|
# Compile with `--enable-unicode=ucs4` by default (#257)
|
||||||
if [[ "$PYTHON_CONFIGURE_OPTS" != *"--enable-unicode="* ]]; then
|
if [[ "$PYTHON_CONFIGURE_OPTS" != *"--enable-unicode="* ]]; then
|
||||||
if ! is_mac; then
|
if ! is_mac; then
|
||||||
package_option python configure --enable-unicode=ucs4
|
# Skip specifying `--enable-unicode` for CPython 3.3+ (#912)
|
||||||
|
case "${DEFINITION_PATH##*/}" in
|
||||||
|
"2."* | \
|
||||||
|
"3.0" | "3.0."* | "3.0-"* | \
|
||||||
|
"3.1" | "3.1."* | "3.1-"* | \
|
||||||
|
"3.2" | "3.2."* | "3.2-"* )
|
||||||
|
package_option python configure --enable-unicode=ucs4
|
||||||
|
;;
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ assert_build_log() {
|
||||||
|
|
||||||
@test "yaml is installed for python" {
|
@test "yaml is installed for python" {
|
||||||
cached_tarball "yaml-0.1.6"
|
cached_tarball "yaml-0.1.6"
|
||||||
cached_tarball "Python-3.2.1"
|
cached_tarball "Python-3.6.2"
|
||||||
|
|
||||||
stub brew false
|
stub brew false
|
||||||
stub_make_install
|
stub_make_install
|
||||||
|
@ -81,8 +81,8 @@ yaml-0.1.6: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
||||||
yaml-0.1.6: --prefix=$INSTALL_ROOT
|
yaml-0.1.6: --prefix=$INSTALL_ROOT
|
||||||
make -j 2
|
make -j 2
|
||||||
make install
|
make install
|
||||||
Python-3.2.1: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
||||||
Python-3.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib --enable-unicode=ucs4
|
Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib
|
||||||
make -j 2
|
make -j 2
|
||||||
make install
|
make install
|
||||||
OUT
|
OUT
|
||||||
|
@ -90,7 +90,7 @@ OUT
|
||||||
|
|
||||||
@test "apply python patch before building" {
|
@test "apply python patch before building" {
|
||||||
cached_tarball "yaml-0.1.6"
|
cached_tarball "yaml-0.1.6"
|
||||||
cached_tarball "Python-3.2.1"
|
cached_tarball "Python-3.6.2"
|
||||||
|
|
||||||
stub brew false
|
stub brew false
|
||||||
stub_make_install
|
stub_make_install
|
||||||
|
@ -113,8 +113,8 @@ yaml-0.1.6: --prefix=$INSTALL_ROOT
|
||||||
make -j 2
|
make -j 2
|
||||||
make install
|
make install
|
||||||
patch -p0 --force -i $TMP/python-patch.XXX
|
patch -p0 --force -i $TMP/python-patch.XXX
|
||||||
Python-3.2.1: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
||||||
Python-3.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib --enable-unicode=ucs4
|
Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib
|
||||||
make -j 2
|
make -j 2
|
||||||
make install
|
make install
|
||||||
OUT
|
OUT
|
||||||
|
@ -122,7 +122,7 @@ OUT
|
||||||
|
|
||||||
@test "apply python patch from git diff before building" {
|
@test "apply python patch from git diff before building" {
|
||||||
cached_tarball "yaml-0.1.6"
|
cached_tarball "yaml-0.1.6"
|
||||||
cached_tarball "Python-3.2.1"
|
cached_tarball "Python-3.6.2"
|
||||||
|
|
||||||
stub brew false
|
stub brew false
|
||||||
stub_make_install
|
stub_make_install
|
||||||
|
@ -145,15 +145,15 @@ yaml-0.1.6: --prefix=$INSTALL_ROOT
|
||||||
make -j 2
|
make -j 2
|
||||||
make install
|
make install
|
||||||
patch -p1 --force -i $TMP/python-patch.XXX
|
patch -p1 --force -i $TMP/python-patch.XXX
|
||||||
Python-3.2.1: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
||||||
Python-3.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib --enable-unicode=ucs4
|
Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib
|
||||||
make -j 2
|
make -j 2
|
||||||
make install
|
make install
|
||||||
OUT
|
OUT
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "yaml is linked from Homebrew" {
|
@test "yaml is linked from Homebrew" {
|
||||||
cached_tarball "Python-3.2.1"
|
cached_tarball "Python-3.6.2"
|
||||||
|
|
||||||
brew_libdir="$TMP/homebrew-yaml"
|
brew_libdir="$TMP/homebrew-yaml"
|
||||||
mkdir -p "$brew_libdir"
|
mkdir -p "$brew_libdir"
|
||||||
|
@ -172,15 +172,15 @@ OUT
|
||||||
unstub make
|
unstub make
|
||||||
|
|
||||||
assert_build_log <<OUT
|
assert_build_log <<OUT
|
||||||
Python-3.2.1: CPPFLAGS="-I$brew_libdir/include -I${TMP}/install/include " LDFLAGS="-L$brew_libdir/lib -L${TMP}/install/lib "
|
Python-3.6.2: CPPFLAGS="-I$brew_libdir/include -I${TMP}/install/include " LDFLAGS="-L$brew_libdir/lib -L${TMP}/install/lib "
|
||||||
Python-3.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib --enable-unicode=ucs4
|
Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib
|
||||||
make -j 2
|
make -j 2
|
||||||
make install
|
make install
|
||||||
OUT
|
OUT
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "readline is linked from Homebrew" {
|
@test "readline is linked from Homebrew" {
|
||||||
cached_tarball "Python-3.2.1"
|
cached_tarball "Python-3.6.2"
|
||||||
|
|
||||||
readline_libdir="$TMP/homebrew-readline"
|
readline_libdir="$TMP/homebrew-readline"
|
||||||
mkdir -p "$readline_libdir"
|
mkdir -p "$readline_libdir"
|
||||||
|
@ -193,7 +193,7 @@ OUT
|
||||||
stub uname '-s : echo Linux'
|
stub uname '-s : echo Linux'
|
||||||
|
|
||||||
run_inline_definition <<DEF
|
run_inline_definition <<DEF
|
||||||
install_package "Python-3.2.1" "http://python.org/ftp/python/3.2.1/Python-3.2.1.tar.gz"
|
install_package "Python-3.6.2" "http://python.org/ftp/python/3.6.2/Python-3.6.2.tar.gz"
|
||||||
DEF
|
DEF
|
||||||
assert_success
|
assert_success
|
||||||
|
|
||||||
|
@ -201,15 +201,15 @@ DEF
|
||||||
unstub make
|
unstub make
|
||||||
|
|
||||||
assert_build_log <<OUT
|
assert_build_log <<OUT
|
||||||
Python-3.2.1: CPPFLAGS="-I$readline_libdir/include -I${TMP}/install/include " LDFLAGS="-L$readline_libdir/lib -L${TMP}/install/lib "
|
Python-3.6.2: CPPFLAGS="-I$readline_libdir/include -I${TMP}/install/include " LDFLAGS="-L$readline_libdir/lib -L${TMP}/install/lib "
|
||||||
Python-3.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib --enable-unicode=ucs4
|
Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib
|
||||||
make -j 2
|
make -j 2
|
||||||
make install
|
make install
|
||||||
OUT
|
OUT
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "readline is not linked from Homebrew when explicitly defined" {
|
@test "readline is not linked from Homebrew when explicitly defined" {
|
||||||
cached_tarball "Python-3.2.1"
|
cached_tarball "Python-3.6.2"
|
||||||
|
|
||||||
# python-build
|
# python-build
|
||||||
readline_libdir="$TMP/custom"
|
readline_libdir="$TMP/custom"
|
||||||
|
@ -225,7 +225,7 @@ OUT
|
||||||
|
|
||||||
export PYTHON_CONFIGURE_OPTS="CPPFLAGS=-I$readline_libdir/include LDFLAGS=-L$readline_libdir/lib"
|
export PYTHON_CONFIGURE_OPTS="CPPFLAGS=-I$readline_libdir/include LDFLAGS=-L$readline_libdir/lib"
|
||||||
run_inline_definition <<DEF
|
run_inline_definition <<DEF
|
||||||
install_package "Python-3.2.1" "http://python.org/ftp/python/3.2.1/Python-3.2.1.tar.gz"
|
install_package "Python-3.6.2" "http://python.org/ftp/python/3.6.2/Python-3.6.2.tar.gz"
|
||||||
DEF
|
DEF
|
||||||
assert_success
|
assert_success
|
||||||
|
|
||||||
|
@ -233,15 +233,15 @@ DEF
|
||||||
unstub make
|
unstub make
|
||||||
|
|
||||||
assert_build_log <<OUT
|
assert_build_log <<OUT
|
||||||
Python-3.2.1: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
||||||
Python-3.2.1: --prefix=$INSTALL_ROOT CPPFLAGS=-I$readline_libdir/include LDFLAGS=-L$readline_libdir/lib --libdir=$INSTALL_ROOT/lib --enable-unicode=ucs4
|
Python-3.6.2: --prefix=$INSTALL_ROOT CPPFLAGS=-I$readline_libdir/include LDFLAGS=-L$readline_libdir/lib --libdir=$INSTALL_ROOT/lib
|
||||||
make -j 2
|
make -j 2
|
||||||
make install
|
make install
|
||||||
OUT
|
OUT
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "number of CPU cores defaults to 2" {
|
@test "number of CPU cores defaults to 2" {
|
||||||
cached_tarball "Python-3.2.1"
|
cached_tarball "Python-3.6.2"
|
||||||
|
|
||||||
# yyuu/pyenv#222
|
# yyuu/pyenv#222
|
||||||
stub uname '-s : echo Darwin'
|
stub uname '-s : echo Darwin'
|
||||||
|
@ -257,7 +257,7 @@ OUT
|
||||||
|
|
||||||
export -n MAKE_OPTS
|
export -n MAKE_OPTS
|
||||||
run_inline_definition <<DEF
|
run_inline_definition <<DEF
|
||||||
install_package "Python-3.2.1" "http://python.org/ftp/python/3.2.1/Python-3.2.1.tar.gz"
|
install_package "Python-3.6.2" "http://python.org/ftp/python/3.6.2/Python-3.6.2.tar.gz"
|
||||||
DEF
|
DEF
|
||||||
assert_success
|
assert_success
|
||||||
|
|
||||||
|
@ -265,15 +265,15 @@ DEF
|
||||||
unstub make
|
unstub make
|
||||||
|
|
||||||
assert_build_log <<OUT
|
assert_build_log <<OUT
|
||||||
Python-3.2.1: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
||||||
Python-3.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib
|
Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib
|
||||||
make -j 2
|
make -j 2
|
||||||
make install
|
make install
|
||||||
OUT
|
OUT
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "number of CPU cores is detected on Mac" {
|
@test "number of CPU cores is detected on Mac" {
|
||||||
cached_tarball "Python-3.2.1"
|
cached_tarball "Python-3.6.2"
|
||||||
|
|
||||||
# yyuu/pyenv#222
|
# yyuu/pyenv#222
|
||||||
stub uname '-s : echo Darwin'
|
stub uname '-s : echo Darwin'
|
||||||
|
@ -289,7 +289,7 @@ OUT
|
||||||
|
|
||||||
export -n MAKE_OPTS
|
export -n MAKE_OPTS
|
||||||
run_inline_definition <<DEF
|
run_inline_definition <<DEF
|
||||||
install_package "Python-3.2.1" "http://python.org/ftp/python/3.2.1/Python-3.2.1.tar.gz"
|
install_package "Python-3.6.2" "http://python.org/ftp/python/3.6.2/Python-3.6.2.tar.gz"
|
||||||
DEF
|
DEF
|
||||||
assert_success
|
assert_success
|
||||||
|
|
||||||
|
@ -298,15 +298,15 @@ DEF
|
||||||
unstub make
|
unstub make
|
||||||
|
|
||||||
assert_build_log <<OUT
|
assert_build_log <<OUT
|
||||||
Python-3.2.1: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
||||||
Python-3.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib
|
Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib
|
||||||
make -j 4
|
make -j 4
|
||||||
make install
|
make install
|
||||||
OUT
|
OUT
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "number of CPU cores is detected on FreeBSD" {
|
@test "number of CPU cores is detected on FreeBSD" {
|
||||||
cached_tarball "Python-3.2.1"
|
cached_tarball "Python-3.6.2"
|
||||||
|
|
||||||
stub uname '-s : echo FreeBSD'
|
stub uname '-s : echo FreeBSD'
|
||||||
stub sysctl '-n hw.ncpu : echo 1'
|
stub sysctl '-n hw.ncpu : echo 1'
|
||||||
|
@ -320,7 +320,7 @@ OUT
|
||||||
|
|
||||||
export -n MAKE_OPTS
|
export -n MAKE_OPTS
|
||||||
run_inline_definition <<DEF
|
run_inline_definition <<DEF
|
||||||
install_package "Python-3.2.1" "http://python.org/ftp/python/3.2.1/Python-3.2.1.tar.gz"
|
install_package "Python-3.6.2" "http://python.org/ftp/python/3.6.2/Python-3.6.2.tar.gz"
|
||||||
DEF
|
DEF
|
||||||
assert_success
|
assert_success
|
||||||
|
|
||||||
|
@ -329,15 +329,15 @@ DEF
|
||||||
unstub make
|
unstub make
|
||||||
|
|
||||||
assert_build_log <<OUT
|
assert_build_log <<OUT
|
||||||
Python-3.2.1: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
||||||
Python-3.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib --enable-unicode=ucs4
|
Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib
|
||||||
make -j 1
|
make -j 1
|
||||||
make install
|
make install
|
||||||
OUT
|
OUT
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "setting PYTHON_MAKE_INSTALL_OPTS to a multi-word string" {
|
@test "setting PYTHON_MAKE_INSTALL_OPTS to a multi-word string" {
|
||||||
cached_tarball "Python-3.2.1"
|
cached_tarball "Python-3.6.2"
|
||||||
|
|
||||||
stub_make_install
|
stub_make_install
|
||||||
|
|
||||||
|
@ -347,22 +347,22 @@ OUT
|
||||||
|
|
||||||
export PYTHON_MAKE_INSTALL_OPTS="DOGE=\"such wow\""
|
export PYTHON_MAKE_INSTALL_OPTS="DOGE=\"such wow\""
|
||||||
run_inline_definition <<DEF
|
run_inline_definition <<DEF
|
||||||
install_package "Python-3.2.1" "http://python.org/ftp/python/3.2.1/Python-3.2.1.tar.gz"
|
install_package "Python-3.6.2" "http://python.org/ftp/python/3.6.2/Python-3.6.2.tar.gz"
|
||||||
DEF
|
DEF
|
||||||
assert_success
|
assert_success
|
||||||
|
|
||||||
unstub make
|
unstub make
|
||||||
|
|
||||||
assert_build_log <<OUT
|
assert_build_log <<OUT
|
||||||
Python-3.2.1: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
||||||
Python-3.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib --enable-unicode=ucs4
|
Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib
|
||||||
make -j 2
|
make -j 2
|
||||||
make install DOGE="such wow"
|
make install DOGE="such wow"
|
||||||
OUT
|
OUT
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "setting MAKE_INSTALL_OPTS to a multi-word string" {
|
@test "setting MAKE_INSTALL_OPTS to a multi-word string" {
|
||||||
cached_tarball "Python-3.2.1"
|
cached_tarball "Python-3.6.2"
|
||||||
|
|
||||||
stub_make_install
|
stub_make_install
|
||||||
|
|
||||||
|
@ -372,15 +372,15 @@ OUT
|
||||||
|
|
||||||
export MAKE_INSTALL_OPTS="DOGE=\"such wow\""
|
export MAKE_INSTALL_OPTS="DOGE=\"such wow\""
|
||||||
run_inline_definition <<DEF
|
run_inline_definition <<DEF
|
||||||
install_package "Python-3.2.1" "http://python.org/ftp/python/3.2.1/Python-3.2.1.tar.gz"
|
install_package "Python-3.6.2" "http://python.org/ftp/python/3.6.2/Python-3.6.2.tar.gz"
|
||||||
DEF
|
DEF
|
||||||
assert_success
|
assert_success
|
||||||
|
|
||||||
unstub make
|
unstub make
|
||||||
|
|
||||||
assert_build_log <<OUT
|
assert_build_log <<OUT
|
||||||
Python-3.2.1: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
||||||
Python-3.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib --enable-unicode=ucs4
|
Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib
|
||||||
make -j 2
|
make -j 2
|
||||||
make install DOGE="such wow"
|
make install DOGE="such wow"
|
||||||
OUT
|
OUT
|
||||||
|
@ -396,7 +396,7 @@ OUT
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "make on FreeBSD 9 defaults to gmake" {
|
@test "make on FreeBSD 9 defaults to gmake" {
|
||||||
cached_tarball "Python-3.2.1"
|
cached_tarball "Python-3.6.2"
|
||||||
|
|
||||||
stub uname "-s : echo FreeBSD" "-r : echo 9.1"
|
stub uname "-s : echo FreeBSD" "-r : echo 9.1"
|
||||||
MAKE=gmake stub_make_install
|
MAKE=gmake stub_make_install
|
||||||
|
@ -415,7 +415,7 @@ OUT
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "make on FreeBSD 10" {
|
@test "make on FreeBSD 10" {
|
||||||
cached_tarball "Python-3.2.1"
|
cached_tarball "Python-3.6.2"
|
||||||
|
|
||||||
stub uname "-s : echo FreeBSD" "-r : echo 10.0-RELEASE"
|
stub uname "-s : echo FreeBSD" "-r : echo 10.0-RELEASE"
|
||||||
stub_make_install
|
stub_make_install
|
||||||
|
@ -433,7 +433,7 @@ OUT
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "can use PYTHON_CONFIGURE to apply a patch" {
|
@test "can use PYTHON_CONFIGURE to apply a patch" {
|
||||||
cached_tarball "Python-3.2.1"
|
cached_tarball "Python-3.6.2"
|
||||||
|
|
||||||
executable "${TMP}/custom-configure" <<CONF
|
executable "${TMP}/custom-configure" <<CONF
|
||||||
#!$BASH
|
#!$BASH
|
||||||
|
@ -450,7 +450,7 @@ CONF
|
||||||
|
|
||||||
export PYTHON_CONFIGURE="${TMP}/custom-configure"
|
export PYTHON_CONFIGURE="${TMP}/custom-configure"
|
||||||
run_inline_definition <<DEF
|
run_inline_definition <<DEF
|
||||||
install_package "Python-3.2.1" "http://python.org/ftp/python/3.2.1/Python-3.2.1.tar.gz"
|
install_package "Python-3.6.2" "http://python.org/ftp/python/3.6.2/Python-3.6.2.tar.gz"
|
||||||
DEF
|
DEF
|
||||||
assert_success
|
assert_success
|
||||||
|
|
||||||
|
@ -459,8 +459,8 @@ DEF
|
||||||
|
|
||||||
assert_build_log <<OUT
|
assert_build_log <<OUT
|
||||||
apply -p1 -i /my/patch.diff
|
apply -p1 -i /my/patch.diff
|
||||||
Python-3.2.1: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
||||||
Python-3.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib --enable-unicode=ucs4
|
Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib
|
||||||
make -j 2
|
make -j 2
|
||||||
make install
|
make install
|
||||||
OUT
|
OUT
|
||||||
|
@ -545,11 +545,11 @@ OUT
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "initializes LDFLAGS directories" {
|
@test "initializes LDFLAGS directories" {
|
||||||
cached_tarball "Python-3.2.1"
|
cached_tarball "Python-3.6.2"
|
||||||
|
|
||||||
export LDFLAGS="-L ${BATS_TEST_DIRNAME}/what/evs"
|
export LDFLAGS="-L ${BATS_TEST_DIRNAME}/what/evs"
|
||||||
run_inline_definition <<DEF
|
run_inline_definition <<DEF
|
||||||
install_package "Python-3.2.1" "http://python.org/ftp/python/3.2.1/Python-3.2.1.tar.gz" ldflags_dirs
|
install_package "Python-3.6.2" "http://python.org/ftp/python/3.6.2/Python-3.6.2.tar.gz" ldflags_dirs
|
||||||
DEF
|
DEF
|
||||||
assert_success
|
assert_success
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
install_package "yaml-0.1.6" "http://pyyaml.org/download/libyaml/yaml-0.1.6.tar.gz" --if needs_yaml
|
install_package "yaml-0.1.6" "http://pyyaml.org/download/libyaml/yaml-0.1.6.tar.gz" --if needs_yaml
|
||||||
install_package "Python-3.2.1" "http://python.org/ftp/python/3.2.1/Python-3.2.1.tar.gz"
|
install_package "Python-3.6.2" "http://python.org/ftp/python/3.6.2/Python-3.6.2.tar.gz"
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
install_package "Python-3.2.1" "http://python.org/ftp/python/3.2.1/Python-3.2.1.tar.gz"
|
install_package "Python-3.6.2" "http://python.org/ftp/python/3.6.2/Python-3.6.2.tar.gz"
|
||||||
|
|
|
@ -16,13 +16,13 @@ OUT
|
||||||
stub pyenv-hooks "install : echo '$HOOK_PATH'/install.bash"
|
stub pyenv-hooks "install : echo '$HOOK_PATH'/install.bash"
|
||||||
stub pyenv-rehash "echo rehashed"
|
stub pyenv-rehash "echo rehashed"
|
||||||
|
|
||||||
definition="${TMP}/3.2.1"
|
definition="${TMP}/3.6.2"
|
||||||
cat > "$definition" <<<"echo python-build"
|
cat > "$definition" <<<"echo python-build"
|
||||||
run pyenv-install "$definition"
|
run pyenv-install "$definition"
|
||||||
|
|
||||||
assert_success
|
assert_success
|
||||||
assert_output <<-OUT
|
assert_output <<-OUT
|
||||||
before: ${PYENV_ROOT}/versions/3.2.1
|
before: ${PYENV_ROOT}/versions/3.6.2
|
||||||
python-build
|
python-build
|
||||||
after: 0
|
after: 0
|
||||||
rehashed
|
rehashed
|
||||||
|
@ -41,16 +41,16 @@ OUT
|
||||||
stub pyenv-hooks "uninstall : echo '$HOOK_PATH'/uninstall.bash"
|
stub pyenv-hooks "uninstall : echo '$HOOK_PATH'/uninstall.bash"
|
||||||
stub pyenv-rehash "echo rehashed"
|
stub pyenv-rehash "echo rehashed"
|
||||||
|
|
||||||
mkdir -p "${PYENV_ROOT}/versions/3.2.1"
|
mkdir -p "${PYENV_ROOT}/versions/3.6.2"
|
||||||
run pyenv-uninstall -f 3.2.1
|
run pyenv-uninstall -f 3.6.2
|
||||||
|
|
||||||
assert_success
|
assert_success
|
||||||
assert_output <<-OUT
|
assert_output <<-OUT
|
||||||
before: ${PYENV_ROOT}/versions/3.2.1
|
before: ${PYENV_ROOT}/versions/3.6.2
|
||||||
rm -rf ${PYENV_ROOT}/versions/3.2.1
|
rm -rf ${PYENV_ROOT}/versions/3.6.2
|
||||||
rehashed
|
rehashed
|
||||||
after.
|
after.
|
||||||
OUT
|
OUT
|
||||||
|
|
||||||
refute [ -d "${PYENV_ROOT}/versions/3.2.1" ]
|
refute [ -d "${PYENV_ROOT}/versions/3.6.2" ]
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,13 +93,13 @@ resolve_link() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "apply built-in python patch before building" {
|
@test "apply built-in python patch before building" {
|
||||||
cached_tarball "Python-3.2.1"
|
cached_tarball "Python-3.6.2"
|
||||||
|
|
||||||
stub brew false
|
stub brew false
|
||||||
stub_make_install
|
stub_make_install
|
||||||
stub patch ' : echo patch "$@" | sed -E "s/\.[[:alnum:]]+$/.XXX/" >> build.log'
|
stub patch ' : echo patch "$@" | sed -E "s/\.[[:alnum:]]+$/.XXX/" >> build.log'
|
||||||
|
|
||||||
echo | install_patch definitions/vanilla-python "Python-3.2.1/empty.patch"
|
echo | install_patch definitions/vanilla-python "Python-3.6.2/empty.patch"
|
||||||
|
|
||||||
# yyuu/pyenv#257
|
# yyuu/pyenv#257
|
||||||
stub uname '-s : echo Linux'
|
stub uname '-s : echo Linux'
|
||||||
|
@ -110,8 +110,8 @@ resolve_link() {
|
||||||
|
|
||||||
assert_build_log <<OUT
|
assert_build_log <<OUT
|
||||||
patch -p0 --force -i $TMP/python-patch.XXX
|
patch -p0 --force -i $TMP/python-patch.XXX
|
||||||
Python-3.2.1: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
||||||
Python-3.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib --enable-unicode=ucs4
|
Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib
|
||||||
make -j 2
|
make -j 2
|
||||||
make install
|
make install
|
||||||
OUT
|
OUT
|
||||||
|
@ -121,15 +121,15 @@ OUT
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "apply built-in python patches should be sorted by its name" {
|
@test "apply built-in python patches should be sorted by its name" {
|
||||||
cached_tarball "Python-3.2.1"
|
cached_tarball "Python-3.6.2"
|
||||||
|
|
||||||
stub brew false
|
stub brew false
|
||||||
stub_make_install
|
stub_make_install
|
||||||
stub patch ' : for arg; do [[ "$arg" == "-"* ]] || sed -e "s/^/patch: /" "$arg"; done >> build.log'
|
stub patch ' : for arg; do [[ "$arg" == "-"* ]] || sed -e "s/^/patch: /" "$arg"; done >> build.log'
|
||||||
|
|
||||||
echo "foo" | install_patch definitions/vanilla-python "Python-3.2.1/foo.patch"
|
echo "foo" | install_patch definitions/vanilla-python "Python-3.6.2/foo.patch"
|
||||||
echo "bar" | install_patch definitions/vanilla-python "Python-3.2.1/bar.patch"
|
echo "bar" | install_patch definitions/vanilla-python "Python-3.6.2/bar.patch"
|
||||||
echo "baz" | install_patch definitions/vanilla-python "Python-3.2.1/baz.patch"
|
echo "baz" | install_patch definitions/vanilla-python "Python-3.6.2/baz.patch"
|
||||||
|
|
||||||
# yyuu/pyenv#257
|
# yyuu/pyenv#257
|
||||||
stub uname '-s : echo Linux'
|
stub uname '-s : echo Linux'
|
||||||
|
@ -142,8 +142,8 @@ OUT
|
||||||
patch: bar
|
patch: bar
|
||||||
patch: baz
|
patch: baz
|
||||||
patch: foo
|
patch: foo
|
||||||
Python-3.2.1: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
||||||
Python-3.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib --enable-unicode=ucs4
|
Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib
|
||||||
make -j 2
|
make -j 2
|
||||||
make install
|
make install
|
||||||
OUT
|
OUT
|
||||||
|
@ -153,7 +153,7 @@ OUT
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "allow custom make install target" {
|
@test "allow custom make install target" {
|
||||||
cached_tarball "Python-3.2.1"
|
cached_tarball "Python-3.6.2"
|
||||||
|
|
||||||
stub brew false
|
stub brew false
|
||||||
stub "$MAKE" \
|
stub "$MAKE" \
|
||||||
|
@ -168,8 +168,8 @@ OUT
|
||||||
assert_success
|
assert_success
|
||||||
|
|
||||||
assert_build_log <<OUT
|
assert_build_log <<OUT
|
||||||
Python-3.2.1: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
||||||
Python-3.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib --enable-unicode=ucs4
|
Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib
|
||||||
make -j 2
|
make -j 2
|
||||||
make altinstall
|
make altinstall
|
||||||
OUT
|
OUT
|
||||||
|
@ -280,7 +280,7 @@ EOS
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "enable custom unicode configuration" {
|
@test "enable custom unicode configuration" {
|
||||||
cached_tarball "Python-3.2.1"
|
cached_tarball "Python-3.6.2"
|
||||||
|
|
||||||
stub brew false
|
stub brew false
|
||||||
stub "$MAKE" \
|
stub "$MAKE" \
|
||||||
|
@ -291,8 +291,8 @@ EOS
|
||||||
assert_success
|
assert_success
|
||||||
|
|
||||||
assert_build_log <<OUT
|
assert_build_log <<OUT
|
||||||
Python-3.2.1: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
||||||
Python-3.2.1: --prefix=$INSTALL_ROOT --enable-unicode=ucs2 --libdir=$INSTALL_ROOT/lib
|
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-unicode=ucs2 --libdir=$INSTALL_ROOT/lib
|
||||||
make -j 2
|
make -j 2
|
||||||
make install
|
make install
|
||||||
OUT
|
OUT
|
||||||
|
|
Loading…
Reference in a new issue