-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
52 lines (42 loc) · 1.38 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
from setuptools import setup
from setuptools.command.build_py import build_py
from shutil import copytree
from os.path import join
class BuildCommand(build_py):
def run(self) -> None:
build_py.run(self)
if not self.dry_run:
target_dir = join(self.build_lib, 'tree-sitter-java')
copytree('./tree-sitter-java', target_dir)
def parse_requirements_file(filename):
with open(filename) as fid:
requires = [line.strip() for line in fid.readlines() if not line.startswith("#")]
return requires
install_requires = parse_requirements_file("requirements/default.txt")
extras_require = {}
packages = [
'program_graphs',
'program_graphs.utils',
'program_graphs.adg',
'program_graphs.adg.parser',
'program_graphs.adg.parser.java',
'program_graphs.cfg',
'program_graphs.cfg.parser',
'program_graphs.cfg.parser.java',
'program_graphs.ddg',
'program_graphs.ddg.parser',
'program_graphs.ddg.parser.java'
]
setup(
name="program_graphs",
description="A python library to build graphs for programs written in different programming languages.",
version="0.1",
packages=packages,
author="Anton Cheshkov",
python_requires=">=3.7",
install_requires=install_requires,
extras_require=extras_require,
include_package_data=True,
zip_safe=False,
cmdclass={"build_py": BuildCommand}
)