OLD | NEW |
(Empty) | |
| 1 #!/usr/bin/env python |
| 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 """ |
| 27 |
| 28 def howto_install_distribute(): |
| 29 print(""" |
| 30 Error: You need the distribute Python package! |
| 31 |
| 32 It's very easy to install it, just type (as root on Linux): |
| 33 |
| 34 wget http://python-distribute.org/distribute_setup.py |
| 35 python distribute_setup.py |
| 36 |
| 37 Then you could make eggs from this package. |
| 38 """) |
| 39 |
| 40 def howto_install_setuptools(): |
| 41 print(""" |
| 42 Error: You need setuptools Python package! |
| 43 |
| 44 It's very easy to install it, just type (as root on Linux): |
| 45 |
| 46 wget http://peak.telecommunity.com/dist/ez_setup.py |
| 47 python ez_setup.py |
| 48 |
| 49 Then you could make eggs from this package. |
| 50 """) |
| 51 |
| 52 try: |
| 53 from setuptools import setup |
| 54 params = { |
| 55 'install_requires': [ 'pyasn1>=0.1.4' ], |
| 56 'zip_safe': True |
| 57 } |
| 58 except ImportError: |
| 59 import sys |
| 60 for arg in sys.argv: |
| 61 if arg.find('egg') != -1: |
| 62 if sys.version_info[0] > 2: |
| 63 howto_install_distribute() |
| 64 else: |
| 65 howto_install_setuptools() |
| 66 sys.exit(1) |
| 67 from distutils.core import setup |
| 68 params = {} |
| 69 if sys.version_info[:2] > (2, 4): |
| 70 params['requires'] = [ 'pyasn1(>=0.1.4)' ] |
| 71 |
| 72 doclines = [ x.strip() for x in __doc__.split('\n') if x ] |
| 73 |
| 74 params.update( { |
| 75 'name': 'pyasn1-modules', |
| 76 'version': open('pyasn1_modules/__init__.py').read().split('\'')[1], |
| 77 'description': doclines[0], |
| 78 'long_description': ' '.join(doclines[1:]), |
| 79 'maintainer': 'Ilya Etingof <ilya@glas.net>', |
| 80 'author': 'Ilya Etingof', |
| 81 'author_email': 'ilya@glas.net', |
| 82 'url': 'http://sourceforge.net/projects/pyasn1/', |
| 83 'platforms': ['any'], |
| 84 'classifiers': [ x for x in classifiers.split('\n') if x ], |
| 85 'license': 'BSD', |
| 86 'packages': [ 'pyasn1_modules' ] |
| 87 } ) |
| 88 |
| 89 setup(**params) |
OLD | NEW |