a „oe¬ ã @sˆddlZddlZddlZddlZddlZdd„Zej d¡dkrXedƒedƒedƒz ddl Z WnJe y®Z z2edƒed e fƒed ƒed ƒWYdZ [ n dZ [ 00z ddl Z WnLe �yZ z2ed ƒed e fƒed ƒed ƒWYdZ [ n dZ [ 00d d„Z dd„Zdd„Zej e ej¡¡\ZZ\ZZej e¡\ZZe edeeƒede jƒede jƒedƒdS)éNcCsJtƒtdƒtdƒtdƒtƒtdƒtdƒtdƒt |¡dS)Nz=This script is designed to copy and register the Python debugz>binaries. It looks for pythonxx_d.dll, pythoncomxx_d.dll etc,z=and installs them to work correctly with Python debug builds.z9You will generally find this script in the. zip file thatz5included these _d files. Please run this script fromzthat directory)ÚprintÚsysÚexit)Úrc©rú6C:\Program Files\Certbot\pkgs\win32\scripts\setup_d.pyÚ usage_and_diesrÚ_dz=This scripts appears to be running a DEBUG version of Python.z7Please run it using a normal release build (python.exe)éz1Could not import the release version of pythoncomzThe error details are: %sz.Please correct this error and rerun the scriptéz2Could not import the release version of pywintypescCs²|}tj |¡sTtj tj tjd¡d|¡}tdtj |¡tj |¡fƒdSz"t   ||¡td||fƒWdStd||fƒtt tj dƒƒt dƒYn0dS)NrzCan not find %s or %s to copyzCopied %s -> %sr zError copying '%s' -> '%s'é)ÚosÚpathÚisfileÚjoinÚsplitrÚargvrÚabspathÚshutilÚcopyÚstrÚexc_infor)ÚsrcÚdestZorig_srcrrrÚ_docopy0s"  ÿÿ rc Cs¾tj |¡sJdƒ‚zt tjdtj|f¡}Wn\tjyŒzt tjdtj|f¡}Wn*tjy†t d|fƒt dƒYn0Yn0t  |d¡}t  |dtj |¡t d|fƒdS)Nz-Shouldn't get here if the file doesn't exist!z(Software\Python\PythonCore\%s\Modules\%szBCould not find the existing '%s' module registered in the registryéZDebugzRegistered '%s' in the registry)r rrÚwinregÚOpenKeyÚHKEY_LOCAL_MACHINErÚwinverÚerrorrrÚ CreateKeyÚSetValueÚREG_SZ)Úmod_nameZdll_nameÚkeyZsub_keyrrrÚ _doregisterCs0 þÿþÿÿ r&cCsVtj |¡\}}tj |¡\}}|d|}t||ƒrRt|tj tj ||¡¡ƒdS)Nr )r rrÚsplitextrr&rr)r$Zrelease_mod_filenamerÚfnameÚbaseÚextZ new_fnamerrrÚ _domodule]s   r+Ú pythoncomÚ pywintypeszSystem _d files were setup.)r rrrZwin32apirÚ__file__Úfindrr,Ú ImportErrorZdetailsr-rr&r+rrZGetModuleFileNameÚ dllhandler(r'r)r*rrrrÚs@