<commit_before>from __future__ import print_function

import sys, os

from setuptools import setup
from setuptools.command.test import test as TestCommand


PROJECT_ROOT, _ = os.path.split(__file__)
PROJECT_NAME = 'jenkinsflow'
COPYRIGHT = u"Copyright (c) 2012 - 2015 <NAME>, Hupfeldt IT"
PROJECT_AUTHORS = u"<NAME>"
PROJECT_EMAILS = '<EMAIL>'
PROJECT_URL = "https://github.com/lhupfeldt/jenkinsflow"
SHORT_DESCRIPTION = 'Python API with high level build flow constructs (parallel/serial) for Jenkins (and Hudson).'
LONG_DESCRIPTION = open(os.path.join(PROJECT_ROOT, "README.txt")).read()

on_rtd = os.environ.get('READTHEDOCS') == 'True'
is_ci = os.environ.get('CI', 'false').lower() == 'true'


class Test(TestCommand):
    def initialize_options(self):
        TestCommand.initialize_options(self)
        self.pytest_args = []

    def finalize_options(self):
        TestCommand.finalize_options(self)
        self.test_args = []
        self.test_suite = True

    def run_tests(self):
        import test.run
        if is_ci:
            print("Running under CI")
            sys.exit(test.run.cli(api='mock', mock_speedup=1))
        sys.exit(test.run.cli(api='mock'))


flow_requires = ['atomicfile~=1.0']
cli_requires = ['click~=6.0']
job_load_requires = ['tenjin~=1.1.1']
jenkins_api_requires = ['requests~=2.7.0']
# You need to install python(3)-devel to be be able to install psutil, see INSTALL.md
script_api_requires = ['psutil~=5.2.2', 'setproctitle~=1.1.10']
visual_requires = ['bottle~=0.12']

if sys.version_info.major < 3:
    flow_requires.extend(['enum34', 'subprocess32'])

if not on_rtd:
    install_requires = flow_requires + cli_requires + job_load_requires + jenkins_api_requires + script_api_requires + visual_requires
else:
    install_requires = flow_requires + cli_requires + jenkins_api_requires + script_api_requires

tests_require = [
    'pytest>=3.0.5', 'pytest-cov>=2.4.0', 'pytest-instafail~=0.3.0', 'pytest-xdist~=1.16',
    'click~=6.0', 'tenjin~=1.1.1', 'bottle~=0.12',
    # The test also tests creation of the documentation
    'sphinx~=1.6.1', 'sphinxcontrib-programoutput']

if sys.version_info.major < 3:
    tests_require.append('proxytypes')
else:
    tests_require.append('objproxies~=0.9.4')<commit_msg>Speedup 10 when running under CI<commit_after>from __future__ import print_function

import sys, os

from setuptools import setup
from setuptools.command.test import test as TestCommand


PROJECT_ROOT, _ = os.path.split(__file__)
PROJECT_NAME = 'jenkinsflow'
COPYRIGHT = u"Copyright (c) 2012 - 2015 <NAME>, Hupfeldt IT"
PROJECT_AUTHORS = u"<NAME>"
PROJECT_EMAILS = '<EMAIL>'
PROJECT_URL = "https://github.com/lhupfeldt/jenkinsflow"
SHORT_DESCRIPTION = 'Python API with high level build flow constructs (parallel/serial) for Jenkins (and Hudson).'
LONG_DESCRIPTION = open(os.path.join(PROJECT_ROOT, "README.txt")).read()

on_rtd = os.environ.get('READTHEDOCS') == 'True'
is_ci = os.environ.get('CI', 'false').lower() == 'true'


class Test(TestCommand):
    def initialize_options(self):
        TestCommand.initialize_options(self)
        self.pytest_args = []

    def finalize_options(self):
        TestCommand.finalize_options(self)
        self.test_args = []
        self.test_suite = True

    def run_tests(self):
        import test.run
        if is_ci:
            print("Running under CI")
            sys.exit(test.run.cli(api='mock', mock_speedup=10))
        sys.exit(test.run.cli(api='mock'))


flow_requires = ['atomicfile~=1.0']
cli_requires = ['click~=6.0']
job_load_requires = ['tenjin~=1.1.1']
jenkins_api_requires = ['requests~=2.7.0']
# You need to install python(3)-devel to be be able to install psutil, see INSTALL.md
script_api_requires = ['psutil~=5.2.2', 'setproctitle~=1.1.10']
visual_requires = ['bottle~=0.12']

if sys.version_info.major < 3:
    flow_requires.extend(['enum34', 'subprocess32'])

if not on_rtd:
    install_requires = flow_requires + cli_requires + job_load_requires + jenkins_api_requires + script_api_requires + visual_requires
else:
    install_requires = flow_requires + cli_requires + jenkins_api_requires + script_api_requires

tests_require = [
    'pytest>=3.0.5', 'pytest-cov>=2.4.0', 'pytest-instafail~=0.3.0', 'pytest-xdist~=1.16',
    'click~=6.0', 'tenjin~=1.1.1', 'bottle~=0.12',
    # The test also tests creation of the documentation
    'sphinx~=1.6.1', 'sphinxcontrib-programoutput']

if sys.version_info.major < 3:
    tests_require.append('proxytypes')
else:
    tests_require.append('objproxies~=0.9.4')
{'fraction_non_alphanumeric': 0.142226148409894, 'fraction_numerical': 0.028047703180212016, 'mean_word_length': 4.378859857482185, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '270524', 'n_tokens_mistral': 1711, 'n_tokens_neox': 1592, 'n_words': 314}