|
| 1 | +#!/usr/bin/python3 |
| 2 | + |
| 3 | +import os |
| 4 | +import re |
| 5 | +import codecs |
| 6 | +from setuptools import setup |
| 7 | + |
| 8 | +# Package meta-data. |
| 9 | +NAME = 'reolink-api' |
| 10 | +DESCRIPTION = 'Reolink Camera API written in Python 3.6' |
| 11 | +URL = 'https://github.com/Benehiko/ReolinkCameraAPI' |
| 12 | +AUTHOR_EMAIL = '' |
| 13 | +AUTHOR = 'Benehiko' |
| 14 | +LICENSE = 'GPL-3.0' |
| 15 | +INSTALL_REQUIRES = [ |
| 16 | + 'pillow', |
| 17 | + 'pyyaml', |
| 18 | + 'requests>=2.18.4', |
| 19 | + 'numpy', |
| 20 | + 'opencv-python', |
| 21 | + 'pysocks' |
| 22 | +] |
| 23 | + |
| 24 | + |
| 25 | +here = os.path.abspath(os.path.dirname(__file__)) |
| 26 | +# read the contents of your README file |
| 27 | +with open(os.path.join(here, 'README.md'), encoding='utf-8') as f: |
| 28 | + long_description = f.read() |
| 29 | + |
| 30 | + |
| 31 | +def read(*parts): |
| 32 | + with codecs.open(os.path.join(here, *parts), 'r') as fp: |
| 33 | + return fp.read() |
| 34 | + |
| 35 | + |
| 36 | +def find_version(*file_paths): |
| 37 | + version_file = read(*file_paths) |
| 38 | + version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M) |
| 39 | + if version_match: |
| 40 | + return version_match.group(1) |
| 41 | + raise RuntimeError("Unable to find version string.") |
| 42 | + |
| 43 | + |
| 44 | +setup(name=NAME, |
| 45 | + python_requires='>=3.6.0', |
| 46 | + version=find_version('api', '__init__.py'), |
| 47 | + description=DESCRIPTION, |
| 48 | + long_description=long_description, |
| 49 | + long_description_content_type='text/markdown', |
| 50 | + author=AUTHOR, |
| 51 | + author_email=AUTHOR_EMAIL, |
| 52 | + url=URL, |
| 53 | + license=LICENSE, |
| 54 | + install_requires=INSTALL_REQUIRES, |
| 55 | + py_modules=[ |
| 56 | + 'Camera', |
| 57 | + 'ConfigHandler', |
| 58 | + 'RtspClient', |
| 59 | + 'resthandle', |
| 60 | + 'api.APIHandler', |
| 61 | + 'api.device', |
| 62 | + 'api.display', |
| 63 | + 'api.network', |
| 64 | + 'api.ptz', |
| 65 | + 'api.recording', |
| 66 | + 'api.system', |
| 67 | + 'api.user', |
| 68 | + 'api.zoom' |
| 69 | + ] |
| 70 | + ) |
0 commit comments