mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
Pass through CFLAGS_EXTRA for Micropython (#2007)
Co-authored-by: Ivan Pozdeev <vano@mail.mipt.ru>
This commit is contained in:
parent
845e08eb2f
commit
cd5522965b
2 changed files with 22 additions and 1 deletions
|
@ -899,7 +899,7 @@ build_package_micropython() {
|
|||
"$MAKE" $MAKE_OPTS
|
||||
cd ../ports/unix
|
||||
"$MAKE" $MAKE_OPTS axtls
|
||||
"$MAKE" $MAKE_OPTS CFLAGS_EXTRA="-DMICROPY_PY_SYS_PATH_DEFAULT='\"${PREFIX_PATH}/lib/micropython\"'"
|
||||
"$MAKE" $MAKE_OPTS CFLAGS_EXTRA="-DMICROPY_PY_SYS_PATH_DEFAULT='\"${PREFIX_PATH}/lib/micropython\"' $CFLAGS_EXTRA"
|
||||
"$MAKE" install $MAKE_INSTALL_OPTS PREFIX="${PREFIX_PATH}"
|
||||
ln -fs micropython "${PREFIX_PATH}/bin/python"
|
||||
mkdir -p "${PREFIX_PATH}/lib/micropython"
|
||||
|
|
|
@ -97,3 +97,24 @@ make -j 2
|
|||
make install
|
||||
OUT
|
||||
}
|
||||
|
||||
@test "passthrough CFLAGS_EXTRA to micropython compiler" {
|
||||
mkdir -p "$INSTALL_ROOT/mpy-cross"
|
||||
mkdir -p "$INSTALL_ROOT/ports/unix"
|
||||
mkdir -p "$INSTALL_ROOT/bin"
|
||||
# touch "$INSTALL_ROOT/bin/python"
|
||||
cd "$INSTALL_ROOT"
|
||||
|
||||
stub make true true '(for a in "$@"; do echo $a; done)|grep -E "^CFLAGS_EXTRA="' true
|
||||
stub ln true
|
||||
stub mkdir true
|
||||
run_inline_definition <<DEF
|
||||
exec 4<&1
|
||||
CFLAGS_EXTRA='-Wno-floating-conversion' build_package_micropython
|
||||
DEF
|
||||
|
||||
#assert_success
|
||||
assert_output <<OUT
|
||||
CFLAGS_EXTRA=-DMICROPY_PY_SYS_PATH_DEFAULT='"${TMP}/install/lib/micropython"' -Wno-floating-conversion
|
||||
OUT
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue