-
-
Notifications
You must be signed in to change notification settings - Fork 372
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
68 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Pillow | ||
Pillow<=10.0.0 | ||
requests | ||
Flask>=2.1.0 | ||
rapidocr_onnxruntime | ||
Flask>=2.1.0, <=3.0.0 | ||
rapidocr_onnxruntime>=1.3.0,<=2.0.0 | ||
get_pypi_latest_version | ||
wheel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,21 +10,21 @@ | |
|
||
def get_readme(): | ||
root_dir = Path(__file__).resolve().parent.parent | ||
readme_path = str(root_dir / 'docs' / 'doc_whl_rapidocr_web.md') | ||
with open(readme_path, 'r', encoding='utf-8') as f: | ||
readme_path = str(root_dir / "docs" / "doc_whl_rapidocr_web.md") | ||
with open(readme_path, "r", encoding="utf-8") as f: | ||
readme = f.read() | ||
return readme | ||
|
||
|
||
MODULE_NAME = 'rapidocr_web' | ||
MODULE_NAME = "rapidocr_web" | ||
|
||
obtainer = GetPyPiLatestVersion() | ||
latest_version = obtainer(MODULE_NAME) | ||
VERSION_NUM = obtainer.version_add_one(latest_version) | ||
|
||
# 优先提取commit message中的语义化版本号,如无,则自动加1 | ||
if len(sys.argv) > 2: | ||
match_str = ' '.join(sys.argv[2:]) | ||
match_str = " ".join(sys.argv[2:]) | ||
matched_versions = obtainer.extract_version(match_str) | ||
if matched_versions: | ||
VERSION_NUM = matched_versions | ||
|
@@ -33,37 +33,40 @@ def get_readme(): | |
setuptools.setup( | ||
name=MODULE_NAME, | ||
version=VERSION_NUM, | ||
platforms='Any', | ||
description='A cross platform OCR Library based on OnnxRuntime.', | ||
platforms="Any", | ||
description="A cross platform OCR Library based on OnnxRuntime.", | ||
long_description=get_readme(), | ||
long_description_content_type='text/markdown', | ||
author='SWHL', | ||
author_email='[email protected]', | ||
url='https://github.com/RapidAI/RapidOCR', | ||
download_url='https://github.com/RapidAI/RapidOCR.git', | ||
license='Apache-2.0', | ||
long_description_content_type="text/markdown", | ||
author="SWHL", | ||
author_email="[email protected]", | ||
url="https://github.com/RapidAI/RapidOCR", | ||
download_url="https://github.com/RapidAI/RapidOCR.git", | ||
license="Apache-2.0", | ||
include_package_data=True, | ||
install_requires=['requests', 'Flask>=2.1.0', 'rapidocr_onnxruntime'], | ||
packages=[MODULE_NAME, | ||
f'{MODULE_NAME}.static.css', | ||
f'{MODULE_NAME}.static.js', | ||
f'{MODULE_NAME}.templates'], | ||
package_data={'': ['*.ico', '*.css', '*.js', '*.html']}, | ||
install_requires=["requests", "Flask>=2.1.0", "rapidocr_onnxruntime"], | ||
packages=[ | ||
MODULE_NAME, | ||
f"{MODULE_NAME}.static.css", | ||
f"{MODULE_NAME}.static.js", | ||
f"{MODULE_NAME}.templates", | ||
], | ||
package_data={"": ["*.ico", "*.css", "*.js", "*.html"]}, | ||
keywords=[ | ||
'ocr,text_detection,text_recognition,db,onnxruntime,paddleocr,openvino,rapidocr' | ||
"ocr,text_detection,text_recognition,db,onnxruntime,paddleocr,openvino,rapidocr" | ||
], | ||
classifiers=[ | ||
'Programming Language :: Python :: 3.6', | ||
'Programming Language :: Python :: 3.7', | ||
'Programming Language :: Python :: 3.8', | ||
'Programming Language :: Python :: 3.9', | ||
'Programming Language :: Python :: 3.10', | ||
'Programming Language :: Python :: 3.11', | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
], | ||
python_requires='>=3.6,<3.12', | ||
python_requires=">=3.6,<3.13", | ||
entry_points={ | ||
'console_scripts': [ | ||
f'{MODULE_NAME}={MODULE_NAME}.ocrweb:main', | ||
"console_scripts": [ | ||
f"{MODULE_NAME}={MODULE_NAME}.ocrweb:main", | ||
], | ||
}, | ||
) |