-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
47 lines (35 loc) · 1.27 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
import io
import os
import re
from setuptools import find_packages, setup
REQUIREMENTS_FILE = "requirements.txt"
def parse_requirements() -> list:
with open(REQUIREMENTS_FILE) as f:
reqs = f.read().splitlines()
reqs = [r.strip() for r in reqs if r.strip()] # remove empty lines
reqs = [r for r in reqs if not r.startswith("#")] # remove line comments
# remove comments
reqs = [r.split("#", 1)[0].strip() if "#" in r else r for r in reqs]
return reqs
def read(filename: str) -> str:
filename = os.path.join(os.path.dirname(__file__), filename)
text_type = type(u"")
with io.open(filename, mode="r", encoding='utf-8') as fd:
return re.sub(text_type(r':[a-z]+:`~?(.*?)`'), text_type(r'``\1``'), fd.read())
setup(
name="memory_copilot",
version="0.1.0",
url="https://github.com/Smilexuhc/memory_copilot",
author="Smile",
author_email="[email protected]",
description="Your external memory and personal assistant",
long_description=read("README.md"),
packages=find_packages(exclude=('memory_copilot/experimental')),
include_package_data=True,
install_requires=parse_requirements(),
entry_points={
'console_scripts': [
'mem-copilot = memory_copilot.cli:cli',
]
}
)