-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
39 lines (33 loc) · 1013 Bytes
/
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
import os
import pathlib
import re
from setuptools import find_packages, setup
here = pathlib.Path(__file__).parent.resolve()
long_description = (here / "README.md").read_text(encoding="utf-8")
def get_version():
version_file = os.path.join("ebook2text", "VERSION.py")
with open(version_file) as f:
version_content = f.read()
version_match = re.search(
r"^__version__ = ['\"]([^'\"]*)['\"]", version_content, re.M
)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
setup(
name="ebook2text",
version=get_version(),
description="Convert common book file types to text for machine learning",
long_description=long_description,
author="Ashlynn Antrobus",
author_email="ashlynn@prosepal.io",
packages=find_packages(),
install_requires=[
"pdfminer.six",
"pillow",
"beautifulsoup4",
"python-docx",
"python-dotenv",
"openai",
],
)