Skip to content

Commit

Permalink
Merge pull request #17102 from mvdbeek/fix_loading_default_tools_in_p…
Browse files Browse the repository at this point in the history
…ackaged_galaxy

[23.1] Set correct tool_path for packaged galaxy
  • Loading branch information
mvdbeek authored Nov 29, 2023
2 parents ac5ebae + 63c7402 commit cd46ff3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/galaxy/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,14 @@ def _process_config(self, kwargs: Dict[str, Any]) -> None:
self.install_database_engine_options = get_database_engine_options(kwargs, model_prefix="install_")
self.shared_home_dir = kwargs.get("shared_home_dir")
self.cookie_path = kwargs.get("cookie_path")
self.tool_path = self._in_root_dir(self.tool_path)
if not running_from_source and kwargs.get("tool_path") is None:
try:
self.tool_path = str(files("galaxy.tools") / "bundled")
except ModuleNotFoundError:
# Might not be a full galaxy installation
self.tool_path = self._in_root_dir(self.tool_path)
else:
self.tool_path = self._in_root_dir(self.tool_path)
self.tool_data_path = self._in_root_dir(self.tool_data_path)
if not running_from_source and kwargs.get("tool_data_path") is None:
self.tool_data_path = self._in_data_dir(self.schema.defaults["tool_data_path"])
Expand Down

0 comments on commit cd46ff3

Please sign in to comment.