<s> from __future__ import print_function <EOL> import os <EOL> import sys <EOL> from setuptools import setup , Extension <EOL> import numpy as np <EOL> import codecs <EOL> def read ( fname ) : <EOL> with codecs . open ( fname , '<STR_LIT:r>' , '<STR_LIT>' ) as f : <EOL> return f . read ( ) <EOL> def read_to_rst ( fname ) : <EOL> try : <EOL> import pypandoc <EOL> rstname = "<STR_LIT>" . format ( os . path . splitext ( fname ) [ <NUM_LIT:0> ] , '<STR_LIT>' ) <EOL> pypandoc . convert ( read ( fname ) , '<STR_LIT>' , format = '<STR_LIT>' , outputfile = rstname ) <EOL> with open ( rstname , '<STR_LIT:r>' ) as f : <EOL> rststr = f . read ( ) <EOL> return rststr <EOL> except ImportError : <EOL> return read ( fname ) <EOL> desc = """<STR_LIT>""" <EOL> version_dummy = { } <EOL> exec ( read ( '<STR_LIT>' ) , version_dummy ) <EOL> __version__ = version_dummy [ '<STR_LIT>' ] <EOL> del version_dummy <EOL> def ismac ( ) : <EOL> return sys . platform [ : <NUM_LIT:6> ] == '<STR_LIT>' <EOL> if ismac ( ) : <EOL> compile_flags = [ '<STR_LIT>' , ] <EOL> link_args = [ ] <EOL> else : <EOL> compile_flags = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> link_args = [ '<STR_LIT>' ] <EOL> ext_mods = [ Extension ( name = '<STR_LIT>' , <EOL> sources = [ '<STR_LIT>' , <EOL> '<STR_LIT>' ] , <EOL> include_dirs = [ np . get_include ( ) , '<STR_LIT:.>' ] , <EOL> extra_compile_args = compile_flags , <EOL> extra_link_args = link_args ) , <EOL> Extension ( name = '<STR_LIT>' , <EOL> sources = [ '<STR_LIT>' ] , <EOL> include_dirs = [ np . get_include ( ) , '<STR_LIT:.>' ] , <EOL> extra_link_args = link_args , <EOL> extra_compile_args = compile_flags ) , <EOL> Extension ( name = '<STR_LIT>' , <EOL> sources = [ '<STR_LIT>' ] , <EOL> include_dirs = [ np . get_include ( ) , '<STR_LIT:.>' ] , <EOL> extra_compile_args = compile_flags ) , <EOL> Extension ( name = '<STR_LIT>' , <EOL> sources = [ '<STR_LIT>' ] , <EOL> include_dirs = [ np . get_include ( ) , '<STR_LIT:.>' ] , <EOL> extra_compile_args = compile_flags ) , <EOL> Extension ( name = '<STR_LIT>' , <EOL> sources = [ '<STR_LIT>' ] , <EOL> include_dirs = [ np . get_include ( ) , '<STR_LIT:.>' ] , <EOL> extra_compile_args = compile_flags ) ] <EOL> setup ( name = '<STR_LIT>' , <EOL> version = __version__ , <EOL> author = read_to_rst ( '<STR_LIT>' ) , <EOL> author_email = "<STR_LIT>" , <EOL> description = ( "<STR_LIT>" ) , <EOL> license = "<STR_LIT>" , <EOL> keywords = "<STR_LIT>" , <EOL> url = "<STR_LIT>" , <EOL> ext_modules = ext_mods , <EOL> packages = [ "<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> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ] , <EOL> package_dir = { '<STR_LIT>' : '<STR_LIT>' } , <EOL> include_package_data = True , <EOL> py_modules = [ '<STR_LIT>' ] , <EOL> test_suite = '<STR_LIT>' , <EOL> long_description = desc , <EOL> install_requires = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] , <EOL> extras_require = { '<STR_LIT>' : [ '<STR_LIT>' ] , <EOL> '<STR_LIT>' : [ '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> ] , <EOL> '<STR_LIT>' : [ '<STR_LIT>' , <EOL> '<STR_LIT>' ] , <EOL> '<STR_LIT>' : [ '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> ] , <EOL> } , <EOL> classifiers = [ '<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> ) <EOL> local_file = os . path . abspath ( os . path . join ( os . path . dirname ( __file__ ) , '<STR_LIT>' , '<STR_LIT>' ) ) <EOL> home = os . getenv ( '<STR_LIT>' ) or os . getenv ( '<STR_LIT>' ) <EOL> user_file = os . path . join ( home , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> print ( "<STR_LIT>" ) <EOL> try : <EOL> if not os . path . exists ( user_file ) : <EOL> old_user_file = os . path . join ( home , '<STR_LIT>' ) <EOL> if os . path . exists ( old_user_file ) : <EOL> print ( "<STR_LIT>" . format ( user_file ) ) <EOL> if not os . path . exists ( os . path . dirname ( user_file ) ) : <EOL> os . makedirs ( os . path . dirname ( user_file ) ) <EOL> os . rename ( old_user_file , user_file ) <EOL> else : <EOL> print ( "<STR_LIT>" . format ( user_file ) ) <EOL> if not os . path . exists ( os . path . dirname ( user_file ) ) : <EOL> os . makedirs ( os . path . dirname ( user_file ) ) <EOL> with open ( user_file , '<STR_LIT:w>' ) as f : <EOL> with open ( local_file , '<STR_LIT:r>' ) as l : <EOL> tmp = l . read ( ) <EOL> f . write ( tmp ) <EOL> else : <EOL> print ( "<STR_LIT>" . format ( user_file ) ) <EOL> except : <EOL> print ( "<STR_LIT>" . format ( user_file ) ) </s>
