Skip to content
Snippets Groups Projects
Verified Commit dc93ec15 authored by Yoann Schneider's avatar Yoann Schneider :tennis:
Browse files

Mention dependencies in pyproject.toml

parent 2708f580
No related branches found
No related tags found
1 merge request!457Mention dependencies in pyproject.toml
Pipeline #145680 passed
......@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "arkindex-base-worker"
description = "Base Worker to easily build Arkindex ML workflows"
dynamic = ["version", "optional-dependencies"]
dynamic = ["version", "dependencies", "optional-dependencies"]
authors = [
{ name = "Teklia", email = "contact@teklia.com" },
]
......@@ -33,6 +33,10 @@ Repository = "https://gitlab.teklia.com/workers/base-worker"
"Bug Tracker" = "https://gitlab.teklia.com/workers/base-worker/issues"
Authors = "https://teklia.com"
[tool.setuptools.dynamic]
dependencies = {file = ["requirements.txt"]}
optional-dependencies = {docs = { file = ["docs-requirements.txt"] }}
[tool.ruff]
exclude = [".git", "__pycache__"]
ignore = ["E501"]
......
......@@ -3,16 +3,7 @@ from pathlib import Path
from setuptools import find_packages, setup
def requirements(path: Path):
assert path.exists(), f"Missing requirements {path}"
with path.open() as f:
return list(map(str.strip, f.read().splitlines()))
setup(
version=Path("VERSION").read_text().strip(),
install_requires=requirements(Path("requirements.txt")),
extras_require={"docs": requirements(Path("docs-requirements.txt"))},
packages=find_packages(),
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment