summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/rapidocr/setup-py-override-version-checking.patch
blob: f940c1c29dc1b94106a874bc3ea35c6a06cb57a9 (plain)
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
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",