generated from FNNDSC/python-chrisapp-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
46 lines (41 loc) · 1.55 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
from setuptools import setup
import re
from pathlib import Path
def file_getVersion(rel_path: str) -> str:
"""
Retrieve the version string from the specified file.
"""
version_file = Path(rel_path)
if not version_file.exists():
raise RuntimeError(f"Version file {rel_path} not found.")
with open(version_file, "r") as f:
code = f.read()
match = re.search(r'__version__\s*:\s*Final\[str\]\s*=\s*"([^"]+)"', code)
if not match:
raise RuntimeError(f"Could not find __version__ in {rel_path}")
return match.group(1)
setup(
name="sclai",
version=file_getVersion("app/sclai.py"),
description="A Simple Client for AI Interaction",
author="FNNDSC",
author_email="[email protected]",
url="https://github.com/FNNDSC/pl-sclai",
py_modules=["app.sclai"], # Explicitly include app/sclai.py as a module
install_requires=["chris_plugin"],
license="MIT",
entry_points={
"console_scripts": ["sclai = app.sclai:main"] # Matches app/sclai.py
},
classifiers=[
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Topic :: Scientific/Engineering :: Medical Science Apps.",
],
extras_require={"none": [], "dev": ["pytest~=7.1"]},
)