1- # possibly superseded by recipe.yaml
2- # TODO: decide for package builder and clean up
3- {% set setup_py_data = load_setup_py_data() %}
1+ {% set pyproject = load_file_data('pyproject.toml') %}
2+ {% set version_match = load_file_regex(
3+ load_file="bioimageio/spec/__init__.py",
4+ regex_pattern='^__version__ = "(.+)"') %}
5+ {% set version = version_match[1] %}
46
57package :
6- name : bioimageio.spec
7- version : {{ setup_py_data[' version'] }}
8+ name : {{ pyproject['project']['name'] }}
9+ version : {{ version }}
810
911source :
1012 path : ..
1113
1214requirements :
1315 build :
14- - python >=3.8,<3.13
16+ - python {{ pyproject['project']['requires-python'] }}
1517 - pip
1618 run :
17- - python >=3.8,<3.13
18- {% for dep in setup_py_data['install_requires '] %}
19+ - python {{ pyproject['project']['requires-python'] }}
20+ {% for dep in pyproject['project']['dependencies '] %}
1921 - {{ dep.lower() }}
2022 {% endfor %}
2123
@@ -27,18 +29,16 @@ build:
2729
2830test :
2931 imports :
30- - bioimageio.spec
32+ - {{ pyproject['project']['name'] }}
3133 source_files :
3234 - tests
3335 - example_descriptions
3436 requires :
35- {% for dep in setup_py_data['extras_require']['dev'] %}
36- {% if dep not in ('json_schema_for_humans',): %}
37- - {{ dep.replace('torch', 'pytorch').lower() }}
38- {% endif %}
37+ {% for dep in pyproject['project']['optional-dependencies']['dev'] %}
38+ - {{ dep.replace('torch', 'pytorch').lower().replace('_', '-') }}
3939 {% endfor %}
4040 commands :
41- - pytest -n auto - -capture=no
41+ - pytest --capture=no
4242
4343about :
4444 home : https://github.com/bioimage-io/spec-bioimage-io
0 commit comments