-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
100 lines (90 loc) · 2.8 KB
/
setup.py
File metadata and controls
100 lines (90 loc) · 2.8 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#!/usr/bin/python3
import io
import os
import re
import codecs
from setuptools import setup, find_packages
#Package meta-data.
NAME = 'pyzm'
DESCRIPTION = 'ZoneMinder API, Logger and other base utilities for python programmers'
URL = 'https://github.com/pliablepixels/pyzm'
AUTHOR_EMAIL = 'info@zoneminder.com'
AUTHOR = 'Pliable Pixels'
LICENSE = 'GPL'
INSTALL_REQUIRES=[
'requests>=2.18.4',
'pydantic>=2.0.0',
'dateparser>=1.1.0',
'mysql-connector-python>=8.0.16',
'python-dotenv',
]
_ML_REQUIRES=[
'numpy>=1.13.3',
'Pillow',
'onnx>=1.12.0',
'Shapely>=1.7.0',
'portalocker>=2.3.0',
]
here = os.path.abspath(os.path.dirname(__file__))
# read the contents of your README file
with open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
f.close()
def read(*parts):
with codecs.open(os.path.join(here, *parts), 'r') as fp:
data = fp.read()
fp.close()
return data
def find_version(*file_paths):
version_file = read(*file_paths)
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
setup(name = NAME,
python_requires='>=3.10',
version = find_version('pyzm','__init__.py'),
description = DESCRIPTION,
long_description = long_description,
long_description_content_type='text/markdown',
author = AUTHOR,
author_email = AUTHOR_EMAIL,
url = URL,
project_urls={
'Documentation': 'https://pyzmv2.readthedocs.io/en/latest/',
'Source': 'https://github.com/pliablepixels/pyzm',
'Bug Tracker': 'https://github.com/pliablepixels/pyzm/issues',
},
license = LICENSE,
install_requires=INSTALL_REQUIRES,
extras_require={
'ml': _ML_REQUIRES,
'serve': _ML_REQUIRES + [
'fastapi>=0.100',
'uvicorn>=0.20',
'python-multipart>=0.0.5',
'PyJWT>=2.0',
'PyYAML>=5.0',
],
'train': _ML_REQUIRES + [
'ultralytics>=8.3',
'streamlit>=1.41',
'streamlit-drawable-canvas>=0.9',
'st-clickable-images>=0.0.3',
'PyYAML>=5.0',
],
'full': _ML_REQUIRES + [
'fastapi>=0.100',
'uvicorn>=0.20',
'python-multipart>=0.0.5',
'PyJWT>=2.0',
'PyYAML>=5.0',
'ultralytics>=8.3',
'streamlit>=1.41',
'streamlit-drawable-canvas>=0.9',
'st-clickable-images>=0.0.3',
],
},
package_data={'pyzm': ['train/assets/*.png']},
packages=find_packages(exclude=["tests", "tests.*"]),
)