<s> from ast import literal_eval <EOL> from setuptools import setup , find_packages , Extension <EOL> import re <EOL> REPO_URL = "<STR_LIT>" <EOL> def convert_md ( source ) : <EOL> try : <EOL> from pypandoc import convert <EOL> return convert ( source , "<STR_LIT>" , format = "<STR_LIT>" , encoding = "<STR_LIT:utf8>" ) <EOL> except ( ImportError , OSError ) : <EOL> return source <EOL> def module_attr_re ( attr ) : <EOL> return re . compile ( r'<STR_LIT>' . format ( attr ) ) <EOL> def grep_attr ( body , attr ) : <EOL> return literal_eval ( module_attr_re ( attr ) . search ( body ) . group ( <NUM_LIT:1> ) ) <EOL> def read_description ( ) : <EOL> with open ( "<STR_LIT>" ) as f : <EOL> footer = "<STR_LIT>" "<STR_LIT>" . format ( REPO_URL ) <EOL> filter_re = re . compile ( r'<STR_LIT>' ) <EOL> contents = filter_re . sub ( "<STR_LIT>" , f . read ( ) ) + "<STR_LIT:\n>" + footer <EOL> return convert_md ( contents ) . strip ( ) <EOL> with open ( "<STR_LIT>" , "<STR_LIT:r>" ) as f : <EOL> body = f . read ( ) <EOL> version , author = [ grep_attr ( body , attr ) for attr in ( "<STR_LIT:version>" , "<STR_LIT>" ) ] <EOL> ext = Extension ( <EOL> "<STR_LIT>" , <EOL> sources = [ "<STR_LIT>" ] , <EOL> language = "<STR_LIT>" , <EOL> extra_link_args = [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" <EOL> ] <EOL> ) <EOL> setup ( <EOL> name = '<STR_LIT>' , <EOL> author = author , <EOL> author_email = '<STR_LIT>' , <EOL> version = version , <EOL> url = REPO_URL , <EOL> packages = find_packages ( ) , <EOL> include_package_data = True , <EOL> install_requires = [ <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' <EOL> ] , <EOL> entry_points = '''<STR_LIT>''' , <EOL> description = '<STR_LIT>' , <EOL> long_description = read_description ( ) , <EOL> license = '<STR_LIT>' , <EOL> ext_modules = [ ext ] , <EOL> platforms = [ "<STR_LIT>" ] , <EOL> keywords = [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] , <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> '<STR_LIT>' , <EOL> '<STR_LIT>' <EOL> ] , <EOL> ) </s>
