<s> from pythonforandroid . toolchain import Recipe , shprint , shutil , current_directory <EOL> from pythonforandroid . util import ensure_dir <EOL> from os . path import exists , join <EOL> import sh <EOL> class LibZMQRecipe ( Recipe ) : <EOL> version = '<STR_LIT>' <EOL> url = '<STR_LIT>' <EOL> depends = [ '<STR_LIT>' ] <EOL> def should_build ( self , arch ) : <EOL> super ( LibZMQRecipe , self ) . should_build ( arch ) <EOL> return True <EOL> return not exists ( join ( self . ctx . get_libs_dir ( arch . arch ) , '<STR_LIT>' ) ) <EOL> def build_arch ( self , arch ) : <EOL> super ( LibZMQRecipe , self ) . build_arch ( arch ) <EOL> env = self . get_recipe_env ( arch ) <EOL> curdir = self . get_build_dir ( arch . arch ) <EOL> prefix = join ( curdir , "<STR_LIT>" ) <EOL> with current_directory ( curdir ) : <EOL> bash = sh . Command ( '<STR_LIT>' ) <EOL> shprint ( <EOL> bash , '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' . format ( prefix ) , <EOL> '<STR_LIT>' , <EOL> _env = env ) <EOL> shprint ( sh . make , _env = env ) <EOL> shprint ( sh . make , '<STR_LIT>' , _env = env ) <EOL> shutil . copyfile ( '<STR_LIT>' , join ( <EOL> self . ctx . get_libs_dir ( arch . arch ) , '<STR_LIT>' ) ) <EOL> bootstrap_obj_dir = join ( self . ctx . bootstrap . build_dir , '<STR_LIT>' , '<STR_LIT>' , arch . arch ) <EOL> ensure_dir ( bootstrap_obj_dir ) <EOL> shutil . copyfile ( <EOL> '<STR_LIT>' . format ( <EOL> self . ctx . ndk_dir , arch ) , <EOL> join ( bootstrap_obj_dir , '<STR_LIT>' ) ) <EOL> def get_recipe_env ( self , arch ) : <EOL> env = super ( LibZMQRecipe , self ) . get_recipe_env ( arch ) <EOL> env [ '<STR_LIT>' ] += '<STR_LIT>' <EOL> env [ '<STR_LIT>' ] += '<STR_LIT>' <EOL> env [ '<STR_LIT>' ] += '<STR_LIT>' . format ( self . ctx . ndk_dir ) <EOL> env [ '<STR_LIT>' ] += '<STR_LIT>' . format ( <EOL> self . ctx . ndk_dir , arch ) <EOL> env [ '<STR_LIT>' ] += '<STR_LIT>' . format ( <EOL> self . ctx . ndk_dir , arch ) <EOL> env [ '<STR_LIT>' ] += '<STR_LIT>' <EOL> env [ '<STR_LIT>' ] += '<STR_LIT>' . format ( <EOL> self . ctx . ndk_dir , arch ) <EOL> return env <EOL> recipe = LibZMQRecipe ( ) </s>
