mirror of
https://github.com/pyenv/pyenv.git
synced 2024-12-23 00:30:48 +00:00
Fix regression of #255 and add test
This commit is contained in:
parent
7bceb85067
commit
9d21169ee0
2 changed files with 23 additions and 1 deletions
|
@ -654,6 +654,7 @@ build_package_standard() {
|
|||
local PACKAGE_MAKE_OPTS_ARRAY="${package_var_name}_MAKE_OPTS_ARRAY[@]"
|
||||
local PACKAGE_MAKE_INSTALL_OPTS="${package_var_name}_MAKE_INSTALL_OPTS"
|
||||
local PACKAGE_MAKE_INSTALL_OPTS_ARRAY="${package_var_name}_MAKE_INSTALL_OPTS_ARRAY[@]"
|
||||
local PACKAGE_MAKE_INSTALL_TARGET="${package_var_name}_MAKE_INSTALL_TARGET"
|
||||
local PACKAGE_CFLAGS="${package_var_name}_CFLAGS"
|
||||
|
||||
[ "$package_var_name" = "PYTHON" ] && use_homebrew_readline || true
|
||||
|
@ -670,7 +671,7 @@ build_package_standard() {
|
|||
) >&4 2>&1
|
||||
|
||||
{ "$MAKE" $MAKE_OPTS ${!PACKAGE_MAKE_OPTS} "${!PACKAGE_MAKE_OPTS_ARRAY}"
|
||||
"$MAKE" install $MAKE_INSTALL_OPTS ${!PACKAGE_MAKE_INSTALL_OPTS} "${!PACKAGE_MAKE_INSTALL_OPTS_ARRAY}"
|
||||
"$MAKE" "${!PACKAGE_MAKE_INSTALL_TARGET:-install}" $MAKE_INSTALL_OPTS ${!PACKAGE_MAKE_INSTALL_OPTS} "${!PACKAGE_MAKE_INSTALL_OPTS_ARRAY}"
|
||||
} >&4 2>&1
|
||||
}
|
||||
|
||||
|
|
|
@ -138,3 +138,24 @@ OUT
|
|||
unstub make
|
||||
unstub patch
|
||||
}
|
||||
|
||||
@test "allow custom make install target" {
|
||||
cached_tarball "Python-3.2.1"
|
||||
|
||||
stub brew false
|
||||
stub "$MAKE" \
|
||||
" : echo \"$MAKE \$@\" >> build.log" \
|
||||
" : echo \"$MAKE \$@\" >> build.log && cat build.log >> '$INSTALL_ROOT/build.log'"
|
||||
|
||||
PYTHON_MAKE_INSTALL_TARGET="altinstall" TMPDIR="$TMP" install_tmp_fixture definitions/vanilla-python < /dev/null
|
||||
assert_success
|
||||
|
||||
assert_build_log <<OUT
|
||||
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
|
||||
make -j 2
|
||||
make altinstall
|
||||
OUT
|
||||
|
||||
unstub make
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue