ó ’,bc@s…dZddlmZddlmZmZddlZddlZddlZdefd„ƒYZ d„Z d„Z d „Z dS( s†distutils.command.install_egg_info Implements the Distutils 'install_egg_info' command, for installing a package's PKG-INFO metadata.iĸĸĸĸ(tCommand(tlogtdir_utilNtinstall_egg_infocBsDeZdZdZd d gZd„Zd„Zd „Zd „Z RS(s)Install an .egg-info file for the packages8Install package's PKG-INFO metadata as an .egg-info files install-dir=tdsdirectory to install tosinstall-layoutscustom installation layoutcCsd|_d|_d|_dS(N(tNonet install_dirtinstall_layoutt prefix_option(tself((s8/usr/lib/python2.7/distutils/command/install_egg_info.pytinitialize_optionss  cCsa|jdd ƒ|jdd ƒ|jddƒ|jršdtt|jjƒƒƒtt|jjƒƒƒf}|jjƒdkr3t dƒ‚q3n™|j sēd t j krųd tt|jjƒƒƒtt|jjƒƒƒt j d f}n:dtt|jjƒƒƒtt|jjƒƒƒf}tjj|j|ƒ|_|jg|_dS(Nt install_libRtinstallRRs%s-%s.egg-infotdebs"unknown value for --install-layoutt real_prefixs%s-%s-py%s.egg-infoi(RR(RR(RR(R (tset_undefined_optionsRt to_filenamet safe_namet distributiontget_namet safe_versiont get_versiontlowertDistutilsOptionErrorRtsyst__dict__tversiontostpathtjoinRttargettoutputs(R tbasename((s8/usr/lib/python2.7/distutils/command/install_egg_info.pytfinalize_optionss( cCs|j}tjj|ƒrGtjj|ƒ rGtj|d|jƒnptjj|ƒr||j tj |jfd|ƒn;tjj|j ƒs·|j tj |j fd|j ƒnt jd|ƒ|jsĸt|dƒ}|jjj|ƒ|jƒndS(Ntdry_runs Removing s Creating s Writing %stw(RRRtisdirtislinkRt remove_treeR"texiststexecutetunlinkRtmakedirsRtinfotopenRtmetadatatwrite_pkg_filetclose(R Rtf((s8/usr/lib/python2.7/distutils/command/install_egg_info.pytrun3s %# cCs|jS(N(R(R ((s8/usr/lib/python2.7/distutils/command/install_egg_info.pyt get_outputsBs(s install-dir=Rsdirectory to install toN(sinstall-layoutNscustom installation layout( t__name__t __module__t__doc__t descriptionRt user_optionsR R!R1R2(((s8/usr/lib/python2.7/distutils/command/install_egg_info.pyR s    cCstjdd|ƒS(sConvert an arbitrary string to a standard distribution name Any runs of non-alphanumeric/. characters are replaced with a single '-'. s[^A-Za-z0-9.]+t-(tretsub(tname((s8/usr/lib/python2.7/distutils/command/install_egg_info.pyRJscCs%|jddƒ}tjdd|ƒS(sĖConvert an arbitrary string to a standard version string Spaces become dots, and all other non-alphanumeric characters become dashes, with runs of multiple dashes condensed to a single dash. t t.s[^A-Za-z0-9.]+R8(treplaceR9R:(R((s8/usr/lib/python2.7/distutils/command/install_egg_info.pyRRscCs|jddƒS(s|Convert a project or version name to its filename-escaped form Any '-' characters are currently replaced with '_'. R8t_(R>(R;((s8/usr/lib/python2.7/distutils/command/install_egg_info.pyR\s( R5t distutils.cmdRt distutilsRRRRR9RRRR(((s8/usr/lib/python2.7/distutils/command/install_egg_info.pyts$?