<s> """<STR_LIT>""" <EOL> import os <EOL> import sys <EOL> import shutil <EOL> try : <EOL> import setuptools <EOL> except ImportError : <EOL> pass <EOL> from distutils . core import setup <EOL> def get_version_and_doc ( filename ) : <EOL> NS = dict ( __version__ = '<STR_LIT>' , __doc__ = '<STR_LIT>' ) <EOL> docStatus = <NUM_LIT:0> <EOL> for line in open ( filename , '<STR_LIT:rb>' ) . read ( ) . decode ( ) . splitlines ( ) : <EOL> if line . startswith ( '<STR_LIT>' ) : <EOL> exec ( line . strip ( ) , NS , NS ) <EOL> elif line . startswith ( '<STR_LIT>' ) : <EOL> if docStatus == <NUM_LIT:0> : <EOL> docStatus = <NUM_LIT:1> <EOL> line = line . lstrip ( '<STR_LIT:">' ) <EOL> elif docStatus == <NUM_LIT:1> : <EOL> docStatus = <NUM_LIT:2> <EOL> if docStatus == <NUM_LIT:1> : <EOL> NS [ '<STR_LIT>' ] += line <EOL> if not NS [ '<STR_LIT>' ] : <EOL> raise RuntimeError ( '<STR_LIT>' ) <EOL> return NS [ '<STR_LIT>' ] , NS [ '<STR_LIT>' ] <EOL> def package_tree ( pkgroot ) : <EOL> subdirs = [ os . path . relpath ( i [ <NUM_LIT:0> ] , THIS_DIR ) . replace ( os . path . sep , '<STR_LIT:.>' ) <EOL> for i in os . walk ( os . path . join ( THIS_DIR , pkgroot ) ) <EOL> if '<STR_LIT>' in i [ <NUM_LIT:2> ] ] <EOL> return subdirs <EOL> def copy_for_legacy_python ( src_dir , dest_dir ) : <EOL> from translate_to_legacy import LegacyPythonTranslator <EOL> skip = [ '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' ] <EOL> if os . path . isdir ( dest_dir ) : <EOL> shutil . rmtree ( dest_dir ) <EOL> ignore = lambda src , names : [ n for n in names if n == '<STR_LIT>' ] <EOL> shutil . copytree ( src_dir , dest_dir , ignore = ignore ) <EOL> LegacyPythonTranslator . translate_dir ( dest_dir , skip = skip ) <EOL> THIS_DIR = os . path . dirname ( __file__ ) <EOL> name = '<STR_LIT>' <EOL> description = "<STR_LIT>" <EOL> version , doc = get_version_and_doc ( os . path . join ( THIS_DIR , name , '<STR_LIT>' ) ) <EOL> extras_require = { '<STR_LIT>' : [ '<STR_LIT>' ] } <EOL> extras_require [ '<STR_LIT>' ] = extras_require [ '<STR_LIT>' ] <EOL> extras_require [ '<STR_LIT:all>' ] = [ i for ii in extras_require . values ( ) for i in ii ] <EOL> if '<STR_LIT>' in sys . argv and sys . version_info [ <NUM_LIT:0> ] == <NUM_LIT:3> : <EOL> from flexx import ui <EOL> name_legacy = name + '<STR_LIT>' <EOL> if os . path . isfile ( os . path . join ( THIS_DIR , '<STR_LIT>' ) ) : <EOL> copy_for_legacy_python ( os . path . join ( THIS_DIR , name ) , <EOL> os . path . join ( THIS_DIR , name_legacy ) ) <EOL> setup ( <EOL> name = name , <EOL> version = version , <EOL> author = '<STR_LIT>' , <EOL> author_email = '<STR_LIT>' , <EOL> license = '<STR_LIT>' , <EOL> url = '<STR_LIT>' , <EOL> download_url = '<STR_LIT>' , <EOL> keywords = "<STR_LIT>" , <EOL> description = description , <EOL> long_description = doc , <EOL> platforms = '<STR_LIT>' , <EOL> provides = [ name ] , <EOL> install_requires = [ ] , <EOL> extras_require = extras_require , <EOL> packages = package_tree ( name ) + package_tree ( name_legacy ) , <EOL> package_dir = { name : name , name_legacy : name_legacy } , <EOL> package_data = { name : [ '<STR_LIT>' ] , name_legacy : [ '<STR_LIT>' ] } , <EOL> entry_points = { '<STR_LIT>' : [ '<STR_LIT>' ] , } , <EOL> zip_safe = False , <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> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> ] , <EOL> ) </s>
