Skip to content

Commit cbfb3a4

Browse files
committed
conda environments excluded problematic QGIS builds
addresses conda-forge/qgis-feedstock#570
1 parent 6a99474 commit cbfb3a4

File tree

7 files changed

+26
-17
lines changed

7 files changed

+26
-17
lines changed

.env/conda/enmapbox_full.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# EnMAP-Box conda environment (generated 2025-12-15 15:54:09)
1+
# EnMAP-Box conda environment (generated 2025-12-23 09:57:51)
22
# run to install: conda env create -n enmapbox_full --file=enmapbox_full.yml
33
# run to update : conda env update -n enmapbox_full --file=enmapbox_full.yml --prune
44
# run to delete : conda env remove -n enmapbox_full
@@ -8,7 +8,7 @@
88
channels:
99
- conda-forge
1010
dependencies:
11-
- qgis
11+
- qgis!=3.44.5
1212
- astropy
1313
- catboost
1414
- cdsapi

.env/conda/enmapbox_full_3.40.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# EnMAP-Box conda environment (generated 2025-12-15 11:35:55)
1+
# EnMAP-Box conda environment (generated 2025-12-23 09:57:45)
22
# run to install: conda env create -n enmapbox_full_3.40 --file=enmapbox_full_3.40.yml
33
# run to update : conda env update -n enmapbox_full_3.40 --file=enmapbox_full_3.40.yml --prune
44
# run to delete : conda env remove -n enmapbox_full_3.40
@@ -8,10 +8,11 @@
88
channels:
99
- conda-forge
1010
dependencies:
11-
- qgis=3.40
11+
- qgis=3.40,!=3.44.5
1212
- astropy
1313
- catboost
1414
- cdsapi
15+
- colorama
1516
- cython
1617
- docutils
1718
- enpt

.env/conda/enmapbox_full_ltr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# EnMAP-Box conda environment (generated 2025-12-15 15:54:09)
1+
# EnMAP-Box conda environment (generated 2025-12-23 09:57:51)
22
# run to install: conda env create -n enmapbox_full_ltr --file=enmapbox_full_ltr.yml
33
# run to update : conda env update -n enmapbox_full_ltr --file=enmapbox_full_ltr.yml --prune
44
# run to delete : conda env remove -n enmapbox_full_ltr
@@ -8,7 +8,7 @@
88
channels:
99
- conda-forge
1010
dependencies:
11-
- qgis=3.40
11+
- qgis=3.40,!=3.44.5
1212
- astropy
1313
- catboost
1414
- cdsapi

.env/conda/enmapbox_light.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# EnMAP-Box conda environment (generated 2025-12-15 15:54:09)
1+
# EnMAP-Box conda environment (generated 2025-12-23 09:57:51)
22
# run to install: conda env create -n enmapbox_light --file=enmapbox_light.yml
33
# run to update : conda env update -n enmapbox_light --file=enmapbox_light.yml --prune
44
# run to delete : conda env remove -n enmapbox_light
@@ -8,7 +8,7 @@
88
channels:
99
- conda-forge
1010
dependencies:
11-
- qgis
11+
- qgis!=3.44.5
1212
- colorama
1313
- docutils
1414
- enpt

.env/conda/enmapbox_light_3.40.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# EnMAP-Box conda environment (generated 2025-12-15 11:36:01)
1+
# EnMAP-Box conda environment (generated 2025-12-23 09:57:45)
22
# run to install: conda env create -n enmapbox_light_3.40 --file=enmapbox_light_3.40.yml
33
# run to update : conda env update -n enmapbox_light_3.40 --file=enmapbox_light_3.40.yml --prune
44
# run to delete : conda env remove -n enmapbox_light_3.40
@@ -8,7 +8,8 @@
88
channels:
99
- conda-forge
1010
dependencies:
11-
- qgis=3.40
11+
- qgis=3.40,!=3.44.5
12+
- colorama
1213
- docutils
1314
- enpt
1415
- flake8

.env/conda/enmapbox_light_ltr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# EnMAP-Box conda environment (generated 2025-12-15 15:54:09)
1+
# EnMAP-Box conda environment (generated 2025-12-23 09:57:51)
22
# run to install: conda env create -n enmapbox_light_ltr --file=enmapbox_light_ltr.yml
33
# run to update : conda env update -n enmapbox_light_ltr --file=enmapbox_light_ltr.yml --prune
44
# run to delete : conda env remove -n enmapbox_light_ltr
@@ -8,7 +8,7 @@
88
channels:
99
- conda-forge
1010
dependencies:
11-
- qgis=3.40
11+
- qgis=3.40,!=3.44.5
1212
- colorama
1313
- docutils
1414
- enpt

scripts/update_conda_environments.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
'latest': ''
2020
}
2121

22+
# QGIS conda versions that are known to have problems
23+
# e.g., https://github.com/conda-forge/qgis-feedstock/issues/570
24+
EXCLUDED_QGIS_VERSIONS = ['3.44.5']
25+
2226
# define packages to be installed in the different *.yml files
2327
# compare with .env/requirements.csv
2428
# only define root packages, the
@@ -105,7 +109,7 @@ def get_current_qgis_versions() -> dict:
105109
return VERSIONS
106110

107111

108-
def get_conda_qgis_versions() -> dict:
112+
def get_conda_qgis_versions() -> List[str]:
109113
path_repodata = DIR_TMP / f'condaforge-repodata-{str(datetime.date.today())}.json'
110114

111115
if not path_repodata.is_file():
@@ -130,6 +134,7 @@ def get_conda_qgis_versions() -> dict:
130134
qgis_builds += [v for k, v in repodata['packages'].items() if rxPkg.match(k)]
131135
qgis_builds += [v for k, v in repodata['packages.conda'].items() if rxPkg.match(k)]
132136
qgis_versions = sorted(set([build['version'] for build in qgis_builds]))
137+
133138
return qgis_versions
134139

135140

@@ -176,11 +181,13 @@ def update_yaml(dir_yaml,
176181
deps_conda = sorted(set(deps_conda))
177182
deps_pip = sorted(set(deps_pip))
178183

179-
if ltr_version:
180-
deps_conda.insert(0, f'qgis={ltr_version}')
181-
else:
182-
deps_conda.insert(0, 'qgis')
184+
qgis_version = f'qgis={ltr_version}' if ltr_version else 'qgis'
185+
for v in EXCLUDED_QGIS_VERSIONS:
186+
if re.search(r'\d+$', qgis_version):
187+
qgis_version += ','
188+
qgis_version += f'!={v}'
183189

190+
deps_conda.insert(0, qgis_version)
184191
environment = {
185192
'name': name,
186193
'channels': ['conda-forge'],

0 commit comments

Comments
 (0)