blob: 2a6ea572117f65c6118a90645d376fc4451c597f [file] [log] [blame]
elie8b513892011-02-17 18:35:16 +00001#!/usr/bin/env python
2import sys
elie8b513892011-02-17 18:35:16 +00003
4def howto_install_setuptools():
elie367753c2011-10-04 11:36:10 +00005 print("""
6 Error: You need setuptools Python package!
elie8b513892011-02-17 18:35:16 +00007
elie367753c2011-10-04 11:36:10 +00008 It's very easy to install it, just type (as root on Linux):
elie8b513892011-02-17 18:35:16 +00009 wget http://peak.telecommunity.com/dist/ez_setup.py
10 python ez_setup.py
elie367753c2011-10-04 11:36:10 +000011""")
elie8b513892011-02-17 18:35:16 +000012
13try:
14 from setuptools import setup
15 params = {
elie4b9d2582012-05-24 16:21:12 +000016 'install_requires': [ 'pyasn1>=0.1.4' ],
elie8b513892011-02-17 18:35:16 +000017 'zip_safe': True
18 }
19except ImportError:
20 for arg in sys.argv:
elie367753c2011-10-04 11:36:10 +000021 if arg.find('egg') != -1:
elie8b513892011-02-17 18:35:16 +000022 howto_install_setuptools()
23 sys.exit(1)
24 from distutils.core import setup
elieb4c93222012-04-17 19:41:47 +000025 params = {}
26 if sys.version_info[:2] > (2, 4):
elie4b9d2582012-05-24 16:21:12 +000027 params['requires'] = [ 'pyasn1(>=0.1.4)' ]
elie8b513892011-02-17 18:35:16 +000028
29params.update( {
30 'name': 'pyasn1-modules',
elie50ede552012-05-03 21:59:58 +000031 'version': '0.0.4',
elie8b513892011-02-17 18:35:16 +000032 'description': 'ASN.1 modules',
33 'author': 'Ilya Etingof',
34 'author_email': '[email protected]',
35 'url': 'http://sourceforge.net/projects/pyasn1/',
elie662241d2011-10-27 09:52:26 +000036 'classifiers': [
37 'Development Status :: 5 - Production/Stable',
38 'Intended Audience :: Developers',
39 'Intended Audience :: Information Technology',
40 'Intended Audience :: Telecommunications Industry',
41 'Operating System :: OS Independent',
elie662241d2011-10-27 09:52:26 +000042 'Programming Language :: Python :: 2',
43 'Programming Language :: Python :: 3',
44 'Topic :: Communications',
45 'Topic :: Security :: Cryptography',
46 'Topic :: Software Development :: Libraries :: Python Modules',
47 'License :: OSI Approved :: BSD License'
48 ],
elie8b513892011-02-17 18:35:16 +000049 'license': 'BSD',
50 'packages': [ 'pyasn1_modules' ]
elie662241d2011-10-27 09:52:26 +000051 } )
elie8b513892011-02-17 18:35:16 +000052
elie367753c2011-10-04 11:36:10 +000053setup(**params)