<commit_before>#!/usr/bin/env python
import os
from setuptools import setup, find_packages, Command
from setuptools.command.build_py import build_py

from tortik import version


def find_package_data(package, *directories):
    data_files = []
    current_dir = os.path.abspath(os.curdir)
    package_dir = os.path.dirname(__import__(package, fromlist=[""]).__file__)
    os.chdir(package_dir)

    for directory in directories:
        for dirpath, dirnames, filenames in os.walk(directory):
            [data_files.append(os.path.join(dirpath, f)) for f in filenames]

    os.chdir(current_dir)

    return data_files


class TestCommand(Command):
    user_options = []

    def initialize_options(self):
        pass

    def finalize_options(self):
        pass

    def run(self):
        import nose
        nose.main(argv=['nosetests', 'tortik_tests/'])


class BuildHook(build_py):
    def run(self):
        build_py.run(self)

        build_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), self.build_lib, 'tortik')
        with open(os.path.join(build_dir, 'version.py'), 'w') as version_file:
            version_file.write('version = "{0}"\n'.format(version))

install_requires = ['tornado', 'jinja2', 'six']

setup(
    name="tortik",
    version=version,
    description="Tortik - python tornado framework",
    long_description=open("README.rst").read(),
    url="https://github.com/glibin/tortik",
    download_url='https://github.com/glibin/tortik/tarball/{}'.format(version),
    packages=find_packages(exclude=['tortik_tests', 'tortik_tests.*']),
    package_data={
        "tortik": find_package_data("tortik", "templates"),
    },
    cmdclass={'test': TestCommand, 'build_py': BuildHook},
    install_requires=install_requires,
    setup_requires=['nose', 'pep8'],
    classifiers=[
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python',<commit_msg>deps version<commit_after>#!/usr/bin/env python
import os
from setuptools import setup, find_packages, Command
from setuptools.command.build_py import build_py

from tortik import version


def find_package_data(package, *directories):
    data_files = []
    current_dir = os.path.abspath(os.curdir)
    package_dir = os.path.dirname(__import__(package, fromlist=[""]).__file__)
    os.chdir(package_dir)

    for directory in directories:
        for dirpath, dirnames, filenames in os.walk(directory):
            [data_files.append(os.path.join(dirpath, f)) for f in filenames]

    os.chdir(current_dir)

    return data_files


class TestCommand(Command):
    user_options = []

    def initialize_options(self):
        pass

    def finalize_options(self):
        pass

    def run(self):
        import nose
        nose.main(argv=['nosetests', 'tortik_tests/'])


class BuildHook(build_py):
    def run(self):
        build_py.run(self)

        build_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), self.build_lib, 'tortik')
        with open(os.path.join(build_dir, 'version.py'), 'w') as version_file:
            version_file.write('version = "{0}"\n'.format(version))

install_requires = ['tornado==5.1.1', 'MarkupSafe==1.1.0', 'jinja2==2.10', 'six']

setup(
    name="tortik",
    version=version,
    description="Tortik - python tornado framework",
    long_description=open("README.rst").read(),
    url="https://github.com/glibin/tortik",
    download_url='https://github.com/glibin/tortik/tarball/{}'.format(version),
    packages=find_packages(exclude=['tortik_tests', 'tortik_tests.*']),
    package_data={
        "tortik": find_package_data("tortik", "templates"),
    },
    cmdclass={'test': TestCommand, 'build_py': BuildHook},
    install_requires=install_requires,
    setup_requires=['nose', 'pep8'],
    classifiers=[
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python',
{'fraction_non_alphanumeric': 0.14274671476423603, 'fraction_numerical': 0.0038649832517392425, 'mean_word_length': 3.734146341463415, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '430130', 'n_tokens_mistral': 1313, 'n_tokens_neox': 1269, 'n_words': 231}