blob: 158c51ab2a5d2ff679b0d022f2bb43fa06f2864e [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
elie8549b5d2012-07-23 16:54:31 +000023Topic :: Communications
eliea8dd0182012-07-04 12:39:21 +000024Topic :: Security :: Cryptography
25Topic :: Software Development :: Libraries :: Python Modules
26"""
elie8b513892011-02-17 18:35:16 +000027
elie1536a5e2012-07-23 16:35:59 +000028def 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
elie8b513892011-02-17 18:35:16 +000040def howto_install_setuptools():
elie367753c2011-10-04 11:36:10 +000041 print("""
42 Error: You need setuptools Python package!
elie8b513892011-02-17 18:35:16 +000043
elie367753c2011-10-04 11:36:10 +000044 It's very easy to install it, just type (as root on Linux):
elie1536a5e2012-07-23 16:35:59 +000045
elie8b513892011-02-17 18:35:16 +000046 wget http://peak.telecommunity.com/dist/ez_setup.py
47 python ez_setup.py
elie1536a5e2012-07-23 16:35:59 +000048
49 Then you could make eggs from this package.
elie367753c2011-10-04 11:36:10 +000050""")
elie8b513892011-02-17 18:35:16 +000051
52try:
53 from setuptools import setup
54 params = {
elie8897ae82014-06-17 15:29:52 +000055 'install_requires': [ 'pyasn1>=0.1.8' ],
elie8b513892011-02-17 18:35:16 +000056 'zip_safe': True
57 }
58except ImportError:
eliea8dd0182012-07-04 12:39:21 +000059 import sys
elie8b513892011-02-17 18:35:16 +000060 for arg in sys.argv:
elie367753c2011-10-04 11:36:10 +000061 if arg.find('egg') != -1:
elie1536a5e2012-07-23 16:35:59 +000062 if sys.version_info[0] > 2:
63 howto_install_distribute()
64 else:
65 howto_install_setuptools()
elie8b513892011-02-17 18:35:16 +000066 sys.exit(1)
67 from distutils.core import setup
elieb4c93222012-04-17 19:41:47 +000068 params = {}
69 if sys.version_info[:2] > (2, 4):
elie8897ae82014-06-17 15:29:52 +000070 params['requires'] = [ 'pyasn1(>=0.1.8)' ]
elie8b513892011-02-17 18:35:16 +000071
elie35eec0d2015-10-10 18:09:59 +000072doclines = [x.strip() for x in (__doc__ or '').split('\n') if x]
eliea8dd0182012-07-04 12:39:21 +000073
elie35eec0d2015-10-10 18:09:59 +000074params.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 <[email protected]>',
80 'author': 'Ilya Etingof',
81 'author_email': '[email protected]',
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)
elie8b513892011-02-17 18:35:16 +000088
elie367753c2011-10-04 11:36:10 +000089setup(**params)