forked from NousResearch/hermes-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
28 lines (20 loc) · 687 Bytes
/
setup.py
File metadata and controls
28 lines (20 loc) · 687 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 __future__ import annotations
from collections import defaultdict
from pathlib import Path
from setuptools import setup
REPO_ROOT = Path(__file__).parent.resolve()
def _data_file_tree(root_name: str) -> list[tuple[str, list[str]]]:
root = REPO_ROOT / root_name
grouped: defaultdict[str, list[str]] = defaultdict(list)
for path in sorted(root.rglob("*")):
if not path.is_file():
continue
rel_path = path.relative_to(REPO_ROOT)
grouped[str(rel_path.parent)].append(str(rel_path))
return sorted(grouped.items())
setup(
data_files=[
*_data_file_tree("skills"),
*_data_file_tree("optional-skills"),
]
)