| elie | 8b51389 | 2011-02-17 18:35:16 +0000 | [diff] [blame] | 1 | #!/usr/bin/env python |
| elie | a8dd018 | 2012-07-04 12:39:21 +0000 | [diff] [blame] | 2 | """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 | |
| 9 | classifiers = """\ |
| 10 | Development Status :: 5 - Production/Stable |
| 11 | Environment :: Console |
| 12 | Intended Audience :: Developers |
| 13 | Intended Audience :: Education |
| 14 | Intended Audience :: Information Technology |
| 15 | Intended Audience :: Science/Research |
| 16 | Intended Audience :: System Administrators |
| 17 | Intended Audience :: Telecommunications Industry |
| 18 | License :: OSI Approved :: BSD License |
| 19 | Natural Language :: English |
| 20 | Operating System :: OS Independent |
| 21 | Programming Language :: Python :: 2 |
| 22 | Programming Language :: Python :: 3 |
| 23 | Topic :: Communications, |
| 24 | Topic :: Security :: Cryptography |
| 25 | Topic :: Software Development :: Libraries :: Python Modules |
| 26 | """ |
| elie | 8b51389 | 2011-02-17 18:35:16 +0000 | [diff] [blame] | 27 | |
| 28 | def howto_install_setuptools(): |
| elie | 367753c | 2011-10-04 11:36:10 +0000 | [diff] [blame] | 29 | print(""" |
| 30 | Error: You need setuptools Python package! |
| elie | 8b51389 | 2011-02-17 18:35:16 +0000 | [diff] [blame] | 31 | |
| elie | 367753c | 2011-10-04 11:36:10 +0000 | [diff] [blame] | 32 | It's very easy to install it, just type (as root on Linux): |
| elie | 8b51389 | 2011-02-17 18:35:16 +0000 | [diff] [blame] | 33 | wget http://peak.telecommunity.com/dist/ez_setup.py |
| 34 | python ez_setup.py |
| elie | 367753c | 2011-10-04 11:36:10 +0000 | [diff] [blame] | 35 | """) |
| elie | 8b51389 | 2011-02-17 18:35:16 +0000 | [diff] [blame] | 36 | |
| 37 | try: |
| 38 | from setuptools import setup |
| 39 | params = { |
| elie | 4b9d258 | 2012-05-24 16:21:12 +0000 | [diff] [blame] | 40 | 'install_requires': [ 'pyasn1>=0.1.4' ], |
| elie | 8b51389 | 2011-02-17 18:35:16 +0000 | [diff] [blame] | 41 | 'zip_safe': True |
| 42 | } |
| 43 | except ImportError: |
| elie | a8dd018 | 2012-07-04 12:39:21 +0000 | [diff] [blame] | 44 | import sys |
| elie | 8b51389 | 2011-02-17 18:35:16 +0000 | [diff] [blame] | 45 | for arg in sys.argv: |
| elie | 367753c | 2011-10-04 11:36:10 +0000 | [diff] [blame] | 46 | if arg.find('egg') != -1: |
| elie | 8b51389 | 2011-02-17 18:35:16 +0000 | [diff] [blame] | 47 | howto_install_setuptools() |
| 48 | sys.exit(1) |
| 49 | from distutils.core import setup |
| elie | b4c9322 | 2012-04-17 19:41:47 +0000 | [diff] [blame] | 50 | params = {} |
| 51 | if sys.version_info[:2] > (2, 4): |
| elie | 4b9d258 | 2012-05-24 16:21:12 +0000 | [diff] [blame] | 52 | params['requires'] = [ 'pyasn1(>=0.1.4)' ] |
| elie | 8b51389 | 2011-02-17 18:35:16 +0000 | [diff] [blame] | 53 | |
| elie | a8dd018 | 2012-07-04 12:39:21 +0000 | [diff] [blame] | 54 | doclines = [ x.strip() for x in __doc__.split('\n') if x ] |
| 55 | |
| elie | 8b51389 | 2011-02-17 18:35:16 +0000 | [diff] [blame] | 56 | params.update( { |
| 57 | 'name': 'pyasn1-modules', |
| elie | d686c52 | 2012-07-04 09:42:24 +0000 | [diff] [blame] | 58 | 'version': open('pyasn1_modules/__init__.py').read().split('\'')[1], |
| elie | a8dd018 | 2012-07-04 12:39:21 +0000 | [diff] [blame] | 59 | 'description': doclines[0], |
| 60 | 'long_description': ' '.join(doclines[1:]), |
| 61 | 'maintainer': 'Ilya Etingof <[email protected]>', |
| elie | 8b51389 | 2011-02-17 18:35:16 +0000 | [diff] [blame] | 62 | 'author': 'Ilya Etingof', |
| 63 | 'author_email': '[email protected]', |
| 64 | 'url': 'http://sourceforge.net/projects/pyasn1/', |
| elie | a8dd018 | 2012-07-04 12:39:21 +0000 | [diff] [blame] | 65 | 'platforms': ['any'], |
| 66 | 'classifiers': [ x for x in classifiers.split('\n') if x ], |
| elie | 8b51389 | 2011-02-17 18:35:16 +0000 | [diff] [blame] | 67 | 'license': 'BSD', |
| 68 | 'packages': [ 'pyasn1_modules' ] |
| elie | 662241d | 2011-10-27 09:52:26 +0000 | [diff] [blame] | 69 | } ) |
| elie | 8b51389 | 2011-02-17 18:35:16 +0000 | [diff] [blame] | 70 | |
| elie | 367753c | 2011-10-04 11:36:10 +0000 | [diff] [blame] | 71 | setup(**params) |