-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
69 lines (61 loc) · 2.29 KB
/
setup.py
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import os
import sys
import subprocess
from setuptools import setup, find_packages
# Getting build version
try:
VERSION = (
subprocess.run(["git", "describe", "--tags"], stdout=subprocess.PIPE)
.stdout.decode("utf-8")
.strip()
.lstrip("v.")
)
if "-" in VERSION:
v, i, s = VERSION.split("-")
VERSION = v + "+" + i + ".git." + s
assert "-" not in VERSION
assert "." in VERSION
assert os.path.isfile("fastanpr/version.py")
with open("fastanpr/version.py", "w", encoding="utf-8") as fh:
fh.write(f"__version__ = \"{VERSION}\"\n")
except Exception:
with open("fastanpr/version.py", "r", encoding="utf-8") as fh:
VERSION = fh.read().strip().lstrip("__version__ = \"").rstrip("\"")
# Set Python version requirements based on the operating system
if sys.platform.startswith('win'):
PYTHON_REQUIRES = '>=3.8, <3.11'
else:
PYTHON_REQUIRES = '>=3.6'
# Getting long description from README
with open("README.md", "r") as fh:
LONG_DESCRIPTION = fh.read()
setup(
name="fastanpr",
version=VERSION,
author="arvindrajan92 (Arvind Rajan)",
author_email="<arvindrajan92@gmail.com>",
description='A fast automatic number-plate recognition (ANPR) library',
long_description_content_type="text/markdown",
long_description=LONG_DESCRIPTION,
packages=find_packages(),
package_data={'': ['*.pt'], 'fastanpr': ['*.pt']},
include_package_data=True,
install_requires=['ultralytics>=8.1.34', 'paddlepaddle>=2.6.1', 'paddleocr==2.7.2', 'pydantic>=2.6.4'],
python_requires=PYTHON_REQUIRES,
extras_require={
'dev': ['pytest', 'pytest-asyncio', 'twine', 'python-Levenshtein', 'setuptools', 'wheel', 'twine', 'flake8']
},
classifiers=[
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
"Operating System :: OS Independent",
],
url='https://github.com/arvindrajan92/fastanpr',
keywords=[
'python', 'anpr', 'fast', 'licence plate', 'number plate', 'detection', 'recognition', 'YOLOv8', 'paddleocr',
'paddlepaddle'
]
)