setup.py 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. from setuptools import setup
  15. from io import open
  16. from paddleocr import VERSION
  17. def load_requirements(file_list=None):
  18. if file_list is None:
  19. file_list = ['requirements.txt']
  20. if isinstance(file_list,str):
  21. file_list = [file_list]
  22. requirements = []
  23. for file in file_list:
  24. with open(file, encoding="utf-8-sig") as f:
  25. requirements.extend(f.readlines())
  26. return requirements
  27. def readme():
  28. with open('doc/doc_en/whl_en.md', encoding="utf-8-sig") as f:
  29. README = f.read()
  30. return README
  31. setup(
  32. name='paddleocr',
  33. packages=['paddleocr'],
  34. package_dir={'paddleocr': ''},
  35. include_package_data=True,
  36. entry_points={"console_scripts": ["paddleocr= paddleocr.paddleocr:main"]},
  37. version=VERSION,
  38. install_requires=load_requirements(['requirements.txt', 'ppstructure/recovery/requirements.txt']),
  39. license='Apache License 2.0',
  40. description='Awesome OCR toolkits based on PaddlePaddle (8.6M ultra-lightweight pre-trained model, support training and deployment among server, mobile, embeded and IoT devices',
  41. long_description=readme(),
  42. long_description_content_type='text/markdown',
  43. url='https://github.com/PaddlePaddle/PaddleOCR',
  44. download_url='https://github.com/PaddlePaddle/PaddleOCR.git',
  45. keywords=[
  46. 'ocr textdetection textrecognition paddleocr crnn east star-net rosetta ocrlite db chineseocr chinesetextdetection chinesetextrecognition'
  47. ],
  48. classifiers=[
  49. 'Intended Audience :: Developers', 'Operating System :: OS Independent',
  50. 'Natural Language :: Chinese (Simplified)',
  51. 'Programming Language :: Python :: 3',
  52. 'Programming Language :: Python :: 3.2',
  53. 'Programming Language :: Python :: 3.3',
  54. 'Programming Language :: Python :: 3.4',
  55. 'Programming Language :: Python :: 3.5',
  56. 'Programming Language :: Python :: 3.6',
  57. 'Programming Language :: Python :: 3.7', 'Topic :: Utilities'
  58. ], )