Skip to content

Commit

Permalink
get conda build dependencies from pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
dougiesquire committed Jan 17, 2024
1 parent 2c1a4d7 commit 14bba8c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
14 changes: 5 additions & 9 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{% set data = load_setup_py_data(setup_file='../setup.py', from_recipe_dir=True) %}
{% set version = data.get('version') %}
{% set pyproj = load_file_data('../pyproject.toml', from_recipe_dir=True) %}
{% set project = pyproj.get('project') %}

package:
name: payu
Expand All @@ -21,15 +23,9 @@ requirements:
- versioneer
run:
- python >=3.9
- f90nml >=0.16
- yamanifest >=0.3.4
- PyYAML
- requests
- python-dateutil
- tenacity
- cftime
- GitPython >=3.1.40
- ruamel.yaml >=0.18.5
{% for dep in project.get('dependencies', []) %}
- {{ dep }}
{% endfor %}

test:
imports:
Expand Down
15 changes: 9 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,19 @@ classifiers = [
]
keywords = ["climate model", "workflow"]
dynamic = ["version"]
# The dependencies here are also used by the conda build and so must follow
# conda package match specifications, see here:
# https://docs.conda.io/projects/conda-build/en/stable/resources/package-spec.html#package-match-specifications
dependencies = [
"f90nml >= 0.16",
"yamanifest >= 0.3.4",
"f90nml >=0.16",
"yamanifest >=0.3.4",
"PyYAML",
"requests[security]",
"requests",
"python-dateutil",
"tenacity!=7.0.0",
"tenacity >=8.0.0",
"cftime",
"GitPython >= 3.1.40",
"ruamel.yaml >= 0.18.5"
"GitPython >=3.1.40",
"ruamel.yaml >=0.18.5"
]

[project.optional-dependencies]
Expand Down

0 comments on commit 14bba8c

Please sign in to comment.