-
Notifications
You must be signed in to change notification settings - Fork 117
Expand file tree
/
Copy pathsetup.py
More file actions
77 lines (67 loc) · 2.43 KB
/
setup.py
File metadata and controls
77 lines (67 loc) · 2.43 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/usr/bin/env python
"""
OpenOCR - Accurate and Efficient General OCR System
"""
from setuptools import setup, find_packages
import os
# Read the contents of README file
def read_file(filename):
filepath = os.path.join(os.path.dirname(__file__), 'openocr', filename)
if os.path.exists(filepath):
with open(filepath, encoding='utf-8') as f:
return f.read()
return ''
# Get version
def get_version():
version_file = os.path.join(os.path.dirname(__file__), 'openocr', '__init__.py')
with open(version_file, 'r', encoding='utf-8') as f:
for line in f:
if line.startswith('__version__'):
return line.split('=')[1].strip().strip('"').strip("'")
return '0.1.0'
setup(
name='openocr-python',
version=get_version(),
description='Accurate and Efficient General OCR System',
long_description=read_file('QUICKSTART.md'),
long_description_content_type='text/markdown',
author='OCR Team, FVL Lab',
author_email='784990967@qq.com',
url='https://github.com/Topdu/OpenOCR',
license='Apache License 2.0',
# Package configuration
packages=find_packages(),
include_package_data=True,
# Python version requirement
python_requires='>=3.8',
# Entry points for command-line scripts
entry_points={
'console_scripts': [
'openocr=openocr.openocr:main',
],
},
# Classifiers
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
'Topic :: Scientific/Engineering :: Image Recognition',
'Topic :: Software Development :: Libraries :: Python Modules',
],
# Keywords
keywords='ocr, optical character recognition, text detection, text recognition, document parsing, deep learning, computer vision',
# Project URLs
project_urls={
'Bug Reports': 'https://github.com/Topdu/OpenOCR/issues',
'Source': 'https://github.com/Topdu/OpenOCR',
'Documentation': 'https://github.com/Topdu/OpenOCR/tree/main/docs',
},
# Zip safe
zip_safe=False,
)