Migrate to pyproject.toml

This commit is contained in:
2025-11-06 13:51:26 +01:00
parent 58ef47468e
commit 57c0037289
4 changed files with 54 additions and 32 deletions

View File

@@ -1,8 +1,10 @@
{% set data = load_setup_py_data() %}
{% set version_match = load_file_regex(load_file="pyzebra/__init__.py", regex_pattern='__version__ = "(.+?)"') %}
{% set version = version_match[1] %}
{% set pyproject = load_file_data('pyproject.toml') %}
package:
name: pyzebra
version: {{ data['version'] }}
name: {{ pyproject['project']['name'] }}
version: {{ version }}
source:
path: ..
@@ -10,26 +12,25 @@ source:
build:
script: python -m pip install .
noarch: python
number: 0
entry_points:
- pyzebra = pyzebra.app.cli:main
requirements:
build:
host:
- python >=3.8
- setuptools
- hatchling
run:
- python >=3.8
- numpy
- scipy
- h5py
- bokeh =2.4
- numba
- lmfit >=1.0.2
{% for dep in pyproject['project']['dependencies'] %}
- {{ dep }}
{% endfor %}
about:
home: https://gitlab.psi.ch/zebra/pyzebra
summary: {{ data['description'] }}
license: GNU GPLv3
license_file: LICENSE
home: {{ pyproject['project']['urls']['Homepage'] }}
summary: {{ pyproject['project']['description'] }}
license: {{ pyproject['project']['license'] }}
license_file:
{% for lf in pyproject['project']['license-files'] %}
- {{ lf }}
{% endfor %}