Skip to content

Commit ec8da94

Browse files
Merge pull request #147 from scipp/conda-deps-from-pyproject
Define conda run requirements from pyproject.toml dependencies
2 parents 927412b + f88e1a1 commit ec8da94

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

template/conda/meta.yaml.jinja

+10
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,22 @@ package:
66
source:
77
path: ..
88

9+
{% raw %}
10+
{% set pyproject = load_file_data('pyproject.toml') %}
11+
{% set dependencies = pyproject.get('project', {}).get('dependencies', {}) %}
12+
{% endraw %}
13+
914
requirements:
1015
build:
1116
- setuptools
1217
- setuptools_scm
1318
run:
1419
- python>={{min_python}}
20+
{% raw %}
21+
{% for package in dependencies %}
22+
- {% if package == "graphviz" %}python-graphviz{% else %}{{ package }}{% endif %}
23+
{% endfor %}
24+
{% endraw %}
1525

1626
test:
1727
imports:

0 commit comments

Comments
 (0)