Skip to content

Commit db61f75

Browse files
committed
ensure correct version is used
1 parent 80476d7 commit db61f75

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

.github/workflows/build.yml

+17-10
Original file line numberDiff line numberDiff line change
@@ -277,26 +277,33 @@ jobs:
277277

278278
- name: Install packages
279279
run: |
280-
# Get Python version to find matching wheel
281-
PYTHON_VERSION=$(python -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')")
282-
echo "Using Python $PYTHON_VERSION"
280+
# Get Python version
281+
PY_VER=$(python -c "import sys; print(f'{sys.version_info.major}{sys.version_info.minor}')")
282+
echo "Using Python $PY_VER"
283+
284+
# List available wheels
285+
echo "Available wheels:"
286+
ls -la ./wheels/
287+
288+
# Find wheel matching current Python version
289+
MATCHING_WHEEL=$(find ./wheels -name "*-cp${PY_VER}-cp${PY_VER}*" | head -1)
283290
284-
# Install matching wheel for Linux
285-
MATCHING_WHEEL=$(find ./wheels -name "basemap-*-cp3${PYTHON_VERSION/./}*.whl" | head -1)
286291
if [ -n "$MATCHING_WHEEL" ]; then
287-
echo "Installing wheel: $MATCHING_WHEEL"
292+
echo "Installing matching wheel: $MATCHING_WHEEL"
288293
python -m pip install "$MATCHING_WHEEL"
289294
else
290-
echo "No matching wheel found for Python $PYTHON_VERSION. Available wheels:"
291-
ls -la ./wheels/
292-
echo "Falling back to installing any available wheel..."
295+
echo "No matching wheel found for Python $PY_VER. Installing any available wheel..."
293296
python -m pip install ./wheels/*.whl
294297
fi
295298
296299
# Install data packages
297-
echo "Installing data packages..."
300+
echo "Installing data packages:"
301+
ls -la ./data_packages/
298302
python -m pip install ./data_packages/*.whl
299303
304+
# Verify installation
305+
python -c "import mpl_toolkits.basemap; print('Basemap version:', mpl_toolkits.basemap.__version__)"
306+
300307
- name: Install documentation requirements
301308
run: |
302309
cd packages/basemap

0 commit comments

Comments
 (0)