-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathsetup.py
More file actions
40 lines (33 loc) · 1.17 KB
/
setup.py
File metadata and controls
40 lines (33 loc) · 1.17 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
import setuptools
import os
with open(os.path.abspath('./req_freeze.txt'), encoding='utf-8') as f:
requirements = f.readlines()
requires = [x.strip() for x in requirements]
# Taken from https://github.com/psf/requests/blob/main/setup.py#L76
about = {}
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, "askyourdocs", "__version__.py"), "r", encoding="utf-8") as f:
exec(f.read(), about)
# https://stackoverflow.com/a/36693250
def package_files(directory):
paths = []
for (path, directories, filenames) in os.walk(directory):
for filename in filenames:
paths.append(os.path.join('..', path, filename))
return paths
extra_files = package_files('resources')
setuptools.setup(
name='askyourdocs',
version=about["__version__"],
author="LLM Taskforce",
description="Ask your documents project by the international llm taskforce",
packages=setuptools.find_packages(),
package_dir={'askyourdocs': 'askyourdocs'},
entry_points={
'console_scripts': [
'ayd = askyourdocs.main:main',
],
},
package_data={'askyourdocs': extra_files},
install_requires=requires
)