forked from Calamari-OCR/calamari
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
47 lines (42 loc) · 1.95 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 os
from pathlib import Path
from setuptools import setup, find_packages
this_dir = os.path.dirname(os.path.realpath(__file__))
# Parse version
main_ns = {}
with open(os.path.join(this_dir, "calamari_ocr", "version.py")) as f:
exec(f.read(), main_ns)
__version__ = main_ns["__version__"]
# List all resources (to be included in distribution)
resources_path = Path(this_dir) / "calamari_ocr" / "resources"
resources = [r.relative_to(resources_path.parent.parent).as_posix() for r in resources_path.rglob("*") if r.is_file()]
setup(
name="calamari_ocr",
version=__version__,
packages=find_packages(),
license="Apache License 2.0",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
include_package_data=True,
author="Christoph Wick",
author_email="[email protected]",
url="https://github.com/Calamari-OCR/calamari",
download_url="https://github.com/Calamari-OCR/calamari/archive/v{}.tar.gz".format(__version__),
entry_points={
"console_scripts": [
"calamari-eval=calamari_ocr.scripts.eval:run",
"calamari-predict=calamari_ocr.scripts.predict:main",
"calamari-resume-training=calamari_ocr.scripts.resume_training:main",
"calamari-train=calamari_ocr.scripts.train:run",
"calamari-cross-fold-train=calamari_ocr.scripts.cross_fold_train:run",
"calamari-predict-and-eval=calamari_ocr.scripts.predict_and_eval:run",
"calamari-dataset-viewer=calamari_ocr.scripts.dataset_viewer:main",
"calamari-dataset-statistics=calamari_ocr.scripts.dataset_statistics:main",
],
},
python_requires=">=3.7",
install_requires=[r for r in open("requirements.txt").read().split("\n")
if not r.startswith("git+")],
keywords=["OCR", "optical character recognition", "ocropy", "ocropus", "kraken"],
data_files=[("", ["requirements.txt"] + resources)],
)