<s> import os <EOL> import re <EOL> import shutil <EOL> import sys <EOL> if sys . version_info [ : <NUM_LIT:2> ] < ( <NUM_LIT:2> , <NUM_LIT:6> ) : <EOL> sys . exit ( '<STR_LIT>' ) <EOL> try : <EOL> from setuptools import setup <EOL> from setuptools . command . test import test as TestCommand <EOL> class PyTest ( TestCommand ) : <EOL> user_options = [ ( '<STR_LIT>' , '<STR_LIT:a>' , "<STR_LIT>" ) ] <EOL> def initialize_options ( self ) : <EOL> TestCommand . initialize_options ( self ) <EOL> self . pytest_args = [ ] <EOL> def finalize_options ( self ) : <EOL> TestCommand . finalize_options ( self ) <EOL> def run_tests ( self ) : <EOL> import pytest <EOL> sys . exit ( pytest . main ( self . pytest_args ) ) <EOL> setup_params = { <EOL> '<STR_LIT>' : { <EOL> '<STR_LIT>' : [ '<STR_LIT>' ] , <EOL> } , <EOL> '<STR_LIT>' : False , <EOL> '<STR_LIT>' : { '<STR_LIT:test>' : PyTest } , <EOL> '<STR_LIT>' : [ '<STR_LIT>' , '<STR_LIT>' ] , <EOL> } <EOL> except ImportError : <EOL> from distutils . core import setup <EOL> if sys . platform == '<STR_LIT:win32>' : <EOL> print ( '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> setup_params = { } <EOL> else : <EOL> script = '<STR_LIT>' <EOL> setup_params = { '<STR_LIT>' : [ script ] } <EOL> def read_file ( * paths ) : <EOL> here = os . path . dirname ( os . path . abspath ( __file__ ) ) <EOL> with open ( os . path . join ( here , * paths ) ) as f : <EOL> return f . read ( ) <EOL> long_description = read_file ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> long_description = long_description . strip ( ) . split ( '<STR_LIT>' , <NUM_LIT:1> ) [ <NUM_LIT:0> ] <EOL> changes = read_file ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> releases_found = <NUM_LIT:0> <EOL> change_lines = [ ] <EOL> for line in changes . splitlines ( ) : <EOL> change_lines . append ( line ) <EOL> if line . startswith ( '<STR_LIT>' ) : <EOL> releases_found += <NUM_LIT:1> <EOL> if releases_found > <NUM_LIT:2> : <EOL> break <EOL> changes = '<STR_LIT:\n>' . join ( change_lines [ : - <NUM_LIT:2> ] ) + '<STR_LIT:\n>' <EOL> changes += '<STR_LIT>' <EOL> changes = re . sub ( r'<STR_LIT>' , r'<STR_LIT>' , changes ) <EOL> changes = re . sub ( r'<STR_LIT>' , r'<STR_LIT>' , changes ) <EOL> long_description += '<STR_LIT>' + changes <EOL> def get_version ( ) : <EOL> version_file = read_file ( '<STR_LIT>' ) <EOL> version_match = re . search ( r"<STR_LIT>" , <EOL> version_file , re . M ) <EOL> if version_match : <EOL> return version_match . group ( <NUM_LIT:1> ) <EOL> raise RuntimeError ( "<STR_LIT>" ) <EOL> try : <EOL> import multiprocessing <EOL> except ImportError : <EOL> pass <EOL> setup ( <EOL> name = '<STR_LIT>' , <EOL> version = get_version ( ) , <EOL> description = "<STR_LIT>" , <EOL> long_description = long_description , <EOL> classifiers = [ <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> ] , <EOL> keywords = '<STR_LIT>' , <EOL> author = '<STR_LIT>' , <EOL> author_email = '<STR_LIT>' , <EOL> maintainer = '<STR_LIT>' , <EOL> maintainer_email = '<STR_LIT>' , <EOL> url = '<STR_LIT>' , <EOL> license = '<STR_LIT>' , <EOL> py_modules = [ '<STR_LIT>' ] , <EOL> packages = [ '<STR_LIT>' ] , <EOL> package_data = { '<STR_LIT>' : [ '<STR_LIT>' ] } , <EOL> ** setup_params ) </s>
