Skip to content

Commit

Permalink
fix: Make ci/pip-compile.sh work on OSX and from anywhere
Browse files Browse the repository at this point in the history
Co-authored-by: Matt J. <[email protected]>
  • Loading branch information
thomass-dev and rouk1 committed Mar 6, 2025
1 parent c0d07d6 commit f4b31d4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions skore/ci/pip-compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# $ bash pip-compile.sh --upgrade
#

CWD="$PWD"
CWD=$(realpath $(dirname $0))
TMPDIR=$(mktemp -d)

# Make sure that `TMPDIR` is removed on exit, whatever the signal
Expand All @@ -29,9 +29,9 @@ set -eu

(
# Copy everything necessary to compile requirements in `TMPDIR`
cp -r .. "${TMPDIR}/skore"
cp ../../LICENSE "${TMPDIR}/LICENSE"
cp ../../README.md "${TMPDIR}/README.md"
cp -r "${CWD}/.." "${TMPDIR}/skore"
cp "${CWD}/../../LICENSE" "${TMPDIR}/LICENSE"
cp "${CWD}/../../README.md" "${TMPDIR}/README.md"

# Move to `TMPDIR` to avoid absolute paths in requirements file
cd "${TMPDIR}"
Expand Down Expand Up @@ -65,7 +65,7 @@ set -eu
python -m venv "python-${python}"; source "python-${python}/bin/activate"

# Force the `scikit-learn` version by overloading test requirements
sed -i "s/scikit-learn.*/scikit-learn==${scikit_learn}.*/g" skore/test-requirements.in
sed "s/scikit-learn.*/scikit-learn==${scikit_learn}.*/g" skore/test-requirements.in > skore/test-requirements.in

# Create the requirements file tree
mkdir -p $(dirname "${filepath}")
Expand Down

0 comments on commit f4b31d4

Please sign in to comment.