-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
35 lines (29 loc) · 1.03 KB
/
setup.py
File metadata and controls
35 lines (29 loc) · 1.03 KB
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
29
30
31
32
33
34
35
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="detectmatelibrary",
version="0.1.0",
package_dir={"": "src"},
packages=find_packages(where="src"),
description="DetectMate Library for log processing components",
author="voice",
author_email="voice@example.com",
install_requires=gather_dependencies(),
data_files=[(
"src/tools/workspace/templates/data",
[
"src/tools/workspace/templates/data/logs.json",
"src/tools/workspace/templates/data/parsed_log.json",
]
)]
)