<s> from io import open <EOL> import os <EOL> import re <EOL> import subprocess <EOL> import sys <EOL> from setuptools import setup , Command <EOL> class RunCommand ( Command ) : <EOL> user_options = [ ] <EOL> def initialize_options ( self ) : <EOL> pass <EOL> def finalize_options ( self ) : <EOL> pass <EOL> class PyTest ( RunCommand ) : <EOL> user_options = [ ( '<STR_LIT>' , '<STR_LIT:k>' , '<STR_LIT>' ) ] <EOL> def initialize_options ( self ) : <EOL> self . match = None <EOL> def run ( self ) : <EOL> cli_options = [ '<STR_LIT>' , self . match ] if self . match else [ ] <EOL> os . environ [ '<STR_LIT>' ] = '<STR_LIT>' . format ( sys . version_info . major , sys . version_info . minor ) <EOL> errno = subprocess . call ( [ '<STR_LIT>' ] + cli_options ) <EOL> raise SystemExit ( errno ) <EOL> version = '<STR_LIT>' <EOL> with open ( '<STR_LIT>' , '<STR_LIT:r>' , encoding = '<STR_LIT:utf-8>' ) as f : <EOL> version = re . search ( r'<STR_LIT>' , <EOL> f . read ( ) , re . MULTILINE ) . group ( <NUM_LIT:1> ) <EOL> if not version : <EOL> raise RuntimeError ( '<STR_LIT>' ) <EOL> with open ( '<STR_LIT>' , '<STR_LIT:r>' , encoding = '<STR_LIT:utf-8>' ) as f : <EOL> readme = f . read ( ) <EOL> setup ( <EOL> name = '<STR_LIT>' , <EOL> version = version , <EOL> description = '<STR_LIT>' , <EOL> long_description = readme , <EOL> author = '<STR_LIT>' , <EOL> author_email = '<STR_LIT>' , <EOL> url = '<STR_LIT>' , <EOL> license = '<STR_LIT>' , <EOL> packages = [ '<STR_LIT>' ] , <EOL> entry_points = { '<STR_LIT>' : [ '<STR_LIT>' ] } , <EOL> tests_require = [ '<STR_LIT>' ] , <EOL> cmdclass = { '<STR_LIT:test>' : PyTest } , <EOL> platforms = '<STR_LIT>' , <EOL> classifiers = ( <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> ) , <EOL> ) </s>
