-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
66 lines (61 loc) · 1.86 KB
/
setup.py
File metadata and controls
66 lines (61 loc) · 1.86 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
66
import os
import sys
from setuptools import find_packages, setup
from setuptools.command.sdist import sdist
import shutil
files_copy = {
"RoutingDirectorMCP.py": "RoutingDirectorMCP.py",
"utils/lm_calls/paragon/constants.py": "utils/lm_calls/paragon/constants.py",
"requirements.txt": "requirements.txt",
"setup.py": "setup.py",
"README.md": "README.md",
"jrd-2.8.0-mcp-spec.json": "jrd-2.8.0-mcp-spec.json",
}
version = "v2.8.0"
class CustomBuildCommand(sdist):
def run(self):
dist_name = self.distribution.get_fullname()
for src, dest in files_copy.items():
dest = os.path.join(dist_name, dest)
print("----", src, dest)
os.makedirs(os.path.dirname(dest), exist_ok=True)
shutil.copy(src, dest)
# Run the standard install
super().run()
def get_requirements():
"""
Get list of requirements by reading requirements
"""
reqs = []
with open('requirements.txt') as fob:
for line in fob.readlines():
line = line.strip()
if line and \
not line.startswith('#') and \
not line.startswith('--'):
reqs.append(line)
return reqs
setup(
name="RoutingDirectorMCP",
version=version,
package_dir={'': './'},
install_requires=get_requirements(),
packages=[
"utils.lm_calls.tools",
"utils.lm_calls.tools.assets",
"utils.lm_calls.tools.ems",
"utils.lm_calls.tools.observability",
"utils.lm_calls.tools.network_optimization",
"utils.lm_calls.tools.trust",
"utils.lm_calls.tools.active_assurance",
"utils.lm_calls.tools.routing_intelligence",
"utils.mcp",
"utils.lm_calls.connection",
],
cmdclass={
'sdist': CustomBuildCommand,
},
package_data={
'': ['*.txt'],
},
)