<commit_before>import sys
from distutils.core import setup, Command
from distutils.extension import Extension

try:
    from Cython.Distutils import build_ext
    cmdclass = {'build_ext': build_ext}
    ext_modules = [Extension("cymysql.packetx", ["cymysql/packetx.pyx"]),
        Extension("cymysql.charsetx", ["cymysql/charsetx.pyx"]),
        Extension("cymysql.connectionsx", ["cymysql/connections.py"]),
        Extension("cymysql.convertersx", ["cymysql/converters.py"]),
    ]
except ImportError:
    cmdclass = {}
    ext_modules = None


class TestCommand(Command):
    user_options = [ ]

    def initialize_options(self):
        pass

    def finalize_options(self):
        pass

    def run(self):
        '''
        Finds all the tests modules in tests/, and runs them.
        '''
        from cymysql import tests
        import unittest
        unittest.main(tests, argv=sys.argv[:1])

cmdclass['test'] = TestCommand

version_tuple = __import__('cymysql').VERSION

if version_tuple[2] is not None:
    version = "%d.%d.%s" % version_tuple
else:
    version = "%d.%d" % version_tuple[:2]

classifiers = [
    'Development Status :: 4 - Beta',
    'License :: OSI Approved :: MIT License',
    'Operating System :: OS Independent',
    'Programming Language :: Python',
    'Programming Language :: Python :: 2',
    'Programming Language :: Python :: 3',
    'Topic :: Database',
]

setup(
    name = "cymysql",
    version = version,
    url = 'https://github.com/nakagami/CyMySQL/',
    classifiers=classifiers,
    keywords=['MySQL'],
    author = '<NAME>',
    author_email = '<EMAIL>',
    maintainer = '<NAME>',
    maintainer_email = '<EMAIL>',
    description = 'Python MySQL Driver powered by Cython',
    license = "MIT",
    packages = ['cymysql', 'cymysql.constants', 'cymysql.tests'],
    cmdclass = cmdclass,
    ext_modules = ext_modules,
)
<commit_msg>cythonize pure python file cursors.py err.py times.py<commit_after>import sys
from distutils.core import setup, Command
from distutils.extension import Extension

try:
    from Cython.Distutils import build_ext
    cmdclass = {'build_ext': build_ext}
    ext_modules = [Extension("cymysql.packetx", ["cymysql/packetx.pyx"]),
        Extension("cymysql.charsetx", ["cymysql/charsetx.pyx"]),
        Extension("cymysql.connectionsx", ["cymysql/connections.py"]),
        Extension("cymysql.convertersx", ["cymysql/converters.py"]),

        Extension("cymysql.cursors", ["cymysql/cursors.py"]),
        Extension("cymysql.err", ["cymysql/err.py"]),
        Extension("cymysql.times", ["cymysql/times.py"]),
    ]
except ImportError:
    cmdclass = {}
    ext_modules = None


class TestCommand(Command):
    user_options = [ ]

    def initialize_options(self):
        pass

    def finalize_options(self):
        pass

    def run(self):
        '''
        Finds all the tests modules in tests/, and runs them.
        '''
        from cymysql import tests
        import unittest
        unittest.main(tests, argv=sys.argv[:1])

cmdclass['test'] = TestCommand

version_tuple = __import__('cymysql').VERSION

if version_tuple[2] is not None:
    version = "%d.%d.%s" % version_tuple
else:
    version = "%d.%d" % version_tuple[:2]

classifiers = [
    'Development Status :: 4 - Beta',
    'License :: OSI Approved :: MIT License',
    'Operating System :: OS Independent',
    'Programming Language :: Python',
    'Programming Language :: Python :: 2',
    'Programming Language :: Python :: 3',
    'Topic :: Database',
]

setup(
    name = "cymysql",
    version = version,
    url = 'https://github.com/nakagami/CyMySQL/',
    classifiers=classifiers,
    keywords=['MySQL'],
    author = 'Y<NAME>',
    author_email = '<EMAIL>',
    maintainer = '<NAME>',
    maintainer_email = '<EMAIL>',
    description = 'Python MySQL Driver powered by Cython',
    license = "MIT",
    packages = ['cymysql', 'cymysql.constants', 'cymysql.tests'],
    cmdclass = cmdclass,
    ext_modules = ext_modules,
)

{'fraction_non_alphanumeric': 0.1424272818455366, 'fraction_numerical': 0.003009027081243731, 'mean_word_length': 3.2346072186836516, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1126648', 'n_tokens_mistral': 1316, 'n_tokens_neox': 1219, 'n_words': 290}