Skip to content

Commit 6ef789b

Browse files
committed
update conda recipe
1 parent b7cff31 commit 6ef789b

File tree

2 files changed

+14
-71
lines changed

2 files changed

+14
-71
lines changed

conda-recipe/meta.yaml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
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

57
package:
6-
name: bioimageio.spec
7-
version: {{ setup_py_data['version'] }}
8+
name: {{ pyproject['project']['name'] }}
9+
version: {{ version }}
810

911
source:
1012
path: ..
1113

1214
requirements:
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

2830
test:
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

4343
about:
4444
home: https://github.com/bioimage-io/spec-bioimage-io

conda-recipe/recipe.yaml

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)