a oe @s|dZddlZddlZddlZddlmZddlmZddlm Z ddl m Z ddl m Z Gd d d e Zd d Zd dZdS)zD Create a dist_info directory As defined in the wheel specification N)contextmanager)log)Command)Path)_normalizationc@sXeZdZdZdZgdZddgZddiZddZd d Z e e e d d d Z ddZdS) 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-datedz0Add date stamp (e.g. 20050528) to version number)z tag-build=bz-Specify explicit tag to add to version number)no-dateDz"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_dirname dist_info_dirtag_date tag_build keep_egg_info)selfr=C:\Program Files\Certbot\pkgs\setuptools\command\dist_info.pyinitialize_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|jd|_dS)Negg_info-z .dist-info)Z distributionZsrc_rootoscurdirrrZreinitialize_commandstrZegg_baserrfinalize_optionsrrZ safer_nameZget_nameZsafer_best_effort_versionZ get_versionrpathjoinr)rZdistZ project_dirrrversionrrrr1s"     zdist_info.finalize_options)dir_path requires_bkpc cst|rj|d}t|ddt||dddz"dVWt|ddt||qpt|ddt||0ndVdS)Nz.__bkp__T) ignore_errors) dirs_exist_oksymlinks)_rm_copyshutilmove)rr#r$Zbkp_namerrr_maybe_bkp_dirKs    zdist_info._maybe_bkp_dircCs|jjddd|j|jj}tj|s6Jdtd tj |j | d}| ||j|||j Wdn1s0YdS)NT)parentsexist_okz&.egg-info dir should have been createdz creating '{}' bdist_wheel)rmkdirrrunrr isdirrinfoformatabspathrZget_finalized_commandr,rZegg2dist)rZ egg_info_dirr/rrrr1Ys  z dist_info.runN)__name__ __module__ __qualname____doc__ descriptionZ user_optionsZboolean_optionsZ negative_optrrrrboolr,r1rrrrrs  rcKs"tj|rtj|fi|dS)N)rr r2r*rmtree)Zdir_nameoptsrrrr(gs r(cKs.tjdkr|ddtj||fi|dS)N)r&)sys version_infopopr*copytree)srcdstr=rrrr)ls  r))r9rr*r@ contextlibrZ distutilsrZdistutils.corerpathlibrrrr(r)rrrrs     V