ðÕYf1ã@sŒdZddlZddlmZddlmZddlmZmZddl Tddl m Z ddl m Z Gd 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)Ú*)Úget_python_version)Úlogc @s™eZdZdZd&dddeƒfd'd d d dfd(d)d*d+d,g Zd ddgZddddiZd d!„Zd"d#„Z d$d%„Z dS)-Ú bdist_dumbz"create a "dumb" built distributionú bdist-dir=Údú1temporary directory for creating the distributionz plat-name=Úpz;platform name to embed in generated filenames (default: %s)úformat=Úfú>archive format to create (tar, gztar, bztar, xztar, ztar, zip)z keep-tempÚkz/keep the pseudo-installation tree around after z!creating the distribution archiveú dist-dir=ú-directory to put final built distributions inú skip-buildNú2skip rebuilding everything (for testing/debugging)Úrelativeú6build the archive using relative paths(default: false)úowner=Úuú@Owner name used when creating a tar file [default: current user]úgroup=ÚgúAGroup name used when creating a tar file [default: current group]ÚposixZgztarÚntÚzipcCsUd|_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*úA/opt/alt/python35/lib64/python3.5/distutils/command/bdist_dumb.pyÚinitialize_options2s        zbdist_dumb.initialize_optionscCs¡|jdkr9|jdƒj}tjj|dƒ|_|jdkr‡y|jtj|_Wn%t k r†t dtjƒ‚YnX|j dddd ƒdS) NZbdistZdumbz@don't know how to create dumb built distributions on platform %sr%r"r&)r%r%)r"r")r&r&) r!Zget_finalized_commandÚ bdist_baseÚosÚpathÚjoinr#Údefault_formatÚnameÚKeyErrorÚDistutilsPlatformErrorZset_undefined_options)r)r-r*r*r+Úfinalize_options=s  zbdist_dumb.finalize_optionsc Cs°|js|jdƒ|jdddƒ}|j|_|j|_d|_tjd|jƒ|jdƒd|jj ƒ|j f}t j j |j|ƒ}|js¶|j}nm|jjƒr|j|jkrtdt|jƒt|jƒfƒ‚n!t j j |jt|jƒƒ}|j||jd |d |jd |jƒ}|jjƒrktƒ}nd }|jjjd ||fƒ|js¬t|jd|jƒdS)NZbuildÚinstallZreinit_subcommandsérzinstalling to %sz%s.%szScan't make a dumb built distribution where base and platbase are different (%s, %s)Zroot_dirr'r(Úanyr Údry_run) r&Z run_commandZreinitialize_commandr!ÚrootZwarn_dirrÚinfoZ distributionZ get_fullnamer"r.r/r0r%rZhas_ext_modulesZ install_baseZinstall_platbaser4ÚreprrZ make_archiver#r'r(rZ dist_filesÚappendr$rr9)r)r6Zarchive_basenameZpseudoinstall_rootZ archive_rootÚfilenameZ pyversionr*r*r+ÚrunOs>              zbdist_dumb.run)r r r )rrr)rr r)rNr)rNr)rrr)rrr) Ú__name__Ú __module__Ú __qualname__Z descriptionrZ user_optionsZboolean_optionsr1r,r5r?r*r*r*r+r s6     r )Ú__doc__r.Zdistutils.corerZdistutils.utilrZdistutils.dir_utilrrZdistutils.errorsZdistutils.sysconfigrZ distutilsrr r*r*r*r+Ús