Rec@sdZddlmZddlmZmZddlmZddlm Z ddl Z ddl Z ddl Z ddl Z ddlmZddlmZmZmZdd lmZdd lmZdd lmZy#dd lmZmZd ZWn0ek r-ddlmZmZdZnXdZ dZ!defdYZ"e#j$dj%Z&dZ'dZ(dZ)ide*6de+6Z,dZ-dZ.dZ/dddd gZ0d!d!e*d"d#Z1dS($s6setuptools.command.bdist_egg Build .egg distributionsi(tDistutilsSetupError(t remove_treetmkpath(tlog(tCodeTypeN(tsix(tget_build_platformt Distributiontensure_directory(t EntryPoint(tLibrary(tCommand(tget_pathtget_python_versioncCs tdS(Ntpurelib(R (((s/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyt _get_purelibs(tget_python_libR cCs ttS(N(RtFalse(((s/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyRscCsEd|kr%tjj|d}n|jdrA|d }n|S(Nt.itmodulei(tostpathtsplitexttendswith(tfilename((s/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyt strip_module"s   cCsBtjdj}t|d}|j||WdQXdS(NsR def __bootstrap__(): global __bootstrap__, __loader__, __file__ import sys, pkg_resources, imp __file__ = pkg_resources.resource_filename(__name__, %r) __loader__ = None; del __bootstrap__, __loader__ imp.load_dynamic(__name__,__file__) __bootstrap__() tw(ttextwraptdedenttlstriptopentwrite(tresourcetpyfilet_stub_templatetf((s/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyt write_stub*st bdist_eggcBseZdZddddefdd d d d fd d!gZd ddgZdZdZdZ dZ dZ dZ dZ dZdZdZdZRS("screate an "egg" distributions bdist-dir=tbs1temporary directory for creating the distributions plat-name=tps;platform name to embed in generated filenames (default: %s)sexclude-source-filess+remove all .py files from the generated eggs keep-temptks/keep the pseudo-installation tree around after s!creating the distribution archives dist-dir=tds-directory to put final built distributions ins skip-builds2skip rebuilding everything (for testing/debugging)cCsCd|_d|_d|_d|_d|_d|_d|_dS(Ni(tNonet bdist_dirt plat_namet keep_temptdist_dirt skip_buildt egg_outputtexclude_source_files(tself((s/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/bdist_egg.pytinitialize_optionsOs      cCs|jd}|_|j|_|jdkr^|jdj}tjj|d|_n|j dkr|t |_ n|j dd|j dkrt dd|j|jt|jjo|j j}tjj|j|d|_ ndS(Ntegg_infotbdistteggR.s.egg(R.R.(tget_finalized_commandtei_cmdR4R+R*t bdist_baseRRtjoinR,Rtset_undefined_optionsR0Rtegg_namet egg_versionR t distributionthas_ext_modulesR.(R2R8R9tbasename((s/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/bdist_egg.pytfinalize_optionsXs !cCs_|j|jd_tjjtjjt}|jj g}|j_ x|D]}t |t rt |dkrtjj |drtjj|d}tjj|}||ks|j|tjr|t |d|df}qqn|jj j|qVWz0tjd|j|jdddddWd||j_ XdS( Ntinstalliiisinstalling package data to %st install_datatforcetroot(R+R7t install_libRRtnormcasetrealpathRR>t data_filest isinstancettupletlentisabst startswithtseptappendRtinfot call_commandR*(R2t site_packagestoldtitemRHt normalized((s/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/bdist_egg.pytdo_install_dataps ! !'cCs |jgS(N(R0(R2((s/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyt get_outputsscKsmx!tD]}|j||jqW|jd|j|jd|j|j||}|j||S(s8Invoke reinitialized command `cmdname` with keyword argsR/tdry_run(tINSTALL_DIRECTORY_ATTRSt setdefaultR+R/RYtreinitialize_commandt run_command(R2tcmdnametkwtdirnametcmd((s/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyRRs  c Cs|jdtjd|j|jd}|j}d|_|jjrj|j rj|jdn|j ddd}||_|j \}}g|_ g}xt |D]\}}tjj|\} } tjj|jt| d} |j j| tjd ||jsAttjj|| n|j| |jtjd ||tjj#|rtjd||jstj$|qnt%tjj| d |j&tjj'tjj|j(dr3tj)dn|j*rI|j+nt,|j-| d|j.d|jd|j/|j0st1|jd|jnt2|jdgjdt3|j-fdS(NR4sinstalling library code to %sRBt build_clibRFtwarn_diris.pyscreating stub loader for %st/sEGG-INFOtscriptssinstalling scripts to %stinstall_scriptst install_dirtno_episnative_libs.txts writing %stwts s removing %ss depends.txtsxWARNING: 'depends.txt' will not be used by setuptools 0.6! Use the install_requires/extras_require setup() args instead.tverboseRYtmodet dist_filesR%(4R]RRQR+R7RER*R>thas_c_librariesR/RRtget_ext_outputststubst enumerateRRRR:RRPRYR$R@treplaceROt byte_compileRIRWRRetcopy_metadata_toRRRtclosetisfiletunlinktwrite_safety_flagtzip_safetexistsR4twarnR1t zap_pyfilest make_zipfileR0Rjt gen_headerR-RtgetattrR (R2tinstcmdtold_rootRat all_outputst ext_outputst to_compileR'text_nameRtextR!t archive_rootR4t script_dirt native_libst libs_file((s/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/bdist_egg.pytrunsz                   $    cCstjdxut|jD]d\}}}xR|D]J}|jdr3tjj||}tjd|tj |q3q3WqWdS(Ns+Removing .py files from temporary directorys.pys Deleting %s( RRQtwalk_eggR+RRRR:tdebugRv(R2tbasetdirstfilestnameR((s/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyR{s  cCsEt|jdd}|dk r%|Stjdt|j|jS(NRxs4zip_safe flag not set; analyzing archive contents...(R~R>R*RRzt analyze_eggR+Ro(R2tsafe((s/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyRxs   c Cs!tj|jjpd}|jdijd}|dkrFdS|j sY|jrotd|fnt j d }|j }dj |j}|jd}t jj|j}d t}|jstt jj|jd |jt|jd} | j|| jnd S( Ntssetuptools.installationt eggsecutableRsGeggsecutable entry point (%r) cannot have 'extras' or refer to a moduleiRisH#!/bin/sh if [ `basename $0` = "%(basename)s" ] then exec python%(pyver)s -c "import sys, os; sys.path.insert(0, os.path.abspath('$0')); from %(pkg)s import %(base)s; sys.exit(%(full)s())" "$@" else echo $0 is not the correct name for this egg file. echo Please rename it back to %(basename)s and try again. exec false fi RYta(R t parse_mapR>t entry_pointstgetR*tattrstextrasRtsystversiont module_nameR:RRR@R0tlocalsRYRR`RRRt( R2tepmteptpyvertpkgtfullRR@theaderR#((s/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyR}s*      "  cCstjj|j}tjj|d}xb|jjjD]Q}|j|r:tjj||t |}t ||j ||q:q:WdS(s*Copy metadata (egg info) to the target_dirRN( RRtnormpathR4R:R8tfilelistRRNRLRt copy_file(R2t target_dirt norm_egg_infotprefixRttarget((s/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyRss c Csg}g}id|j6}xtj|jD]\}}}xH|D]@}tjj|djtkrE|j|||qEqEWx3|D]+}|||d|tjj||R?R7t extensionsRJR tget_ext_fullnameRtget_ext_filenameR@RNRy( R2RRtpathsRRRRt build_cmdRtfullname((s/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyRn*s(" " -$(s bdist-dir=R&s1temporary directory for creating the distributionN(sexclude-source-filesNs+remove all .py files from the generated egg(s dist-dir=R)s-directory to put final built distributions in(s skip-buildNs2skip rebuilding everything (for testing/debugging)(t__name__t __module__t descriptionRR*t user_optionstboolean_optionsR3RARWRXRRRR{RxR}RsRn(((s/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyR%8s4       Q  ' s.dll .so .dylib .pydccshtj|}t|\}}}d|kr@|jdn|||fVx|D] }|VqUWdS(s@Walk an unpacked egg's contents, skipping the metadata directorysEGG-INFON(RRtnexttremove(tegg_dirtwalkerRRRtbdf((s/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyRJs  c CsxBtjD]4\}}tjjtjj|d|r |Sq WtsRtSt}xt |D]\}}}xn|D]f}|j ds{|j drq{q{|j ds|j dr{t ||||o|}q{q{WqeW|S(NsEGG-INFOs.pys.pyws.pycs.pyo( t safety_flagstitemsRRRyR:tcan_scanRtTrueRRt scan_module( RRotflagtfnRRRRR((s/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyRUs$  &cCsxtjD]\}}tjj||}tjj|rq|dks^t||krtj|qq |dk r t||kr t |d}|j d|j q q WdS(NRis ( RRRRR:RyR*tboolRvRRRt(RRRRR#((s/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyRwgs szip-safes not-zip-safec Cstjj||}|d |kr)tS|t|djtjd}||r[dp^dtjj|d}tj dkrd}nd}t |d }|j |t j |} |jt} tjt| } x<d d gD].} | | krtjd || t} qqWd | krxZdddddddddddg D].} | | krWtjd|| t} qWqWWn| S(s;Check whether module possibly uses unsafe-for-zipfile stuffiiRRiiii trbt__file__t__path__s%s: module references %stinspectt getsourcet getabsfilet getsourcefiletgetfilegetsourcelinest findsourcet getcommentst getframeinfotgetinnerframestgetouterframeststackttraces"%s: module MAY be using inspect.%s(ii(RRR:RRLRqRORRt version_infoRtreadtmarshaltloadRttdicttfromkeyst iter_symbolsRRzR( RRRRoRRRtskipR#tcodeRtsymbolstbad((s/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyRzs6#*         ccsyx|jD] }|Vq WxY|jD]N}t|tjrC|Vq#t|tr#xt|D] }|Vq_Wq#q#WdS(sBYield names and strings used by `code` and its nested code objectsN(tco_namest co_constsRJRt string_typesRR(RRtconst((s/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyRs cCsDtjjd r&tjdkr&tStjdtjddS(Ntjavatclis1Unable to analyze compiled code on this platform.sfPlease ask the author to include a 'zip_safe' setting (either True or False) in the package's setup.py(RtplatformRNRRRz(((s/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyRs" RFRgRCt install_baseiRc sddl}ttjj|dtjd|fd}|r\|jn|j}s|j ||d|} x0tj D]\} } } || | | qW| j n3x0tj D]\} } } |d| | qW|S(sqCreate a zip file from all the files under 'base_dir'. The output zip file will be named 'base_dir' + ".zip". Uses either the "zipfile" Python module (if available) or the InfoZIP "zip" utility (if installed and found on the default search path). If neither tool is available, raises DistutilsExecError. Returns the name of the output zip file. iNRYs#creating '%s' and adding '%s' to itcsx|D]y}tjjtjj||}tjj|r|td}sm|j||ntjd|qqWdS(Nis adding '%s'( RRRR:RuRLRRR(tzR`tnamesRRR'(tbase_dirRY(s/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/bdist_egg.pytvisits !t compression( tzipfileRRRR`RRQt ZIP_DEFLATEDt ZIP_STOREDtZipFileRRtR*( t zip_filenameRRjRYtcompressRkRRRRR`RR((RRYs/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyR|s   (2t__doc__tdistutils.errorsRtdistutils.dir_utilRRt distutilsRttypesRRRRRtsetuptools.externRt pkg_resourcesRRRR tsetuptools.extensionR t setuptoolsR t sysconfigR R Rt ImportErrortdistutils.sysconfigRRR$R%RRtsplitRRRRwRRRRRRRZR|(((s/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/bdist_egg.pytsH             "