<commit_before>import os
import sys
import jeeves

try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup

if sys.argv[-1] == 'publish':
    os.system("git tag -a v%s -m 'version %s'" % (jeeves.__version__, jeeves.__version__))
    os.system('python setup.py sdist upload')
    os.system('git push --tags')
    sys.exit()

if sys.argv[-1] == 'test':
    os.system('python tests/test_jeeves.py')
    sys.exit()

required = ['twisted', 'requests', ]
packages = [
    'tests',
    'jeeves',
    'jeeves.bin',
    'jeeves.conf',
    'jeeves.conf.project_template',
    'jeeves.conf.project_template.plugins',
    'jeeves.core',
    'jeeves.core.handlers',
    'jeeves.core.management',
    'jeeves.core.plugins',
    'jeeves.core.cache',
    'jeeves.contrib',
    'jeeves.contrib.plugins',
    'jeeves.utils',
]

setup(
    name="jeeves-framework",
    version=jeeves.__version__,
    license=open("LICENSE.rst").read(),
    url='http://procrastinatingdev.com/jeeves/',
    author='<NAME>',
    author_email='<EMAIL>',
    description='A Python IRC Bot Framework. Easily create IRC bots with a single command',
    long_description=open('README.rst').read(),
    download_url='',
    install_requires=required,
    packages=packages,
    scripts=['jeeves/bin/jeeves-admin.py'],
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Natural Language :: English',
        'Topic :: Communications :: Chat :: Internet Relay Chat',
        'Topic :: Software Development :: Libraries :: Application Frameworks',
   ],
)
<commit_msg>Updated setup.py to process packages better<commit_after>import os
import sys
import jeeves

try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup

required = ['twisted', 'requests', ]

def fullsplit(path, result=None):
    """
    Split a pathname into components (the opposite of os.path.join) in a
    platform-neutral way.
    """
    if result is None:
        result = []
    head, tail = os.path.split(path)
    if head == '':
        return [tail] + result
    if head == path:
        return result
    return fullsplit(head, [tail] + result)

packages = []
root_dir = os.path.dirname(__file__)
if root_dir != '':
    os.chdir(root_dir)
jeeves_dir = 'jeeves'

for dirpath, dirnames, filenames in os.walk(jeeves_dir):
    # Ignore dirnames that start with '.'
    for i, dirname in enumerate(dirnames):
        if dirname.startswith('.'): del dirnames[i]
    if '__init__.py' in filenames:
        packages.append('.'.join(fullsplit(dirpath)))

if sys.argv[-1] == 'publish':
    os.system("git tag -a v%s -m 'version %s'" % (jeeves.__version__, jeeves.__version__))
    os.system('python setup.py sdist upload')
    os.system('git push --tags')
    sys.exit()

if sys.argv[-1] == 'test':
    os.system('python tests/test_jeeves.py')
    sys.exit()

setup(
    name="jeeves-framework",
    version=jeeves.__version__,
    license=open("LICENSE.rst").read(),
    url='http://procrastinatingdev.com/jeeves/',
    author='<NAME>',
    author_email='<EMAIL>',
    description='A Python IRC Bot Framework. Easily create IRC bots with a single command',
    long_description=open('README.rst').read(),
    download_url='',
    install_requires=required,
    packages=packages,
    scripts=['jeeves/bin/jeeves-admin.py'],
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Natural Language :: English',
        'Topic :: Communications :: Chat :: Internet Relay Chat',
        'Topic :: Software Development :: Libraries :: Application Frameworks',
   ],
)

{'fraction_non_alphanumeric': 0.1470517448856799, 'fraction_numerical': 0.0033694344163658243, 'mean_word_length': 3.147704590818363, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6210902', 'n_tokens_mistral': 1302, 'n_tokens_neox': 1274, 'n_words': 319}