Browse Source

Stop specifying `--enable-unicode=ucs4` on OS X (#257)

pull/726/head
Yamashita, Yuu 8 years ago
parent
commit
021b53f924
4 changed files with 46 additions and 6 deletions
  1. +3
    -1
      plugins/python-build/bin/python-build
  2. +19
    -2
      plugins/python-build/test/build.bats
  3. +10
    -1
      plugins/python-build/test/compiler.bats
  4. +14
    -2
      plugins/python-build/test/pyenv_ext.bats

+ 3
- 1
plugins/python-build/bin/python-build View File

@ -1934,7 +1934,9 @@ 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
package_option python configure --enable-unicode=ucs4
if ! is_mac; then
package_option python configure --enable-unicode=ucs4
fi
fi fi
# SSL Certificate error with older wget that does not support Server Name Indication (#60) # SSL Certificate error with older wget that does not support Server Name Indication (#60)

+ 19
- 2
plugins/python-build/test/build.bats View File

@ -223,7 +223,11 @@ OUT
stub uname '-s : echo Darwin' stub uname '-s : echo Darwin'
stub sw_vers '-productVersion : echo 10.10' stub sw_vers '-productVersion : echo 10.10'
# yyuu/pyenv#257
stub uname '-s : echo Darwin' stub uname '-s : echo Darwin'
stub uname '-s : echo Darwin'
stub sysctl false stub sysctl false
stub_make_install stub_make_install
@ -238,7 +242,7 @@ DEF
assert_build_log <<OUT assert_build_log <<OUT
Python-3.2.1: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " Python-3.2.1: 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.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib
make -j 2 make -j 2
make install make install
OUT OUT
@ -251,7 +255,11 @@ OUT
stub uname '-s : echo Darwin' stub uname '-s : echo Darwin'
stub sw_vers '-productVersion : echo 10.10' stub sw_vers '-productVersion : echo 10.10'
# yyuu/pyenv#257
stub uname '-s : echo Darwin' stub uname '-s : echo Darwin'
stub uname '-s : echo Darwin'
stub sysctl '-n hw.ncpu : echo 4' stub sysctl '-n hw.ncpu : echo 4'
stub_make_install stub_make_install
@ -267,7 +275,7 @@ DEF
assert_build_log <<OUT assert_build_log <<OUT
Python-3.2.1: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " Python-3.2.1: 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.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib
make -j 4 make -j 4
make install make install
OUT OUT
@ -283,6 +291,9 @@ OUT
# yyuu/pyenv#222 # yyuu/pyenv#222
stub uname '-s : echo FreeBSD' stub uname '-s : echo FreeBSD'
# yyuu/pyenv#257
stub uname '-s : echo FreeBSD'
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.2.1" "http://python.org/ftp/python/3.2.1/Python-3.2.1.tar.gz"
@ -361,6 +372,9 @@ OUT
# yyuu/pyenv#222 # yyuu/pyenv#222
stub uname '-s : echo FreeBSD' stub uname '-s : echo FreeBSD'
# yyuu/pyenv#257
stub uname '-s : echo FreeBSD'
MAKE= install_fixture definitions/vanilla-python MAKE= install_fixture definitions/vanilla-python
assert_success assert_success
@ -377,6 +391,9 @@ OUT
# yyuu/pyenv#222 # yyuu/pyenv#222
stub uname '-s : echo FreeBSD' stub uname '-s : echo FreeBSD'
# yyuu/pyenv#257
stub uname '-s : echo FreeBSD'
MAKE= install_fixture definitions/vanilla-python MAKE= install_fixture definitions/vanilla-python
assert_success assert_success

+ 10
- 1
plugins/python-build/test/compiler.bats View File

@ -12,6 +12,9 @@ export -n PYTHON_CONFIGURE_OPTS
stub uname '-s : echo Darwin' stub uname '-s : echo Darwin'
stub sw_vers '-productVersion : echo 10.9.5' stub sw_vers '-productVersion : echo 10.9.5'
# yyuu/pyenv#257
stub uname '-s : echo Darwin'
stub uname '-s : echo Darwin' stub uname '-s : echo Darwin'
stub sw_vers '-productVersion : echo 10.9.5' stub sw_vers '-productVersion : echo 10.9.5'
stub gcc '--version : echo 4.2.1' stub gcc '--version : echo 4.2.1'
@ -33,6 +36,9 @@ OUT
stub uname '-s : echo Darwin' stub uname '-s : echo Darwin'
stub sw_vers '-productVersion : echo 10.10' stub sw_vers '-productVersion : echo 10.10'
# yyuu/pyenv#257
stub uname '-s : echo Darwin'
stub uname '-s : echo Darwin' stub uname '-s : echo Darwin'
stub sw_vers '-productVersion : echo 10.10' stub sw_vers '-productVersion : echo 10.10'
stub gcc '--version : echo 4.2.1' stub gcc '--version : echo 4.2.1'
@ -67,6 +73,9 @@ DEF
stub uname '-s : echo Darwin' stub uname '-s : echo Darwin'
stub sw_vers '-productVersion : echo 10.10' stub sw_vers '-productVersion : echo 10.10'
# yyuu/pyenv#257
stub uname '-s : echo Darwin'
stub uname '-s : echo Darwin' stub uname '-s : echo Darwin'
stub sw_vers '-productVersion : echo 10.10' stub sw_vers '-productVersion : echo 10.10'
stub cc 'false' stub cc 'false'
@ -89,7 +98,7 @@ build_package_standard python
DEF DEF
assert_success assert_success
assert_output <<OUT assert_output <<OUT
./configure --prefix=$INSTALL_ROOT --libdir=${TMP}/install/lib --enable-unicode=ucs4
./configure --prefix=$INSTALL_ROOT --libdir=${TMP}/install/lib
CC=clang CC=clang
CFLAGS=no CFLAGS=no
make -j 2 make -j 2

+ 14
- 2
plugins/python-build/test/pyenv_ext.bats View File

@ -234,6 +234,9 @@ OUT
touch "${INSTALL_ROOT}/Python.framework/Versions/Current/bin/python3.4-config" touch "${INSTALL_ROOT}/Python.framework/Versions/Current/bin/python3.4-config"
chmod +x "${INSTALL_ROOT}/Python.framework/Versions/Current/bin/python3.4-config" chmod +x "${INSTALL_ROOT}/Python.framework/Versions/Current/bin/python3.4-config"
# yyuu/pyenv#257
stub uname '-s : echo Darwin'
stub uname '-s : echo Darwin' stub uname '-s : echo Darwin'
PYTHON_CONFIGURE_OPTS="--enable-framework" TMPDIR="$TMP" run_inline_definition <<OUT PYTHON_CONFIGURE_OPTS="--enable-framework" TMPDIR="$TMP" run_inline_definition <<OUT
@ -242,7 +245,7 @@ verify_python python3.4
OUT OUT
assert_success assert_success
assert_output <<EOS assert_output <<EOS
PYTHON_CONFIGURE_OPTS_ARRAY=(--libdir=${TMP}/install/lib --enable-framework=${TMP}/install --enable-unicode=ucs4)
PYTHON_CONFIGURE_OPTS_ARRAY=(--libdir=${TMP}/install/lib --enable-framework=${TMP}/install)
EOS EOS
[ -L "${INSTALL_ROOT}/Python.framework/Versions/Current/bin/python" ] [ -L "${INSTALL_ROOT}/Python.framework/Versions/Current/bin/python" ]
@ -250,6 +253,9 @@ EOS
} }
@test "enable universalsdk" { @test "enable universalsdk" {
# yyuu/pyenv#257
stub uname '-s : echo Darwin'
stub uname '-s : echo Darwin' stub uname '-s : echo Darwin'
PYTHON_CONFIGURE_OPTS="--enable-universalsdk" TMPDIR="$TMP" run_inline_definition <<OUT PYTHON_CONFIGURE_OPTS="--enable-universalsdk" TMPDIR="$TMP" run_inline_definition <<OUT
@ -257,7 +263,7 @@ echo "PYTHON_CONFIGURE_OPTS_ARRAY=(\${PYTHON_CONFIGURE_OPTS_ARRAY[@]})"
OUT OUT
assert_success assert_success
assert_output <<EOS assert_output <<EOS
PYTHON_CONFIGURE_OPTS_ARRAY=(--libdir=${TMP}/install/lib --enable-universalsdk=/ --with-universal-archs=intel --enable-unicode=ucs4)
PYTHON_CONFIGURE_OPTS_ARRAY=(--libdir=${TMP}/install/lib --enable-universalsdk=/ --with-universal-archs=intel)
EOS EOS
} }
@ -283,6 +289,9 @@ OUT
} }
@test "default MACOSX_DEPLOYMENT_TARGET" { @test "default MACOSX_DEPLOYMENT_TARGET" {
# yyuu/pyenv#257
stub uname '-s : echo Darwin'
stub uname '-s : echo Darwin' stub uname '-s : echo Darwin'
stub sw_vers '-productVersion : echo 10.10' stub sw_vers '-productVersion : echo 10.10'
@ -294,6 +303,9 @@ OUT
} }
@test "use custom MACOSX_DEPLOYMENT_TARGET if defined" { @test "use custom MACOSX_DEPLOYMENT_TARGET if defined" {
# yyuu/pyenv#257
stub uname '-s : echo Darwin'
stub uname '-s : echo Darwin' stub uname '-s : echo Darwin'
MACOSX_DEPLOYMENT_TARGET="10.4" TMPDIR="$TMP" run_inline_definition <<OUT MACOSX_DEPLOYMENT_TARGET="10.4" TMPDIR="$TMP" run_inline_definition <<OUT

Loading…
Cancel
Save