blob: 42b170aa15c7b7c22c48b3c3ce80659574ee2b4d [file] [log] [blame]
elie8b513892011-02-17 18:35:16 +00001#!/usr/bin/env python
eliea8dd0182012-07-04 12:39:21 +00002"""A collection of ASN.1-based protocols modules.
3
4 A collection of ASN.1 modules expressed in form of pyasn1 classes.
5 Includes protocols PDUs definition (SNMP, LDAP etc.) and various
6 data structures (X.509, PKCS etc.).
7"""
8
9classifiers = """\
10Development Status :: 5 - Production/Stable
11Environment :: Console
12Intended Audience :: Developers
13Intended Audience :: Education
14Intended Audience :: Information Technology
15Intended Audience :: Science/Research
16Intended Audience :: System Administrators
17Intended Audience :: Telecommunications Industry
18License :: OSI Approved :: BSD License
19Natural Language :: English
20Operating System :: OS Independent
21Programming Language :: Python :: 2
22Programming Language :: Python :: 3
23Topic :: Communications,
24Topic :: Security :: Cryptography
25Topic :: Software Development :: Libraries :: Python Modules
26"""
elie8b513892011-02-17 18:35:16 +000027
28def howto_install_setuptools():
elie367753c2011-10-04 11:36:10 +000029 print("""
30 Error: You need setuptools Python package!
elie8b513892011-02-17 18:35:16 +000031
elie367753c2011-10-04 11:36:10 +000032 It's very easy to install it, just type (as root on Linux):
elie8b513892011-02-17 18:35:16 +000033 wget http://peak.telecommunity.com/dist/ez_setup.py
34 python ez_setup.py
elie367753c2011-10-04 11:36:10 +000035""")
elie8b513892011-02-17 18:35:16 +000036
37try:
38 from setuptools import setup
39 params = {
elie4b9d2582012-05-24 16:21:12 +000040 'install_requires': [ 'pyasn1>=0.1.4' ],
elie8b513892011-02-17 18:35:16 +000041 'zip_safe': True
42 }
43except ImportError:
eliea8dd0182012-07-04 12:39:21 +000044 import sys
elie8b513892011-02-17 18:35:16 +000045 for arg in sys.argv:
elie367753c2011-10-04 11:36:10 +000046 if arg.find('egg') != -1:
elie8b513892011-02-17 18:35:16 +000047 howto_install_setuptools()
48 sys.exit(1)
49 from distutils.core import setup
elieb4c93222012-04-17 19:41:47 +000050 params = {}
51 if sys.version_info[:2] > (2, 4):
elie4b9d2582012-05-24 16:21:12 +000052 params['requires'] = [ 'pyasn1(>=0.1.4)' ]
elie8b513892011-02-17 18:35:16 +000053
eliea8dd0182012-07-04 12:39:21 +000054doclines = [ x.strip() for x in __doc__.split('\n') if x ]
55
elie8b513892011-02-17 18:35:16 +000056params.update( {
57 'name': 'pyasn1-modules',
elied686c522012-07-04 09:42:24 +000058 'version': open('pyasn1_modules/__init__.py').read().split('\'')[1],
eliea8dd0182012-07-04 12:39:21 +000059 'description': doclines[0],
60 'long_description': ' '.join(doclines[1:]),
61 'maintainer': 'Ilya Etingof <[email protected]>',
elie8b513892011-02-17 18:35:16 +000062 'author': 'Ilya Etingof',
63 'author_email': '[email protected]',
64 'url': 'http://sourceforge.net/projects/pyasn1/',
eliea8dd0182012-07-04 12:39:21 +000065 'platforms': ['any'],
66 'classifiers': [ x for x in classifiers.split('\n') if x ],
elie8b513892011-02-17 18:35:16 +000067 'license': 'BSD',
68 'packages': [ 'pyasn1_modules' ]
elie662241d2011-10-27 09:52:26 +000069 } )
elie8b513892011-02-17 18:35:16 +000070
elie367753c2011-10-04 11:36:10 +000071setup(**params)