Files
nixpkgs/pkgs/development/python-modules/rapidocr/setup-py-override-version-checking.patch

35 lines
912 B
Diff

diff --git a/setup.py b/setup.py
index 16938a4..5167972 100644
--- a/setup.py
+++ b/setup.py
@@ -6,7 +6,6 @@ from pathlib import Path
from typing import List, Union
import setuptools
-from get_pypi_latest_version import GetPyPiLatestVersion
def read_txt(txt_path: Union[Path, str]) -> List[str]:
@@ -25,20 +24,7 @@ def get_readme():
MODULE_NAME = "rapidocr"
-
-obtainer = GetPyPiLatestVersion()
-try:
- latest_version = obtainer(MODULE_NAME)
-except Exception as e:
- latest_version = "0.0.0"
-VERSION_NUM = obtainer.version_add_one(latest_version, add_patch=True)
-
-if len(sys.argv) > 2:
- match_str = " ".join(sys.argv[2:])
- matched_versions = obtainer.extract_version(match_str)
- if matched_versions:
- VERSION_NUM = matched_versions
-sys.argv = sys.argv[:2]
+VERSION_NUM = "@version@"
project_urls = {
"Documentation": "https://rapidai.github.io/RapidOCRDocs",