a „oeè ã@s|dZddlZddlZddlZddlmZddlmZddlm Z ddl m Z ddl m Z Gd d „d e ƒZd d „Zd d„ZdS)zD Create a dist_info directory As defined in the wheel specification éN)Úcontextmanager)Úlog)ÚCommand)ÚPathé)Ú_normalizationc@sXeZdZdZdZgd¢ZddgZddiZdd„Zd d „Z e e e d œd d „ƒZ dd„ZdS)Ú dist_infoz‡ This command is private and reserved for internal use of setuptools, users should rely on ``setuptools.build_meta`` APIs. z@DO NOT CALL DIRECTLY, INTERNAL ONLY: create .dist-info directory))z output-dir=ÚozYdirectory inside of which the .dist-info will becreated (default: top of the source tree))útag-dateÚdz0Add date stamp (e.g. 20050528) to version number)z tag-build=Úbz-Specify explicit tag to add to version number)úno-dateÚDz"Don't include date stamp [default])ú keep-egg-infoNz,*TRANSITIONAL* will be removed in the futurer rr cCs(d|_d|_d|_d|_d|_d|_dS)NF)Ú output_dirÚnameÚ dist_info_dirÚtag_dateÚ tag_buildÚ keep_egg_info)Úself©rú=C:\Program Files\Certbot\pkgs\setuptools\command\dist_info.pyÚinitialize_options)s zdist_info.initialize_optionscCsÀ|j}|jptj}t|jp|ƒ|_| d¡}t|jƒ|_|j rH|j |_ n|j |_ |j r`|j |_ n|j |_ |  ¡||_ t  | ¡¡}t  | ¡¡}|›d|›�|_tj |j|j›d�¡|_dS)NÚegg_infoú-z .dist-info)Z distributionZsrc_rootÚosÚcurdirrrZreinitialize_commandÚstrZegg_baserrÚfinalize_optionsrrZ safer_nameZget_nameZsafer_best_effort_versionZ get_versionrÚpathÚjoinr)rZdistZ project_dirrrÚversionrrrr1s"     zdist_info.finalize_options)Údir_pathÚ requires_bkpc cst|rj|›d�}t|dd�t||ddd�z"dVWt|dd�t ||¡qpt|dd�t ||¡0ndVdS)Nz.__bkp__T)Ú ignore_errors)Ú dirs_exist_okÚsymlinks)Ú_rmÚ_copyÚshutilÚmove)rr#r$Zbkp_namerrrÚ_maybe_bkp_dirKs   ÿ zdist_info._maybe_bkp_dircCsš|jjddd�|j ¡|jj}tj |¡s6Jdƒ‚t d  tj  |j ¡¡¡|  d¡}|  ||j¡�| ||j ¡Wdƒn1sŒ0YdS)NT)ÚparentsÚexist_okz&.egg-info dir should have been createdz creating '{}'Ú bdist_wheel)rÚmkdirrÚrunrr ÚisdirrÚinfoÚformatÚabspathrZget_finalized_commandr,rZegg2dist)rZ egg_info_dirr/rrrr1Ys  z dist_info.runN)Ú__name__Ú __module__Ú __qualname__Ú__doc__Ú descriptionZ user_optionsZboolean_optionsZ negative_optrrrrÚboolr,r1rrrrrs  rcKs"tj |¡rtj|fi|¤ŽdS)N)rr r2r*Úrmtree)Zdir_nameÚoptsrrrr(gs r(cKs.tjdkr| dd¡tj||fi|¤ŽdS)N)éér&)ÚsysÚ version_infoÚpopr*Úcopytree)ÚsrcÚdstr=rrrr)ls  r))r9rr*r@Ú contextlibrZ distutilsrZdistutils.corerÚpathlibrÚrrr(r)rrrrÚs     V