-
Notifications
You must be signed in to change notification settings - Fork 76
Expand file tree
/
Copy pathsetup.py
More file actions
60 lines (49 loc) · 1.83 KB
/
setup.py
File metadata and controls
60 lines (49 loc) · 1.83 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
# pylint: skip-file
import os
from setuptools import find_packages, setup
pwd = os.path.dirname(__file__)
version_file = "graphgen/_version.py"
def readme():
with open(os.path.join(pwd, "README.md"), encoding="utf-8") as f:
content = f.read()
return content
def get_version():
with open(os.path.join(pwd, version_file), "r") as f:
exec(compile(f.read(), version_file, "exec"))
return locals()["__version__"]
def read_requirements():
lines = []
with open("requirements.txt", "r") as f:
for line in f.readlines():
if line.startswith("#"):
continue
if "textract" in line:
continue
if len(line) > 0:
lines.append(line)
return lines
install_packages = read_requirements()
if __name__ == "__main__":
setup(
name="graphg",
version=get_version(),
url="https://github.com/open-sciencelab/GraphGen",
description="GraphGen: Enhancing Supervised Fine-Tuning for LLMs with Knowledge-Driven Synthetic Data Generation",
long_description=readme(),
long_description_content_type="text/markdown",
author="open-sciencelab",
author_email="open-sciencelab@pjlab.org.cn",
packages=find_packages(exclude=["models"]),
package_data={"GraphGen": ["configs/*"]},
include_package_data=True,
install_requires=install_packages,
classifiers=[
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
],
entry_points={"console_scripts": ["graphg=graphgen.generate:main"]},
)