<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

from setuptools import setup, find_packages
from setuptools.extension import Extension

install_requires = [
    "ply==3.4",
]

tornado_requires = [
    "tornado>=4.0,<5.0",
    "toro==0.6"
]

dev_requires = [
    "cython>=0.20.2",
    "flake8>=2.2.2",
    "pytest>=2.6.0",
    "sphinx-rtd-theme>=0.1.6",
    "sphinx>=1.2.2",
] + tornado_requires


try:
    from Cython.Distutils import build_ext
    cython = True
except ImportError:
    cython = False

cmdclass = {}
ext_modules = []

if cython:
    ext_modules.append(Extension("thriftpy.transport.cytransport",
                                 ["thriftpy/transport/cytransport.pyx"]))
    ext_modules.append(Extension("thriftpy.protocol.cybin",
                                 ["thriftpy/protocol/cybin/cybin.pyx"]))
    cmdclass["build_ext"] = build_ext
else:
    ext_modules.append(Extension("thriftpy.transport.cytransport",
                                 ["thriftpy/transport/cytransport.c"]))
    ext_modules.append(Extension("thriftpy.protocol.cybin",
                                 ["thriftpy/protocol/cybin/cybin.c"]))

setup(name="thriftpy",
      version=__import__('thriftpy').__version__,
      description="Pure python implemention of Apache Thrift.",
      keywords="thrift python thriftpy",
      author="<NAME>",
      author_email="<EMAIL>",
      packages=find_packages(exclude=['benchmark', 'docs', 'tests']),
      entry_points={},
      url="https://thriftpy.readthedocs.org/",
      license="MIT",
      zip_safe=False,
      long_description=open("README.rst").read(),
      install_requires=install_requires,
      tests_require=tornado_requires,
      extras_require={
          "dev": dev_requires,
          "tornado": tornado_requires
      },
      cmdclass=cmdclass,
      ext_modules=ext_modules,
      classifiers=[
          "Topic :: Software Development",
          "Development Status :: 3 - Alpha",<commit_msg>get version by re<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

import re
from os.path import join, dirname

with open(join(dirname(__file__), 'thriftpy', '__init__.py'), 'r') as f:
    version = re.match(r".*__version__ = '(.*?)'", f.read(), re.S).group(1)

from setuptools import setup, find_packages
from setuptools.extension import Extension

install_requires = [
    "ply==3.4",
]

tornado_requires = [
    "tornado>=4.0,<5.0",
    "toro==0.6"
]

dev_requires = [
    "cython>=0.20.2",
    "flake8>=2.2.2",
    "pytest>=2.6.0",
    "sphinx-rtd-theme>=0.1.6",
    "sphinx>=1.2.2",
] + tornado_requires


try:
    from Cython.Distutils import build_ext
    cython = True
except ImportError:
    cython = False

cmdclass = {}
ext_modules = []

if cython:
    ext_modules.append(Extension("thriftpy.transport.cytransport",
                                 ["thriftpy/transport/cytransport.pyx"]))
    ext_modules.append(Extension("thriftpy.protocol.cybin",
                                 ["thriftpy/protocol/cybin/cybin.pyx"]))
    cmdclass["build_ext"] = build_ext
else:
    ext_modules.append(Extension("thriftpy.transport.cytransport",
                                 ["thriftpy/transport/cytransport.c"]))
    ext_modules.append(Extension("thriftpy.protocol.cybin",
                                 ["thriftpy/protocol/cybin/cybin.c"]))

setup(name="thriftpy",
      version=version,
      description="Pure python implemention of Apache Thrift.",
      keywords="thrift python thriftpy",
      author="<NAME>",
      author_email="<EMAIL>",
      packages=find_packages(exclude=['benchmark', 'docs', 'tests']),
      entry_points={},
      url="https://thriftpy.readthedocs.org/",
      license="MIT",
      zip_safe=False,
      long_description=open("README.rst").read(),
      install_requires=install_requires,
      tests_require=tornado_requires,
      extras_require={
          "dev": dev_requires,
          "tornado": tornado_requires
      },
      cmdclass=cmdclass,
      ext_modules=ext_modules,
      classifiers=[
          "Topic :: Software Development",
          "Development Status :: 3 - Alpha",
{'fraction_non_alphanumeric': 0.14776046738072054, 'fraction_numerical': 0.013388510223953261, 'mean_word_length': 2.7628205128205128, 'pattern_counts': {'":': 4, '<': 9, '<?xml version=': 0, '>': 19, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6280678', 'n_tokens_mistral': 1346, 'n_tokens_neox': 1334, 'n_words': 198}