Skip to content

Commit

Permalink
ignore warnings about BUILD_ARGS and PIP_INSTALL_ARGS
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb committed Oct 17, 2024
1 parent 4235cdc commit 5221cda
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
5 changes: 2 additions & 3 deletions build-cran-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ CURRENT_DATE=$(date +'%Y-%m-%d')

# R packages cannot have versions like 3.0.0rc1, but
# 3.0.0-1 is acceptable
LGB_VERSION=$(sed "s/rc/-/g" < VERSION.txt)
LGB_VERSION=$(head -1 ./VERSION.txt | sed "s/rc/-/g")

# move relevant files
cp -R R-package/* "${TEMP_R_DIR}"
Expand Down Expand Up @@ -153,7 +153,6 @@ cd "${TEMP_R_DIR}"
-e 's/^.*#pragma endregion.*$//' \
-e 's/^.*#pragma warning.*$//' \
{} +
find . -name '*.bak' -exec rm {} \;

# 'processx' is listed as a 'Suggests' dependency in DESCRIPTION
# because it is used in install.libs.R, a file that is not
Expand All @@ -164,7 +163,7 @@ cd "${TEMP_R_DIR}"
DESCRIPTION

echo "Cleaning sed backup files"
rm ./*.bak
find . -name '*.bak' -exec rm {} \;

cd "${ORIG_WD}"

Expand Down
9 changes: 6 additions & 3 deletions build-python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -340,20 +340,22 @@ fi
if test "${BUILD_SDIST}" = true; then
echo "--- building sdist ---"
rm -f ../dist/*.tar.gz
# shellcheck disable=SC2086
python -m build \
--sdist \
--outdir ../dist \
${BUILD_ARGS:+${BUILD_ARGS}} \
${BUILD_ARGS} \
.
fi

if test "${BUILD_WHEEL}" = true; then
echo "--- building wheel ---"
rm -f ../dist/*.whl || true
# shellcheck disable=SC2086
python -m build \
--wheel \
--outdir ../dist \
${BUILD_ARGS:+${BUILD_ARGS}} \
${BUILD_ARGS} \
.
fi

Expand All @@ -366,8 +368,9 @@ if test "${INSTALL}" = true; then
PACKAGE_NAME="$(echo lightgbm*.tar.gz)"
fi
# ref for use of '--find-links': https://stackoverflow.com/a/52481267/3986677
# shellcheck disable=SC2086
pip install \
${PIP_INSTALL_ARGS:+ -o "$PIP_INSTALL_ARGS"} \
${PIP_INSTALL_ARGS} \
--force-reinstall \
--no-cache-dir \
--no-deps \
Expand Down

0 comments on commit 5221cda

Please sign in to comment.