Skip to content

Commit f09ff26

Browse files
committed
Enhance dependency management in installation script and CI workflow
- Introduce CONDA_ONLY_PACKAGES in install_dev_deps.py to prevent specific packages from being installed via pip. - Update GitHub Actions workflow to include 'gdal' in the initial dependency installation for improved functionality.
1 parent 470b9fd commit f09ff26

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.github/workflows/test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ jobs:
4747
- name: Install dependencies
4848
shell: bash -l {0}
4949
run: |
50-
# Install tomlkit and sh first to run the installation script
51-
mamba install -y -c conda-forge tomlkit sh
50+
# Install core dependencies via mamba first
51+
mamba install -y -c conda-forge tomlkit sh gdal
5252
5353
# Run the installation script
5454
python install_dev_deps.py

install_dev_deps.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
# Define packages that should be installed via pip instead of conda
99
PIP_PACKAGES = {"build", "pip-tools", "planets"}
1010

11+
# Define packages that should NEVER be installed via pip
12+
CONDA_ONLY_PACKAGES = {"gdal"}
13+
1114

1215
def install_deps():
1316
# Read pyproject.toml
@@ -23,7 +26,11 @@ def install_deps():
2326

2427
# Split dependencies into conda and pip packages
2528
conda_deps = [dep for dep in all_deps if dep not in PIP_PACKAGES]
26-
pip_deps = [dep for dep in all_deps if dep in PIP_PACKAGES]
29+
pip_deps = [
30+
dep
31+
for dep in all_deps
32+
if dep in PIP_PACKAGES and dep.lower() not in CONDA_ONLY_PACKAGES
33+
]
2734

2835
# Install conda packages
2936
if conda_deps:

0 commit comments

Comments
 (0)