Repository navigation
Expand file tree
/
Copy pathsetup.py
More file actions
65 lines (60 loc) · 1.95 KB
/
Copy pathsetup.py
File metadata and controls
65 lines (60 loc) · 1.95 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
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
from setuptools import setup, find_packages
import os
import re
def get_version():
"""Read version from debiaiServer/swagger.yaml using regex"""
swagger_path = os.path.join(
os.path.dirname(__file__), "debiaiServer", "swagger.yaml"
)
try:
with open(swagger_path, "r") as f:
content = f.read()
# Match version: "X.Y.Z" or version: X.Y.Z
match = re.search(r'version:\s*["\']?([0-9.]+)["\']?', content)
if match:
return match.group(1)
raise ValueError("Version not found in swagger.yaml")
except (FileNotFoundError, ValueError) as e:
raise RuntimeError(
f"Cannot find version information in {swagger_path}. "
"Ensure that the version is specified in the swagger.yaml file. "
f"Error: {e}"
) from e
VERSION = get_version()
setup(
name="debiai_gui",
version=VERSION,
packages=find_packages(include=["debiaiServer", "debiaiServer.*"]),
include_package_data=True,
install_requires=[
"Flask==2.2.3",
"flask_cors==3.0.8",
"connexion==2.14.2",
"requests>=2.27",
"swagger-ui-bundle==0.0.5",
"ujson==5.8.0",
"kafka-python==2.0.3",
"openapi_spec_validator==0.2.8",
"cacheout==0.14.1",
"termcolor==2.3.0",
"werkzeug>=2.2.2",
"psutil==6.0.0",
"waitress==3.0.0",
"pickledb==1.3.2",
],
entry_points={
"console_scripts": [
"debiai-gui=debiaiServer.debiai_gui_utils:main",
],
},
author="IRT-Systemx",
author_email="debiai@irt-systemx.fr",
description="DebiAI easy start module, the standalone version of DebiAI",
long_description=open("debiai_gui.md").read(),
long_description_content_type="text/markdown",
url="https://github.com/debiai/DebiAI",
classifiers=[
"Programming Language :: Python :: 3",
],
python_requires=">=3.6",
)