<commit_before>#!/usr/bin/env python
import sys
import string

def howto_install_setuptools():
    print """Error: You need setuptools Python package!

It's very easy to install it, just type (as root on Linux):
   wget http://peak.telecommunity.com/dist/ez_setup.py
   python ez_setup.py
"""

try:
    from setuptools import setup
except ImportError:
    for arg in sys.argv:
        if string.find(arg, 'egg') != -1:
            howto_install_setuptools()
            sys.exit(1)
    from distutils.core import setup

setup(name = 'pysnmp',
      version = '4.1.15a',
      description = 'SNMP framework',
      author = '<NAME>',
      author_email = '<EMAIL>',
      url = 'http://sourceforge.net/projects/pysnmp/',
      license='BSD',
      requires = [ 'pyasn1' ],
      provides = [ 'pysnmp' ],
      packages = [ 'pysnmp',
                   'pysnmp.smi',
                   'pysnmp.smi.mibs',
                   'pysnmp.smi.mibs.instances',
                   'pysnmp.carrier',
                   'pysnmp.carrier.asynsock',
                   'pysnmp.carrier.asynsock.dgram',
                   'pysnmp.carrier.twisted',
                   'pysnmp.carrier.twisted.dgram',                   
                   'pysnmp.entity',
                   'pysnmp.entity.rfc3413',
                   'pysnmp.entity.rfc3413.oneliner',
                   'pysnmp.entity.rfc3413.twisted',
                   'pysnmp.proto',
                   'pysnmp.proto.mpmod',
                   'pysnmp.proto.secmod',
                   'pysnmp.proto.secmod.rfc3414',
                   'pysnmp.proto.secmod.rfc3414.auth',
                   'pysnmp.proto.secmod.rfc3414.priv',
                   'pysnmp.proto.secmod.rfc3826',
                   'pysnmp.proto.secmod.rfc3826.priv',
                   'pysnmp.proto.acmod',
                   'pysnmp.proto.proxy',
                   'pysnmp.proto.api' ],
      scripts = [ 'tools/libsmi2pysnmp',
                  'tools/build-pysnmp-mib' ]
      )<commit_msg>conditionally add keyword args to setup() to support old distutils<commit_after>#!/usr/bin/env python
import sys
import string

def howto_install_setuptools():
    print """Error: You need setuptools Python package!

It's very easy to install it, just type (as root on Linux):
   wget http://peak.telecommunity.com/dist/ez_setup.py
   python ez_setup.py
"""

try:
    from setuptools import setup
    params = {
        'install_requires': [ 'pyasn1', 'pycrypto' ],
        'provides': [ 'pysnmp' ],
        'zip_safe': True
        }
except ImportError:
    for arg in sys.argv:
        if string.find(arg, 'egg') != -1:
            howto_install_setuptools()
            sys.exit(1)
    from distutils.core import setup
    if sys.version_info > (2, 2):
        params = {
            'requires': [ 'pyasn1', 'pycrypto' ],
            'provides': [ 'pysnmp' ]
        }
    else:
        params = {}

params.update( {
    'name': 'pysnmp',
    'version': '4.1.15a',
    'description': 'SNMP framework',
    'author': '<NAME>',
    'author_email': '<EMAIL>',
    'url': 'http://sourceforge.net/projects/pysnmp/',
    'license': 'BSD',
    'packages': [ 'pysnmp',
                  'pysnmp.smi',
                  'pysnmp.smi.mibs',
                  'pysnmp.smi.mibs.instances',
                  'pysnmp.carrier',
                  'pysnmp.carrier.asynsock',
                  'pysnmp.carrier.asynsock.dgram',
                  'pysnmp.carrier.twisted',
                  'pysnmp.carrier.twisted.dgram',                   
                  'pysnmp.entity',
                  'pysnmp.entity.rfc3413',
                  'pysnmp.entity.rfc3413.oneliner',
                  'pysnmp.entity.rfc3413.twisted',
                  'pysnmp.proto',
                  'pysnmp.proto.mpmod',
                  'pysnmp.proto.secmod',
                  'pysnmp.proto.secmod.rfc3414',
                  'pysnmp.proto.secmod.rfc3414.auth',
                  'pysnmp.proto.secmod.rfc3414.priv',
                  'pysnmp.proto.secmod.rfc3826',
                  'pysnmp.proto.secmod.rfc3826.priv',
                  'pysnmp.proto.acmod',
                  'pysnmp.proto.proxy',
                  'pysnmp.proto.api' ],
    'scripts': [ 'tools/libsmi2pysnmp', 'tools/build-pysnmp-mib' ]
    } )

apply(setup, (), params)

{'fraction_non_alphanumeric': 0.1332868108862526, 'fraction_numerical': 0.019306815538497325, 'mean_word_length': 1.5856885147324113, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6656016', 'n_tokens_mistral': 1555, 'n_tokens_neox': 1450, 'n_words': 225}