From a16a072d393960ed4cc88583369ffca48670c754 Mon Sep 17 00:00:00 2001 From: Wang Xin Date: Mon, 13 May 2024 09:04:29 +0000 Subject: [PATCH] add pyproject.toml --- pyproject.toml | 43 +++++++++++++++++++++++++++++++++++++ requirements.txt | 3 --- setup.py | 55 ------------------------------------------------ 3 files changed, 43 insertions(+), 58 deletions(-) create mode 100644 pyproject.toml delete mode 100644 requirements.txt delete mode 100644 setup.py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..c5262c8 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,43 @@ +[build-system] +requires = ["setuptools >= 61.0"] +build-backend = "setuptools.build_meta" + +[project] +name = "PPOCRLabel" +version = "2.1.3" +dependencies = [ + "pyqt5", + "paddleocr", + "xlrd==1.2.0", + "tqdm", +] +requires-python = ">= 3.9" +authors = [ +] +maintainers = [ +] +description = "PPOCRLabelv2 is a semi-automatic graphic annotation tool suitable for OCR field, with built-in PP-OCR model to automatically detect and re-recognize data. It is written in Python3 and PyQT5, supporting rectangular box, table, irregular text and key information annotation modes. Annotations can be directly used for the training of PP-OCR detection and recognition models." +readme = "README.md" +license = {text = "Apache-2.0"} +keywords = ["ocr", "textdetection", "textrecognition", "paddleocr", "crnn", "east", "star-net", "rosetta", "ocrlite", "db", "chineseocr", "chinesetextdetection", "chinesetextrecognition"] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3", + "Topic :: Utilities", + "Natural Language :: English", +] + +[project.urls] +Homepage = "https://github.com/PFCCLab/PPOCRLabel" +Documentation = "https://github.com/PFCCLab/PPOCRLabel/blob/master/README.md" +Repository = "https://github.com/PFCCLab/PPOCRLabel.git" +Issues = "https://github.com/PFCCLab/PPOCRLabel/issues" + +[project.gui-scripts] +PPOCRLabel = "PPOCRLabel.PPOCRLabel:main" + +[tool.setuptools] +package-dir = {PPOCRLabel = ""} +package-data = {PPOCRLabel = ["libs/*", "resources/strings/*", "resources/icons/*"]} diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index a10b345..0000000 --- a/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -pyqt5 -paddleocr -xlrd==1.2.0 diff --git a/setup.py b/setup.py deleted file mode 100644 index 93a6c95..0000000 --- a/setup.py +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from setuptools import setup -from io import open - -with open("requirements.txt", encoding="utf-8-sig") as f: - requirements = f.readlines() - requirements.append("tqdm") - - -def readme(): - with open("README.md", encoding="utf-8-sig") as f: - README = f.read() - return README - - -setup( - name="PPOCRLabel", - packages=["PPOCRLabel"], - package_data={"PPOCRLabel": ["libs/*", "resources/strings/*", "resources/icons/*"]}, - package_dir={"PPOCRLabel": ""}, - include_package_data=True, - entry_points={"console_scripts": ["PPOCRLabel= PPOCRLabel.PPOCRLabel:main"]}, - version="2.1.3", - install_requires=requirements, - license="Apache License 2.0", - description="PPOCRLabelv2 is a semi-automatic graphic annotation tool suitable for OCR field, with built-in PP-OCR model to automatically detect and re-recognize data. It is written in Python3 and PyQT5, supporting rectangular box, table, irregular text and key information annotation modes. Annotations can be directly used for the training of PP-OCR detection and recognition models.", - long_description=readme(), - long_description_content_type="text/markdown", - url="https://github.com/PaddlePaddle/PaddleOCR", - download_url="https://github.com/PaddlePaddle/PaddleOCR.git", - keywords=[ - "ocr textdetection textrecognition paddleocr crnn east star-net rosetta ocrlite db chineseocr chinesetextdetection chinesetextrecognition" - ], - classifiers=[ - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Natural Language :: English", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Topic :: Utilities", - ], -)