forked from FalkTannhaeuser/python-onvif-zeep
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
75 lines (64 loc) · 2.32 KB
/
setup.py
File metadata and controls
75 lines (64 loc) · 2.32 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
"""Setup script for the onvif_zeep package."""
import os
import sysconfig
import shutil
from setuptools import setup, find_packages
from setuptools.command.install import install
here = os.path.abspath(os.path.dirname(__file__))
version_path = os.path.join(here, 'onvif/version.txt')
version = open(version_path).read().strip()
requires = ['zeep >= 3.0.0']
CLASSIFIERS = [
'Development Status :: 3 - Alpha',
'Environment :: Console',
'Intended Audience :: Customer Service',
'Intended Audience :: Developers',
'Intended Audience :: Education',
'Intended Audience :: Science/Research',
'Intended Audience :: Telecommunications Industry',
'Natural Language :: English',
'Operating System :: POSIX',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Multimedia :: Sound/Audio',
'Topic :: Utilities',
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
]
class CustomInstallCommand(install):
"""Custom install command to handle WSDL files."""
def run(self):
# Run regular installation first
install.run(self)
# Now manually copy the wsdl files to site-packages/wsdl
wsdl_src_dir = 'wsdl'
wsdl_dst_dir = os.path.join(sysconfig.get_paths()['purelib'], 'wsdl')
os.makedirs(wsdl_dst_dir, exist_ok=True)
for file in os.listdir(wsdl_src_dir):
src_path = os.path.join(wsdl_src_dir, file)
dst_path = os.path.join(wsdl_dst_dir, file)
shutil.copyfile(src_path, dst_path)
setup(
name='onvif_zeep',
version=version,
description='Python Client for ONVIF Camera',
long_description=open('README.rst', 'r').read(),
author='Cherish Chen',
author_email='sinchb128@gmail.com',
maintainer='sinchb',
maintainer_email='sinchb128@gmail.com',
license='MIT',
keywords=['ONVIF', 'Camera', 'IPC'],
url='http://github.com/quatanium/python-onvif',
zip_safe=False,
packages=find_packages(exclude=['docs', 'examples', 'tests']),
install_requires=requires,
entry_points={
'console_scripts': ['onvif-cli = onvif.cli:main']
},
cmdclass={
'install': CustomInstallCommand,
},
)