Skip to content

Commit b837bce

Browse files
authored
Merge pull request #21688 from bernt-matthias/conditional-requirements-templates
[26.0] Check file source template config files for determining conditional dependencies + add constraint for zero-ice
2 parents 83b2536 + bac844c commit b837bce

File tree

4 files changed

+17
-3
lines changed

4 files changed

+17
-3
lines changed

lib/galaxy/dependencies/__init__.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
parse_xml,
2121
which,
2222
)
23+
from galaxy.util.config_templates import apply_syntactic_sugar
2324
from galaxy.util.properties import (
2425
find_config_file,
2526
load_app_properties,
@@ -151,14 +152,21 @@ def collect_types(from_dict):
151152

152153
# Parse file sources config
153154
file_sources_conf_yml = self.config_object.file_sources_config_file
154-
155155
if exists(file_sources_conf_yml):
156156
with open(file_sources_conf_yml) as f:
157157
file_sources_conf = yaml.safe_load(f)
158158
else:
159159
file_sources_conf = []
160160
self.file_sources = [c.get("type", None) for c in file_sources_conf]
161161

162+
# Parse file source templates config
163+
file_source_templates_conf_yml = self.config_object.file_source_templates_config_file
164+
if exists(file_source_templates_conf_yml):
165+
with open(file_source_templates_conf_yml) as f:
166+
file_source_templates_conf = apply_syntactic_sugar(yaml.safe_load(f))
167+
for file_source_template in file_source_templates_conf:
168+
self.file_sources.append(file_source_template["configuration"].get("type"))
169+
162170
# Parse vault config
163171
vault_conf_yml = self.config_object.vault_config_file
164172
if exists(vault_conf_yml):
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
zeroc-ice @ https://github.com/ome/zeroc-ice-py-github-ci/releases/download/0.2.0/zeroc_ice-3.6.5-cp310-cp310-linux_x86_64.whl ; platform_system=="Linux" and python_version=="3.10" #type: omero
2+
zeroc-ice @ https://github.com/glencoesoftware/zeroc-ice-py-linux-x86_64/releases/download/20240202/zeroc_ice-3.6.5-cp311-cp311-manylinux_2_28_x86_64.whl ; platform_system=="Linux" and python_version=="3.11" #type: omero
3+
zeroc-ice @ https://github.com/glencoesoftware/zeroc-ice-py-linux-x86_64/releases/download/20240202/zeroc_ice-3.6.5-cp312-cp312-manylinux_2_28_x86_64.whl ; platform_system=="Linux" and python_version=="3.12" #type: omero
4+
zeroc-ice @ https://github.com/glencoesoftware/zeroc-ice-py-macos-universal2/releases/download/20240131/zeroc_ice-3.6.5-cp310-cp310-macosx_11_0_universal2.whl ; platform_system!="Windows" and platform_system!="Linux" and python_version=="3.10" #type: omero
5+
zeroc-ice @ https://github.com/glencoesoftware/zeroc-ice-py-macos-universal2/releases/download/20240131/zeroc_ice-3.6.5-cp311-cp311-macosx_11_0_universal2.whl ; platform_system!="Windows" and platform_system!="Linux" and python_version=="3.11" #type: omero
6+
zeroc-ice @ https://github.com/glencoesoftware/zeroc-ice-py-macos-universal2/releases/download/20240131/zeroc_ice-3.6.5-cp312-cp312-macosx_11_0_universal2.whl ; platform_system!="Windows" and platform_system!="Linux" and python_version=="3.12" #type: omero

lib/galaxy/dependencies/conditional-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ fs-azureblob # type: azure
3333
rspace-client>=2.6.1,<3 # type: rspace
3434
adlfs
3535
huggingface_hub
36-
omero-py #type: omero # Requires manual installation of additional dependencies, see https://omero.readthedocs.io/en/stable/developers/Python.html#omero-python-language-bindings
36+
omero-py #type: omero
3737

3838
# Vault backend
3939
hvac

scripts/common_startup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ if [ $FETCH_WHEELS -eq 1 ]; then
210210
echo "An older version of psycopg2 (non-binary, version 2.7.3) has been detected. Galaxy now uses psycopg2-binary, which will be installed after removing psycopg2."
211211
${PIP_CMD} uninstall ${UNINSTALL_OPTIONS} psycopg2 psycopg2-binary
212212
fi
213-
echo "$GALAXY_CONDITIONAL_DEPENDENCIES" | ${PIP_CMD} install -r /dev/stdin --extra-index-url "${GALAXY_WHEELS_INDEX_URL}"
213+
echo "$GALAXY_CONDITIONAL_DEPENDENCIES" | ${PIP_CMD} install -r /dev/stdin --extra-index-url "${GALAXY_WHEELS_INDEX_URL}" --constraint lib/galaxy/dependencies/conditional-constraints.txt
214214
fi
215215
fi
216216

0 commit comments

Comments
 (0)