forked from pymodbus-dev/pymodbus
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathsetup.py
106 lines (100 loc) · 4.02 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
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
100
101
102
103
104
105
106
"""
Installs pymodbus3 using distutils
Run:
python setup.py install
to install the package from the source archive.
For information about setuptools
http://peak.telecommunity.com/DevCenter/setuptools#new-and-changed-setup-keywords
"""
def main():
# Common modules import
import sys
import os
from pymodbus3 import __version__, __author__, __author_email__
# Import command classes
try:
from setup_commands import command_classes
except ImportError:
command_classes = {}
# Import setuptools or install if not exists
try:
import setuptools
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
# Check python version
if sys.version_info < (3, 0, 0):
sys.stderr.write('You need python 3.0 or later to run this script!' + os.linesep)
exit(1)
# Start installation
setup(
name='pymodbus3',
version=__version__,
description='A fully featured modbus protocol stack in python',
long_description=open('README.rst').read(),
keywords='modbus, twisted, scada, pymodbus',
author=__author__,
author_email=__author_email__,
maintainer=__author__,
maintainer_email=__author_email__,
url='http://uzumaxy.github.io/pymodbus3/',
license='BSD',
packages=find_packages(exclude=['examples', 'test']),
exclude_package_data={'': ['examples', 'test', 'tools', 'doc']},
py_modules = ['ez_setup'],
platforms=['Linux', 'Mac OS X', 'Win'],
include_package_data=True,
zip_safe=True,
install_requires=[
'twisted >= 12.2.0',
'pyserial >= 2.6'
],
extras_require={
'quality': ['coverage >= 3.5.3', 'nose >= 1.2.1', 'mock >= 1.0.0', 'pep8 >= 1.3.3'],
'documents': ['sphinx >= 1.1.3'],
'twisted': ['pyasn1 >= 0.1.4', 'pycrypto >= 2.6'],
},
test_suite='nose.collector',
cmdclass=command_classes,
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Environment :: X11 Applications :: GTK',
'Environment :: MacOS X',
'Environment :: Win32 (MS Windows)',
'Framework :: Twisted',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows :: Windows 7',
'Operating System :: Microsoft :: Windows :: Windows NT/2000',
'Operating System :: Microsoft :: Windows :: Windows Server 2003',
'Operating System :: Microsoft :: Windows :: Windows Server 2008',
'Operating System :: Microsoft :: Windows :: Windows Vista',
'Operating System :: Microsoft :: Windows :: Windows XP',
'Operating System :: Microsoft',
'Operating System :: OS Independent',
'Operating System :: POSIX :: BSD :: FreeBSD',
'Operating System :: POSIX :: Linux',
'Operating System :: POSIX :: SunOS/Solaris',
'Operating System :: POSIX',
'Operating System :: Unix',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.0',
'Programming Language :: Python :: 3.1',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Software Development :: Libraries',
'Topic :: System :: Networking',
'Topic :: System :: Networking :: Monitoring',
'Topic :: Utilities'
],
)
if __name__ == '__main__':
main()