-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
84 lines (72 loc) · 2.24 KB
/
setup.py
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
from tsellm import __version__
from setuptools import setup, Command
import os
import shutil
import glob
def get_long_description():
with open(
os.path.join(os.path.dirname(os.path.abspath(__file__)), "README.md"),
encoding="utf8",
) as fp:
return fp.read()
class CleanCommand(Command):
"""Custom clean command to tidy up the project root."""
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
# Paths to clean
files_to_remove = ["*.jpg", "*.sqlite3", "*.duckdb"]
dirs_to_clean = ["build", "dist", "*.egg-info"]
for pattern in files_to_remove:
for file in glob.glob(pattern):
try:
os.remove(file)
print(f"Removed file: {file}")
except Exception as e:
print(f"Could not remove {file}: {e}")
for pattern in dirs_to_clean:
for dir in glob.glob(pattern):
try:
shutil.rmtree(dir)
print(f"Removed directory: {dir}")
except Exception as e:
print(f"Could not remove {dir}: {e}")
setup(
name="tsellm",
description=__version__.__description__,
long_description=get_long_description(),
long_description_content_type="text/markdown",
author="Florents Tselai",
url="https://github.com/Florents-Tselai/tsellm",
entry_points="""
[console_scripts]
tsellm=tsellm.cli:cli
""",
cmdclass={
"clean": CleanCommand,
},
project_urls={
"Issues": "https://github.com/Florents-Tselai/tsellm/issues",
"CI": "https://github.com/Florents-Tselai/tsellm/actions",
"Changelog": "https://github.com/Florents-Tselai/tsellm/releases",
},
license="BSD License",
version=__version__.__version__,
packages=["tsellm"],
install_requires=["llm", "setuptools", "pip", "duckdb"],
extras_require={
"test": [
"pytest",
"pytest-cov",
"black",
"ruff",
"sqlite_utils",
"llm-markov",
"llm-embed-hazo==0.2.1",
]
},
python_requires=">=3.11",
)