diff --git a/build-python.sh b/build-python.sh index afb4667ac..de71c1f6a 100755 --- a/build-python.sh +++ b/build-python.sh @@ -359,14 +359,19 @@ fi if test "${INSTALL}" = true; then echo "--- installing lightgbm ---" cd ../dist + if test "${BUILD_WHEEL}" = true; then + PACKAGE_NAME="lightgbm*.whl" + else + PACKAGE_NAME="lightgbm*.tar.gz" + fi # ref for use of '--find-links': https://stackoverflow.com/a/52481267/3986677 pip install \ ${PIP_INSTALL_ARGS} \ - --ignore-installed \ + --force-reinstall \ --no-cache-dir \ --no-deps \ --find-links=. \ - lightgbm + ${PACKAGE_NAME} cd ../ fi