From 021b53f924c1b5d4d9cb5827b2d5ec7c2ed0e96a Mon Sep 17 00:00:00 2001 From: "Yamashita, Yuu" Date: Wed, 5 Oct 2016 00:32:33 +0000 Subject: [PATCH 1/3] Stop specifying `--enable-unicode=ucs4` on OS X (#257) --- plugins/python-build/bin/python-build | 4 +++- plugins/python-build/test/build.bats | 21 +++++++++++++++++++-- plugins/python-build/test/compiler.bats | 11 ++++++++++- plugins/python-build/test/pyenv_ext.bats | 16 ++++++++++++++-- 4 files changed, 46 insertions(+), 6 deletions(-) diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index f7e89322..3d148096 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -1934,7 +1934,9 @@ fi # Compile with `--enable-unicode=ucs4` by default (#257) 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 # SSL Certificate error with older wget that does not support Server Name Indication (#60) diff --git a/plugins/python-build/test/build.bats b/plugins/python-build/test/build.bats index 236a3d7c..466aebcf 100644 --- a/plugins/python-build/test/build.bats +++ b/plugins/python-build/test/build.bats @@ -223,7 +223,11 @@ OUT stub uname '-s : echo Darwin' stub sw_vers '-productVersion : echo 10.10' + # yyuu/pyenv#257 stub uname '-s : echo Darwin' + + stub uname '-s : echo Darwin' + stub sysctl false stub_make_install @@ -238,7 +242,7 @@ DEF assert_build_log < Date: Wed, 5 Oct 2016 00:45:21 +0000 Subject: [PATCH 2/3] Add `uname` stubs to avoid test failures on OS X (#257) --- plugins/python-build/test/build.bats | 32 ++++++++++++++++++++++++ plugins/python-build/test/pyenv_ext.bats | 12 +++++++++ 2 files changed, 44 insertions(+) diff --git a/plugins/python-build/test/build.bats b/plugins/python-build/test/build.bats index 466aebcf..f0e3a1b8 100644 --- a/plugins/python-build/test/build.bats +++ b/plugins/python-build/test/build.bats @@ -67,6 +67,10 @@ assert_build_log() { stub_make_install stub_make_install + # yyuu/pyenv#257 + stub uname '-s : echo Linux' + stub uname '-s : echo Linux' + install_fixture definitions/needs-yaml assert_success @@ -93,6 +97,10 @@ OUT stub_make_install stub patch ' : echo patch "$@" | sed -E "s/\.[[:alnum:]]+$/.XXX/" >> build.log' + # yyuu/pyenv#257 + stub uname '-s : echo Linux' + stub uname '-s : echo Linux' + TMPDIR="$TMP" install_fixture --patch definitions/needs-yaml <<<"" assert_success @@ -121,6 +129,10 @@ OUT stub_make_install stub patch ' : echo patch "$@" | sed -E "s/\.[[:alnum:]]+$/.XXX/" >> build.log' + # yyuu/pyenv#257 + stub uname '-s : echo Linux' + stub uname '-s : echo Linux' + TMPDIR="$TMP" install_fixture --patch definitions/needs-yaml <<<"diff --git a/script.py" assert_success @@ -149,6 +161,10 @@ OUT stub brew "--prefix libyaml : echo '$brew_libdir'" false stub_make_install + # yyuu/pyenv#257 + stub uname '-s : echo Linux' + stub uname '-s : echo Linux' + install_fixture definitions/needs-yaml assert_success @@ -172,6 +188,10 @@ OUT stub brew "--prefix readline : echo '$readline_libdir'" stub_make_install + # yyuu/pyenv#257 + stub uname '-s : echo Linux' + stub uname '-s : echo Linux' + run_inline_definition <> build.log' stub_make_install + # yyuu/pyenv#257 + stub uname '-s : echo Linux' + stub uname '-s : echo Linux' + export PYTHON_CONFIGURE="${TMP}/custom-configure" run_inline_definition <> build.log" \ " : echo \"$MAKE \$@\" >> build.log && cat build.log >> '$INSTALL_ROOT/build.log'" + # yyuu/pyenv#257 + stub uname '-s : echo Linux' + stub uname '-s : echo Linux' + PYTHON_MAKE_INSTALL_TARGET="altinstall" TMPDIR="$TMP" install_tmp_fixture definitions/vanilla-python < /dev/null assert_success From 35ecd398ac3f951a611255e090b6ab8e42894be3 Mon Sep 17 00:00:00 2001 From: "Yamashita, Yuu" Date: Wed, 5 Oct 2016 10:06:03 +0900 Subject: [PATCH 3/3] Fix test failure on OS X --- plugins/python-build/test/build.bats | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/python-build/test/build.bats b/plugins/python-build/test/build.bats index f0e3a1b8..42ca4b08 100644 --- a/plugins/python-build/test/build.bats +++ b/plugins/python-build/test/build.bats @@ -366,6 +366,10 @@ OUT stub_make_install + # yyuu/pyenv#257 + stub uname '-s : echo Linux' + stub uname '-s : echo Linux' + export MAKE_INSTALL_OPTS="DOGE=\"such wow\"" run_inline_definition <