-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
28 lines (22 loc) · 842 Bytes
/
setup.py
File metadata and controls
28 lines (22 loc) · 842 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from setuptools import setup, find_packages
import tomllib
def gather_dependencies(toml_path: str = "pyproject.toml") -> list[str]:
with open(toml_path, "rb") as f:
data = tomllib.load(f)
# Try Poetry first
poetry_deps = data.get("tool", {}).get("poetry", {}).get("dependencies", {})
if poetry_deps:
return [f"{dep}{version}" for dep, version in poetry_deps.items()]
# Fall back to PEP 621
project_deps: list[str] = data.get("project", {}).get("dependencies", [])
return project_deps
setup(
name="detectmateperformace",
version="0.1",
package_dir={"": "src"},
packages=find_packages(where="src"),
description="A library for HPC operations in DetectMate",
author="Andre Garcia Gomez",
author_email="andre@example.com",
install_requires=gather_dependencies(),
)