|
1 | 1 | import os
|
| 2 | +import sys |
2 | 3 | import subprocess
|
3 | 4 | from setuptools import setup, find_packages
|
4 | 5 |
|
| 6 | +# Getting build version |
5 | 7 | try:
|
6 | 8 | VERSION = (
|
7 | 9 | subprocess.run(["git", "describe", "--tags"], stdout=subprocess.PIPE)
|
|
25 | 27 | with open("fastanpr/version.py", "r", encoding="utf-8") as fh:
|
26 | 28 | VERSION = fh.read().strip().lstrip("__version__ = \"").rstrip("\"")
|
27 | 29 |
|
28 |
| -DESCRIPTION = 'A fast automatic number-plate recognition (ANPR) library' |
| 30 | +# Set Python version requirements based on the operating system |
| 31 | +if sys.platform.startswith('win'): |
| 32 | + PYTHON_REQUIRES = '>=3.8, <3.11' |
| 33 | +else: |
| 34 | + PYTHON_REQUIRES = '>=3.8, <3.12' |
| 35 | + |
| 36 | +# Getting long description from README |
29 | 37 | with open("README.md", "r") as fh:
|
30 | 38 | LONG_DESCRIPTION = fh.read()
|
31 | 39 |
|
|
34 | 42 | version=VERSION,
|
35 | 43 | author="arvindrajan92 (Arvind Rajan)",
|
36 | 44 | author_email="<[email protected]>",
|
37 |
| - description=DESCRIPTION, |
| 45 | + description='A fast automatic number-plate recognition (ANPR) library', |
38 | 46 | long_description_content_type="text/markdown",
|
39 | 47 | long_description=LONG_DESCRIPTION,
|
40 | 48 | packages=find_packages(),
|
41 | 49 | package_data={'': ['*.pt'], 'fastanpr': ['*.pt']},
|
42 | 50 | include_package_data=True,
|
43 | 51 | install_requires=['ultralytics>=8.1.26', 'paddlepaddle>=2.6.0', 'paddleocr>=2.7.0.3'],
|
44 |
| - python_requires='>=3.8', |
| 52 | + python_requires=PYTHON_REQUIRES, |
45 | 53 | extras_require={
|
46 | 54 | 'dev': ['pytest', 'pytest-asyncio', 'twine', 'python-Levenshtein', 'setuptools', 'wheel', 'twine', 'flake8']
|
47 | 55 | },
|
|
0 commit comments