B  @`ã @sâddlZddlZddlZddlZddlmZe d¡ZdddddœZdd d ddœZ d d „Z d d „Z e dkrÞe  ej¡ye ejdd…ƒWnPek rÜZz2eejƒedej ejd¡ƒe d¡WddZ[XYnXdS)éN)ÚFileDownloaderz pyomo.commonz1https://ampl.com/netlib/ampl/student/linux/gjh.gzz5https://ampl.com/netlib/ampl/student/mswin/gjh.exe.gzz9https://ampl.com/netlib/ampl/student/macosx/x86_32/gjh.gz)ÚlinuxZwindowsÚcygwinÚdarwinÚz.execCsˆ| ¡\}}| t¡}| tj ddt|¡¡t  d||  ¡f¡|  |¡t  |  ¡¡j }t |  ¡|t jBt jBt jB¡dS)NÚbinZgjhz,Fetching GJH from %s and installing it to %s)Z get_sysinfoZget_platform_urlÚurlmapZset_destination_filenameÚosÚpathÚjoinÚexemapÚloggerÚinfoZ destinationZget_gzipped_binary_fileÚstatÚst_modeÚchmodÚS_IXUSRÚS_IXGRPÚS_IXOTH)Ú downloaderÚsystemÚbitsÚurlÚmode©rúD/tmp/pip-unpacked-wheel-bi3529v6/pyomo/contrib/trustregion/getGJH.pyÚget_gjh"s    rcCstƒ}| |¡t|ƒdS)N)rÚ parse_argsr)ÚargvrrrrÚmain2s rÚ__main__ézUsage: %s [--insecure] [target])Úloggingr rÚsysZpyomo.common.downloadrÚ getLoggerr rr rrÚ__name__ÚsetLevelÚINFOrÚ ExceptionÚeÚprintÚmessager ÚbasenameÚexitrrrrÚ s.