2002-02-06 11:11:57 +01:00
|
|
|
#!/usr/bin/env python
|
2013-01-06 22:20:00 +01:00
|
|
|
"""SNMP library for Python
|
2012-07-04 17:05:10 +02:00
|
|
|
|
|
|
|
SNMP v1/v2c/v3 engine and apps written in pure-Python.
|
|
|
|
Supports Manager/Agent/Proxy roles, scriptable MIBs,
|
|
|
|
asynchronous operation and multiple transports.
|
|
|
|
"""
|
2009-08-28 21:37:36 +02:00
|
|
|
import sys
|
2013-01-06 22:20:00 +01:00
|
|
|
import os
|
2009-08-28 21:37:36 +02:00
|
|
|
|
2012-07-04 17:05:10 +02:00
|
|
|
classifiers = """\
|
|
|
|
Development Status :: 5 - Production/Stable
|
|
|
|
Environment :: Console
|
|
|
|
Intended Audience :: Developers
|
|
|
|
Intended Audience :: Education
|
|
|
|
Intended Audience :: Information Technology
|
|
|
|
Intended Audience :: System Administrators
|
|
|
|
Intended Audience :: Telecommunications Industry
|
|
|
|
License :: OSI Approved :: BSD License
|
|
|
|
Natural Language :: English
|
|
|
|
Operating System :: OS Independent
|
|
|
|
Programming Language :: Python :: 2
|
2016-10-27 23:29:58 +02:00
|
|
|
Programming Language :: Python :: 2.4
|
|
|
|
Programming Language :: Python :: 2.5
|
|
|
|
Programming Language :: Python :: 2.6
|
|
|
|
Programming Language :: Python :: 2.7
|
2012-07-04 17:05:10 +02:00
|
|
|
Programming Language :: Python :: 3
|
2016-10-27 23:29:58 +02:00
|
|
|
Programming Language :: Python :: 3.2
|
|
|
|
Programming Language :: Python :: 3.3
|
|
|
|
Programming Language :: Python :: 3.4
|
|
|
|
Programming Language :: Python :: 3.5
|
2012-07-23 18:57:15 +02:00
|
|
|
Topic :: Communications
|
2012-07-04 17:05:10 +02:00
|
|
|
Topic :: Software Development :: Libraries :: Python Modules
|
|
|
|
Topic :: System :: Monitoring
|
|
|
|
Topic :: System :: Networking :: Monitoring
|
|
|
|
Topic :: Software Development :: Libraries :: Python Modules
|
|
|
|
"""
|
|
|
|
|
2016-04-01 23:06:11 +02:00
|
|
|
|
2009-08-28 21:37:36 +02:00
|
|
|
def howto_install_setuptools():
|
2012-07-23 18:57:15 +02:00
|
|
|
print("""
|
|
|
|
Error: You need setuptools Python package!
|
|
|
|
|
|
|
|
It's very easy to install it, just type (as root on Linux):
|
2009-08-28 21:37:36 +02:00
|
|
|
|
2013-09-21 11:45:36 +02:00
|
|
|
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
|
2009-08-28 21:37:36 +02:00
|
|
|
python ez_setup.py
|
2012-07-23 18:57:15 +02:00
|
|
|
|
|
|
|
Then you could make eggs from this package.
|
2011-11-06 21:37:09 +01:00
|
|
|
""")
|
2009-08-28 21:37:36 +02:00
|
|
|
|
2016-04-01 23:06:11 +02:00
|
|
|
|
2013-09-21 12:10:34 +02:00
|
|
|
if sys.version_info[:2] < (2, 4):
|
|
|
|
print("ERROR: this package requires Python 2.4 or later!")
|
|
|
|
sys.exit(1)
|
|
|
|
|
2009-08-28 21:37:36 +02:00
|
|
|
try:
|
|
|
|
from setuptools import setup
|
2016-04-01 23:06:11 +02:00
|
|
|
|
2010-12-12 18:07:25 +01:00
|
|
|
params = {
|
2016-11-12 00:50:58 +01:00
|
|
|
'install_requires': ['pyasn1>=0.1.8', 'pysmi', 'pycryptodome'],
|
2010-12-12 18:07:25 +01:00
|
|
|
'zip_safe': True
|
2016-04-01 23:06:11 +02:00
|
|
|
}
|
2012-04-17 16:49:32 +02:00
|
|
|
|
2009-08-28 21:37:36 +02:00
|
|
|
except ImportError:
|
|
|
|
for arg in sys.argv:
|
2013-09-21 11:45:36 +02:00
|
|
|
if 'egg' in arg:
|
|
|
|
howto_install_setuptools()
|
2009-08-28 21:37:36 +02:00
|
|
|
sys.exit(1)
|
2016-11-12 00:50:58 +01:00
|
|
|
|
2009-08-28 21:37:36 +02:00
|
|
|
from distutils.core import setup
|
2016-04-01 23:06:11 +02:00
|
|
|
|
2012-04-17 16:49:32 +02:00
|
|
|
params = {}
|
|
|
|
if sys.version_info[:2] > (2, 4):
|
2016-11-12 00:50:58 +01:00
|
|
|
params['requires'] = ['pyasn1(>=0.1.8)', 'pysmi', 'pycryptodome']
|
2010-12-12 18:07:25 +01:00
|
|
|
|
2015-10-10 20:06:58 +02:00
|
|
|
doclines = [x.strip() for x in (__doc__ or '').split('\n') if x]
|
2016-04-01 23:06:11 +02:00
|
|
|
|
2015-10-10 20:06:58 +02:00
|
|
|
params.update({
|
2010-12-12 18:07:25 +01:00
|
|
|
'name': 'pysnmp',
|
2016-04-01 23:06:11 +02:00
|
|
|
'version': open(os.path.join('pysnmp', '__init__.py')).read().split('\'')[1],
|
2012-07-04 17:05:10 +02:00
|
|
|
'description': doclines[0],
|
|
|
|
'long_description': ' '.join(doclines[1:]),
|
2016-12-04 12:03:05 +01:00
|
|
|
'maintainer': 'Ilya Etingof <etingof@gmail.com>',
|
2010-12-12 18:07:25 +01:00
|
|
|
'author': 'Ilya Etingof',
|
2016-12-04 12:03:05 +01:00
|
|
|
'author_email': 'etingof@gmail.com',
|
|
|
|
'url': 'https://github.com/etingof/pysnmp',
|
2016-04-01 23:06:11 +02:00
|
|
|
'classifiers': [x for x in classifiers.split('\n') if x],
|
2012-07-04 17:05:10 +02:00
|
|
|
'platforms': ['any'],
|
2010-12-12 18:07:25 +01:00
|
|
|
'license': 'BSD',
|
2016-04-01 23:06:11 +02:00
|
|
|
'packages': ['pysnmp',
|
|
|
|
'pysnmp.smi',
|
|
|
|
'pysnmp.smi.mibs',
|
|
|
|
'pysnmp.smi.mibs.instances',
|
|
|
|
'pysnmp.carrier',
|
|
|
|
'pysnmp.carrier.asynsock',
|
|
|
|
'pysnmp.carrier.asynsock.dgram',
|
|
|
|
'pysnmp.carrier.asyncore',
|
|
|
|
'pysnmp.carrier.asyncore.dgram',
|
|
|
|
'pysnmp.carrier.twisted',
|
|
|
|
'pysnmp.carrier.twisted.dgram',
|
|
|
|
'pysnmp.carrier.asyncio',
|
|
|
|
'pysnmp.carrier.asyncio.dgram',
|
|
|
|
'pysnmp.entity',
|
|
|
|
'pysnmp.entity.rfc3413',
|
|
|
|
'pysnmp.entity.rfc3413.oneliner',
|
|
|
|
'pysnmp.hlapi',
|
|
|
|
'pysnmp.hlapi.asyncio',
|
|
|
|
'pysnmp.hlapi.asyncore',
|
|
|
|
'pysnmp.hlapi.asyncore.sync',
|
|
|
|
'pysnmp.hlapi.asyncore.sync.compat',
|
|
|
|
'pysnmp.hlapi.twisted',
|
|
|
|
'pysnmp.proto',
|
|
|
|
'pysnmp.proto.mpmod',
|
|
|
|
'pysnmp.proto.secmod',
|
|
|
|
'pysnmp.proto.secmod.rfc3414',
|
|
|
|
'pysnmp.proto.secmod.rfc3414.auth',
|
|
|
|
'pysnmp.proto.secmod.rfc3414.priv',
|
|
|
|
'pysnmp.proto.secmod.rfc3826',
|
|
|
|
'pysnmp.proto.secmod.rfc3826.priv',
|
|
|
|
'pysnmp.proto.secmod.eso',
|
|
|
|
'pysnmp.proto.secmod.eso.priv',
|
|
|
|
'pysnmp.proto.acmod',
|
|
|
|
'pysnmp.proto.proxy',
|
|
|
|
'pysnmp.proto.api']
|
|
|
|
})
|
2010-12-12 18:07:25 +01:00
|
|
|
|
2011-11-06 21:37:09 +01:00
|
|
|
setup(**params)
|