a „oe9ã@sldZddlZddlmZddlmZddlmZmZddl m Z ddl m Z dd l mZGd d „d eƒZdS) z·distutils.command.bdist_dumb Implements the Distutils 'bdist_dumb' command (create a "dumb" built distribution -- i.e., just an archive to be unpacked under $prefix or $exec_prefix).éNé)ÚCommand)Ú get_platform)Ú remove_treeÚensure_relative)ÚDistutilsPlatformError)Úget_python_version)Úlogc @s\eZdZdZddddeƒfdddd d d d g Zgd ¢ZdddœZdd„Zdd„Z dd„Z dS)Ú bdist_dumbz"create a "dumb" built distribution)z bdist-dir=Údz1temporary directory for creating the distributionz plat-name=Úpz;platform name to embed in generated filenames (default: %s))zformat=Úfz>archive format to create (tar, gztar, bztar, xztar, ztar, zip))ú keep-tempÚkzPkeep the pseudo-installation tree around after creating the distribution archive)z dist-dir=r z-directory to put final built distributions in)ú skip-buildNz2skip rebuilding everything (for testing/debugging))ÚrelativeNz7build the archive using relative paths (default: false))zowner=Úuz@Owner name used when creating a tar file [default: current user])zgroup=ÚgzAGroup name used when creating a tar file [default: current group])rrrÚgztarÚzip)ÚposixÚntcCs:d|_d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr) Ú bdist_dirÚ plat_nameÚformatÚ keep_tempÚdist_dirÚ skip_buildrÚownerÚgroup)Úself©r!úIC:\Program Files\Certbot\pkgs\setuptools\_distutils\command\bdist_dumb.pyÚinitialize_options=szbdist_dumb.initialize_optionscCsx|jdur&| d¡j}tj |d¡|_|jdurdz|jtj|_Wn t ybt dtjƒ‚Yn0|  dddd¡dS)NZbdistZdumbz@don't know how to create dumb built distributions on platform %s)rr)rr)rr) rZget_finalized_commandÚ bdist_baseÚosÚpathÚjoinrÚdefault_formatÚnameÚKeyErrorrZset_undefined_options)r r$r!r!r"Úfinalize_optionsHs$    ÿÿ üzbdist_dumb.finalize_optionscCs(|js| d¡|jddd�}|j|_|j|_d|_t d|j¡| d¡d |j   ¡|j ¡}t j  |j|¡}|js~|j}nJ|j  ¡r²|j|jkr²tdt|jƒt|jƒfƒ‚nt j  |jt|jƒ¡}|j||j||j|jd �}|j  ¡rôtƒ}nd }|j j d ||f¡|j�s$t|j|jd �dS) NÚbuildÚinstallé)Zreinit_subcommandsrzinstalling to %sz{}.{}zScan't make a dumb built distribution where base and platbase are different (%s, %s))Úroot_dirrrÚanyr )Údry_run) rZ run_commandZreinitialize_commandrÚrootZwarn_dirr ÚinforZ distributionZ get_fullnamerr%r&r'rrZhas_ext_modulesZ install_baseZinstall_platbaserÚreprrÚ make_archiverrrZ dist_filesÚappendrrr1)r r-Zarchive_basenameZpseudoinstall_rootZ archive_rootÚfilenameZ pyversionr!r!r"Úrun]sL   ÿ  ÿþÿ ÿû zbdist_dumb.runN) Ú__name__Ú __module__Ú __qualname__Ú descriptionrZ user_optionsZboolean_optionsr(r#r+r8r!r!r!r"r s*ÿýá&  r )Ú__doc__r%ZcorerÚutilrZdir_utilrrÚerrorsrZ sysconfigrZdistutils._logr r r!r!r!r"Ús