Skip to content

Commit

Permalink
Merge pull request #7 from natcap/plugin-conda-deps
Browse files Browse the repository at this point in the history
Get plugin conda dependencies from plugin metadata
  • Loading branch information
dcdenu4 authored Oct 22, 2024
2 parents ec50151 + f0689db commit f089ac1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion workbench/src/main/setupAddRemovePlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,14 @@ export function setupAddPlugin() {
// Create a conda env containing the plugin and its dependencies
const envName = `invest_plugin_${pluginID}`;
const mamba = settingsStore.get('mamba');
let depString = '';
if (pyprojectTOML.conda_dependencies) {
depString = pyprojectTOML.conda_dependencies.map(
(dependency) => `"${dependency}"`
).join(' ');
}
execSync(
`${mamba} create --yes --name ${envName} -c conda-forge "python<3.12" "gdal<3.6"`,
`${mamba} create --yes --name ${envName} -c conda-forge ${depString}`,
{ stdio: 'inherit', windowsHide: true }
);
logger.info('created mamba env for plugin');
Expand Down

0 comments on commit f089ac1

Please sign in to comment.