<commit_before># -*- coding: utf-8  -*-
"""
Installer script for Pywikibot 2.0 framework
"""
#
# (C) Pywikibot team, 2009-2013
#
# Distributed under the terms of the MIT license.
#
__version__ = '$Id$'
#

import sys

from ez_setup import use_setuptools
use_setuptools()

from setuptools import setup, find_packages
from setuptools.command import install

test_deps = []

if sys.version_info[0] != 2:
    raise RuntimeError("ERROR: Pywikipediabot only runs under Python 2")
elif sys.version_info[1] < 6:
    raise RuntimeError("ERROR: Pywikipediabot only runs under Python 2.6 or higher")
elif sys.version_info[1] == 6:
    test_deps = ['unittest2']
    testcollector = "tests.utils.collector"
else:
    testcollector = "tests"


class pwb_install(install.install):
    """
    Setuptools' install command subclassed to automatically call
    `generate_user_files.py` after installing the package.
    """
    def run(self):
        install.install.do_egg_install(self)
        import subprocess
        python = sys.executable
        python = python.replace("pythonw.exe", "python.exe")  # for Windows
        subprocess.call([python, "generate_user_files.py"])

setup(
    name='Pywikipediabot',
    version='2.0b1',
    description='Python Wikipedia Bot Framework',
    license='MIT License',
    packages=find_packages(),
    install_requires=[
        'httplib2>=0.6.0'
    ],
    dependency_links=[
        'https://git.wikimedia.org/zip/?r=pywikibot/externals/httplib2.git&format=gz#egg=httplib2-0.8-pywikibot1'
    ],
    test_suite=testcollector,
    tests_require=test_deps,
    classifiers=[
        'License :: OSI Approved :: MIT License',
        'Development Status :: 4 - Beta'
        'Operating System :: OS Independent',
        'Intended Audience :: Developers',
        'Environment :: Console',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7'
    ],
    cmdclass={
        'install': pwb_install
    }
)
<commit_msg>Add --python3ok option to setup.py<commit_after># -*- coding: utf-8  -*-
"""
Installer script for Pywikibot 2.0 framework
"""
#
# (C) Pywikibot team, 2009-2013
#
# Distributed under the terms of the MIT license.
#
__version__ = '$Id$'
#

import sys

from ez_setup import use_setuptools
use_setuptools()

from setuptools import setup, find_packages
from setuptools.command import install

test_deps = []
testcollector = "tests"

if sys.version_info[0] == 2:
    if sys.version_info[1] < 6:
        raise RuntimeError("ERROR: Pywikipediabot only runs under Python 2.6 or higher")
    elif sys.version_info[1] == 6:
        test_deps = ['unittest2']
        testcollector = "tests.utils.collector"

if sys.version_info[0] == 3:
    if "--python3ok" not in sys.argv:
        # use setup.py test --python3ok  to run tests
        print("ERROR: Pywikipediabot only runs under Python 2")
        sys.exit(1)
    sys.argv.remove('--python3ok')
    if sys.version_info[1] < 3:
        print("ERROR: Python 3.3 or higher is required!")
        sys.exit(1)


class pwb_install(install.install):
    """
    Setuptools' install command subclassed to automatically call
    `generate_user_files.py` after installing the package.
    """
    def run(self):
        install.install.do_egg_install(self)
        import subprocess
        python = sys.executable
        python = python.replace("pythonw.exe", "python.exe")  # for Windows
        subprocess.call([python, "generate_user_files.py"])

setup(
    name='Pywikipediabot',
    version='2.0b1',
    description='Python Wikipedia Bot Framework',
    license='MIT License',
    packages=find_packages(),
    install_requires=[
        'httplib2>=0.6.0'
    ],
    dependency_links=[
        'https://git.wikimedia.org/zip/?r=pywikibot/externals/httplib2.git&format=gz#egg=httplib2-0.8-pywikibot1'
    ],
    test_suite=testcollector,
    tests_require=test_deps,
    classifiers=[
        'License :: OSI Approved :: MIT License',
        'Development Status :: 4 - Beta'
        'Operating System :: OS Independent',
        'Intended Audience :: Developers',
        'Environment :: Console',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7'
    ],
    cmdclass={
        'install': pwb_install
    },
    use_2to3=False
)

{'fraction_non_alphanumeric': 0.12369216461288073, 'fraction_numerical': 0.020925366193908394, 'mean_word_length': 3.108882521489971, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6751775', 'n_tokens_mistral': 1449, 'n_tokens_neox': 1381, 'n_words': 327}