B u `ã @sðddlZddlZddlZddlZddlmZddlmZe d¡Z dddddœZ d d „Z d d „Z d d„Z edkrìe  ej¡ye ejdd…ƒWnXek rêZz:eejp²eeƒƒedej ejd¡ƒe d¡WddZ[XYnXdS)éN)ÚLibrary)ÚFileDownloaderz pyomo.commonz6https://ampl.com/NEW/amplgsl/amplgsl.linux-intel%s.zipz0https://ampl.com/NEW/amplgsl/amplgsl.mswin%s.zipz1https://ampl.com/NEW/amplgsl/amplgsl.macosx%s.zip)ÚlinuxZwindowsÚcygwinÚdarwincCs"t ¡ ¡ d¡rdStdƒ ¡S)NÚpypyz amplgsl.dll)ÚplatformÚpython_implementationÚlowerÚ startswithrÚpath©r r ú7/tmp/pip-unpacked-wheel-n62dbgi3/pyomo/common/getGSL.pyÚfind_GSLsrcCsV| ¡\}}| t¡|f}| tj dd¡¡t d||  ¡f¡|  |d¡dS)NÚlibz amplgsl.dllz,Fetching GSL from %s and installing it to %s) Z get_sysinfoZget_platform_urlÚurlmapZset_destination_filenameÚosr ÚjoinÚloggerÚinfoZ destinationZ get_binary_file_from_zip_archive)Ú downloaderÚsystemÚbitsÚurlr r rÚget_gsl#s  rcCstƒ}| |¡t|ƒdS)N)rÚ parse_argsr)Úargvrr r rÚmain.s rÚ__main__ézUsage: %s [--insecure] [target])ÚloggingrrÚsysZ pyomo.commonrZpyomo.common.downloadrÚ getLoggerrrrrrÚ__name__ÚsetLevelÚINFOrÚ ExceptionÚeÚprintÚmessageÚstrr ÚbasenameÚexitr r r rÚ s*