diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index 87ba0ff3..7a1feceb 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -2198,7 +2198,7 @@ if [ -n "$DEBUG" ]; then package_option python configure --with-pydebug fi -if [[ "$CONFIGURE_OPTS $PYTHON_CONFIGURE_OPTS" != *"--enable-framework"* ]]; then +if [[ "$CONFIGURE_OPTS $PYTHON_CONFIGURE_OPTS" != *"--enable-framework"* && "$CONFIGURE_OPTS $PYTHON_CONFIGURE_OPTS" != *"--disable-shared"* ]]; then package_option python configure --enable-shared fi diff --git a/plugins/python-build/test/build.bats b/plugins/python-build/test/build.bats index 9be9c3d5..aec81843 100644 --- a/plugins/python-build/test/build.bats +++ b/plugins/python-build/test/build.bats @@ -613,6 +613,30 @@ make install --custom-make-install OUT } +@test "--enable-shared is not added if --disable-shared is passed" { + cached_tarball "Python-3.6.2" + + for i in {1..8}; do stub uname '-s : echo Linux'; done + + stub_make_install + + export PYTHON_CONFIGURE_OPTS='--disable-shared' + run_inline_definition <