b-Qc'@sdZddkZddkZddkZddkZddkZddkZddkZddkZddk Z ddk Z ddk l Z ddk Z ddk lZlZddklZddklZlZy,ddklZlZdZd ZWn;ej o/dd klZlZd Zd ZnXdd klZddklZl Z ddk!l"Z"l#Z#l$Z$l%Z%ddk&l'Z'l(Z(ddk)l*Z*ddk+l,Z,ddk-l.Z.ddk-l/Z/ddk)l0Z0l1Z1ddk2l3Z3l4Z4l5Z5l6Z6l7Z7l8Z8ddk l9Z9l:Z:l;Z;l<Z<l=Z=l>Z>l?Z?l@Z@lAZAlBZBlCZClDZDlEZElFZFlGZGdeiHjoeiHdZIneiJiKeiLZIddddddgZMddkNZNeiOdj oeNiPZQddkRZRd ZSd!ZTeiUd"fjod#ZVd$ZWnd%ZVd&ZWdefd'YZXd(ZYd)ZZd*Z[d+Z\d,Z]de?fd-YZ^eIe_d.Z`d/Zad0Zbd1Zcd2d3Zdd4Zed5Zfd6Zgydd7klhZiWnej od8ZinXd9Zhd:ZjeIe_d;Zkd<Zld=Zme_ead>Znd?Zod@ZpeqdAZrdS(BsEasy Install ------------ A tool for doing automatic download/extract/build of distutils-based Python packages. For detailed documentation, see the accompanying EasyInstall.txt file, or visit the `EasyInstall home page`__. __ https://pythonhosted.org/setuptools/easy_install.html iN(tglob(tCommandt_dont_write_bytecode(t run_setup(tlogtdir_util(tget_config_varstget_pathcCs tdS(Ntplatlib(R(((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyt _get_platlibscCs tdS(Ntpurelib(R(((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyt _get_purelib!s(Rtget_python_libcCs ttS(N(R tTrue(((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyR %scCs ttS(N(R tFalse(((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyR 's(t get_platform(t convert_patht subst_vars(tDistutilsArgErrortDistutilsOptionErrortDistutilsErrortDistutilsPlatformError(tINSTALL_SCHEMESt SCHEME_KEYS(tsetopt(tunpack_archive(t PackageIndex(t URL_SCHEME(t bdist_eggtegg_info(t iteritemstmaxsizetxranget basestringtunicodetreraise(t yield_linestnormalize_pathtresource_stringtensure_directorytget_distributiontfind_distributionst Environmentt Requirementt Distributiont PathMetadatat EggMetadatat WorkingSettDistributionNotFoundtVersionConflictt DEVELOP_DISTt__VENV_LAUNCHER__tsamefilet easy_installtPthDistributionstextract_wininst_cfgtmaintget_exe_prefixess2.6cCstiddjS(NtPi(tstructtcalcsize(((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pytis_64bitKscCsttido:tii|o'tii|otii||Stiitii|tiitii|jS(NR4(thasattrtostpathtexistsR4tnormpathtnormcase(tp1tp2((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyR4Ns &icCs|S(N((ts((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyt _to_asciiYscCs0yt|dtSWntj otSXdS(Ntascii(R"R t UnicodeErrorR(RF((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pytisascii[s  cCs |idS(NRH(tencode(RF((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyRGbscCs0y|idtSWntj otSXdS(NRH(RKR RIR(RF((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyRJds  cBseZdZdZeZdzd{d|d}d~ddddddddddddddddddgZdddd ddd"d1d4d:d=g Ze o.ei dAdydBe i fei dAnhdd+6Z eZdCZdDZdEZdFZdGZdHZdIZdJZdKZdLZdMZdNZdOZdPZdQZdRZe dSZ!e dTZ"dUZ#edVZ$dWZ%dXZ&dYZ'dydZZ(d[dd\Z)d]Z*d^Z+d_Z,d`Z-daZ.dbZ/dcZ0dddeZ1dfZ2dgZ3dhZ4diZ5djZ6dkZ7dlZ8dmZ9dnZ:doZ;dpZ<e=dqe=drdsdtduZ>e=drdvdtdwZ?dxZ@RS(s'Manage a download/build/install processs Find/get/install Python packagessprefix=sinstallation prefixszip-oktzsinstall package as a zipfiles multi-versiontms%make apps have to require() a versiontupgradetUs1force upgrade (searches PyPI for latest versions)s install-dir=tdsinstall package to DIRs script-dir=RFsinstall scripts to DIRsexclude-scriptstxsDon't install scriptss always-copytas'Copy all needed packages to install dirs index-url=tis base URL of Python Package Indexs find-links=tfs(additional URL(s) to search for packagessdelete-conflictingtDs no longer needed; don't use thissignore-conflicts-at-my-risksbuild-directory=tbs/download/extract/build in DIR; keep the resultss optimize=tOslalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0]srecord=s3filename in which to record list of installed filess always-unziptZs*don't install as a zipfile, no matter whats site-dirs=tSs)list of directories where .pth files workteditabletes+Install specified packages in editable formsno-depstNsdon't install dependenciess allow-hosts=tHs$pattern(s) that hostnames must matchslocal-snapshots-oktls(allow building eggs from local checkoutstversions"print version information and exits no-find-linkss9Don't load find-links defined in packages being installedtusers!install in user site-package '%s'cCsto+tiit}|iti|_n d|_d|_ |_ d|_ |_ |_d|_d|_d|_d|_d|_|_d|_|_|_d|_|_|_d|_|_|_d|_d|_d|_ d|_!d|_"d|_#d|_$d|_%d|_&toti'|_(ti|_)nd|_(d|_)d|_*d|_+d|_,|_-d|_.d|_/d|_0h|_1t2|_3d|_4|i5i6|_6|i5i7||i5i8ddS(NiR5(9t HAS_USER_SITER?R@tabspatht__file__t startswithtsitet USER_SITER`tNonetzip_oktlocal_snapshots_okt install_dirt script_dirtexclude_scriptst index_urlt find_linkstbuild_directorytargstoptimizetrecordRNt always_copyt multi_versionRZtno_depst allow_hoststroottprefixt no_reportR_tinstall_purelibtinstall_platlibtinstall_headerst install_libtinstall_scriptst install_datat install_basetinstall_platbaset USER_BASEtinstall_userbasetinstall_usersitet no_find_linkst package_indextpth_filetalways_copy_fromtdelete_conflictingtignore_conflicts_at_my_riskt site_dirstinstalled_projectsRtsitepy_installedt_dry_runt distributiontverboset_set_command_optionstget_option_dict(tselftwhereami((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pytinitialize_optionssP                          cCsx|D]}tii|ptii|odtid||ipFtii|o"tii| ot|qti |qqqWdS(Ns Deleting %s( R?R@RAtislinkRtinfotdry_runtisdirtrmtreetunlink(Rtblockerstfilename((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pytdelete_blockerss& 'c Cs|io dtdiGHtintiid}tdd\}}h |iid6|iid6|ii d6|d 6|dd !d 6|d|d d 6|d6|d6|d6|d6t tddd6|_ t o$|i |i d<|i|i d|i9n|idd/t:|i?t@pgyAt@|i?|_?d|i?jo d jnp tAnWq}tAj ot-d(q}Xn|iBo|iCot-d)n|i/o|iD otEd*n|iFptEd+ng|_GdS(0Ns setuptools %st setuptoolsiRxt exec_prefixt dist_namet dist_versiont dist_fullnamet py_versionitpy_version_shortitpy_version_nodott sys_prefixtsys_exec_prefixtabiflagsttuserbasetusersites$User base directory is not specifiedtposixt unix_usert_userRjRkRoRR}R~tinstallRrt,s"%s (in --site-dirs) does not exists$ (in --site-dirs) is not on sys.pathshttps://pypi.python.org/simplet*t search_paththostsRqs--optimize must be 0, 1, or 2sVCan't use both --delete-conflicting and --ignore-conflicts-at-my-risk at the same times9Must specify a build directory (-b) when using --editables:No urls, filenames, or requirements specified (see --help)(s install_dirs install_dir(s install_dirs script_dir(srecordsrecord(soptimizesoptimize(HR_R(tsystexittsplitRRtget_namet get_versiont get_fullnametgetattrt config_varsRaRRR`tcreate_home_pathRgRRRR?tnamet select_schemetexpand_basedirst expand_dirst_expandRkRjRRtset_undefined_optionsRzR~tmapR%R@t get_site_dirst all_site_dirsRt expandusertstripRRtwarnRtappendRZtcheck_site_dirRmt shadow_pathtinsertRvRt create_indexR*t local_indexRnt isinstanceR!Ritscan_egg_linkstadd_find_linksRqtintt ValueErrorRRRoRRptoutputs( RRRxRRBt_[1]RFRRPt path_itemt_[2]R((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pytfinalize_optionss          ?  7 "   !    cCsx|D]~}t||}|dj o\tidjptidjotii|}nt||i}t|||qqWdS(NRtnt( RRgR?RR@RRRtsetattr(Rtattrstattrtval((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyt _expand_attrscs  cCs|idddgdS(sNCalls `os.path.expanduser` on install_base, install_platbase and root.RRRwN(R(R((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyRlscCs#|iddddddgdS(s+Calls `os.path.expanduser` on install dirs.RzR{R}R|R~RN(R(R((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyRqs c Cs|i|iijoti|inzx%|iD]}|i||i q7W|io|i}|i oBt |i }x0t t |D]}|||||}d|}t||djot||||qqWdS(s=Sets the install directories by applying the install schemes.tinstall_N(RRRRgR(RRtschemeRtattrname((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyRs   cGsJ|i||ii||ii||i|||i|it| d } | id i t| d | iqq,q,Wd S(s;Extract a bdist_wininst to the directories an egg would usecsV|i}xD]\}}|i|o||t|}|id}tii|}|i}|idp|idoFti |d|d=%(version)s") # this version or higher s Note also that the installation directory must be on sys.path at runtime for this to work. (e.g. by being the application's script directory, by being on PYTHONPATH, or by being added to sys.path by your code.) R( RtRyRjRR%RR@R+R/R_RY( RtreqRtwhatRtegglocRR_R?((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyR:"s    cCs&tii|}ti}dtS(Ns" Extracted editable version of %(spec)s to %(dirname)s If it uses setuptools in its setup script, you can activate it in "development" mode by going to that directory and running:: %(python)s setup.py develop See the setuptools documentation for the "develop" command for more info. (R?R@RRR RY(RRRiRtpython((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyRg>s cCs,tiidttiidtt|}|idjo)d|id}|idd|n%|idjo|iddn|io|idd nt i d |t |dd i |yt ||Wn=tj o1tid}td |idfnXdS( Nsdistutils.command.bdist_eggsdistutils.command.egg_infoiRiiR}s-qs-ns Running %s %st sSetup script exited with %s(Rtmodulest setdefaultRRtlistRRRRRRRRt SystemExitRRRp(RRiRIRpR((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyRKs"  $c Csddg}tidddtii|}z|itii||i||i|||t|g}g}x?|D]7}x.||D]"}|i|i |i |qWqW| o|i ot i d|n|SWdt|t i|iXdS(NRs --dist-dirRxs egg-dist-tmp-tdirs+No eggs found in %s (setup script problem?)(R"R#R?R@Rt_set_fetcher_optionsRRR*RcR+RRRRRR( RRiRIRptdist_dirtall_eggsteggsRR((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyRh`s(    $   c Cs|iidi}d }h}xH|iD]:\}}||joq1n|d||idd egg path translations for a given .exe filesPURELIB/RsPLATLIB/pywin32_system32sPLATLIB/sSCRIPTS/sEGG-INFO/scripts/sDATA/lib/site-packagesRiisPKG-INFOis .egg-infois EGG-INFO/s.pths -nspkg.pthtPURELIBtPLATLIBs\Rs%s/%s/N(sPURELIB/R(sPLATLIB/pywin32_system32R(sPLATLIB/R(sSCRIPTS/sEGG-INFO/scripts/(sDATA/lib/site-packagesR(R R(i(RtZipFiletinfolistRRRR.RRtupperRRRROR$RRPRdRRR tsorttreverse( t exe_filenameRRLRRRRKtpthRRQty((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyR9s@   $# $ 5 3 cCs>yti|SWn&tj otd|fnXdS(Ns1Not a URL, existing file, or requirement spec: %r(R+tparseRR(R((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyR' s cBsMeZdZeZddZdZdZdZdZ dZ RS(s)A .pth file with Distribution paths in itcCs||_ttt||_ttii|i|_|i t i |gddx6t |iD]%}tt|it|tqoWdS(N(RRRR%RR?R@Rtbasedirt_loadR*t__init__RgR$RR9R)R (RRRR@((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyR-s  cCsg|_t}ti|i}tii|iot |id}x|D]}|i do t }qPn|i }|ii ||i p|ii doqPnttii|i|}|idti i|io'tid|iti |int|_dS(s$Write changed .pth file back to diskNs s Saving %ssimport sys; sys.__plen = len(sys.path) %s import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new) RsDeleting empty %s(RRRRRRRRR?R@RRRRRRAR(RtdataRT((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyRTs   cCsp|i|ijoI|i|ijp|itijo |ii|it|_nti ||dS(s"Add `dist` to the distribution mapN( R+RRR?tgetcwdRR RR*R9(RR((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyR9ps  cCsKx4|i|ijo |ii|it|_qWti||dS(s'Remove `dist` from the distribution mapN(R+RRR RR*(RR((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyRzs cCstiit|\}}t|i}|g}tidjodpti}xyt||joa||ijo(|iti |i |i |Stii|\}}|i|qYW|SdS(NR( R?R@RR%RRtaltsepRRtcurdirRR(RR@tnpathtlasttbaselenRR((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyRs   (( RRRRRRRRR9RR(((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyR6(s    cCs8ddkl}t|itpti|ii}n|did}|i |}d}|o/|i dpd}|od|}qn|o d}n t |}d t }t |pC|o2|iid od |id}qqd }nt||}d t }|S( s;Create a #! line, getting options (if any) from script_texti(t first_line_res iRiRs python.exes#!%(executable)s%(options)s R}s -x(tdistutils.command.build_scriptsR'RtpatternRVtretcompileROt splitlinestmatchtgroupt nt_quote_argRYRJRRdtfix_jython_executable(RZR twininstR'tfirstR-toptionsthdr((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyRXs,      cCs}|tijo+tidjot|ti||Sti\}}}t||d|dd||ffdS(NRiis %s %s( R?RRR_RtS_IWRITERRR#(tfunctargtexctettevR|((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyt auto_chmods   cCs1ddkl}t||t|tidS(s?Ensure that the importer caches dont have stale info for `path`i(t_zip_directory_cacheN(RlR<t_uncacheRtpath_importer_cache(R@tzdc((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyRts cCsX||jo ||=n=t|}x-|D]%}t||jo ||=dSq+WdS(N(R%(R@tcachetp((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyR=s   scCs9yt||dWnttfj otSXtSdS(s%Is this string a valid Python script?texecN(R+t SyntaxErrort TypeErrorRR (ttextR((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyt is_pythons cCsPy)t|}|id}|iWnttfj o|SX|djS(sCDetermine if the specified executable is a .sh (contains a #! line)is#!(RRRRR(R tfptmagic((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pytis_shs cCs g}t}d}d|jp d|j}|o|idnx|D]}|djo|d7}qJ|djo#|id|ddd}qJ|o|id|d}n|i|qJW|o|id|n|o"|id||idnd i|S( s@Quote a command line argument according to Windows parsing rulesiRs t"s\iis\"R(RRR(R7tresultt needquotetnbtc((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyR/s.    cCsi|idp|idotSt||otS|idod|idijStS(sMIs this text, as a whole, a Python script? (as opposed to shell/bat/etc. s.pys.pyws#!Ri(R.R RFRdR,R R(RZR((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyRWs (R_cGsdS(N((Rp((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyt_chmodscCsatid||yt||Wn6tij o'tid}tid|nXdS(Nschanging mode of %s to %oischmod failed: %s(RRROR?terrorRR(R@R`R[((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyR_s cCsutiido^t|oQddk}|iiiddjo|S|oti dqqd|Sn|S(Ntjavaisos.nametLinuxsWARNING: Unable to adapt shebang line for Jython, the following script is NOT executable see http://bugs.jython.org/issue1112 for more information.s/usr/bin/env %s( RRzRdRIRQtlangtSystemt getPropertyRR(R R3RQ((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyR0s   c cst|i}td||}xdD]}x|i|iD]m\}}dt}tidjp|o.|djo.d} d} dg} ti d d |} n1d } d } d ddg} ti dd|} t i i | dd!i dptidjo | } n|} || | |dg}| D]}|||qA~fV|dt| dfVtp"|d}|t|dfVqqG|||fVqGWq+WdS(sEYield write_script() argument tuples for a distribution's entrypointsRtconsole_scriptst gui_scriptss# EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r __requires__ = %(spec)r import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.exit( load_entry_point(%(spec)r, %(group)r, %(name)r)() ) twin32tguis -script.pyws.pyws(?i)python.exes pythonw.exetclis -script.pys.pys.pycs.pyos(?i)pythonw.exes python.exeiiRJR]s.exeRVs .exe.manifestN(sconsole_scriptsRW(RVR=RXt get_entry_mapRRYRRzR*tsubR?R@RARtget_win_launcherR=tload_launcher_manifest(RR R1RtheaderR.RtepRZt launcher_typeRRt new_headerR4RRQtm_name((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyRM0s8    3 8  cCsxd|}tiidjo|idd}nto|idd}n|idd}td|S(s Load the Windows launcher (executable) suitable for launching a script. `type` should be either 'cli' or 'gui' Returns the executable as a byte string. s%s.exetarmt.s-arm.s-64.s-32.R(RztmachineR RPR=R&(ttypet launcher_fn((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyR]ds  cCsJtitd}tiddjo |tS|idtSdS(Nslauncher manifest.xmliisutf-8(t pkg_resourcesR&RRRtvarsRO(Rtmanifest((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyR^us c Cs|o d}n|djo d}ng}yti|}Wn/tij o |ti|tinXx|D]}tii||}yti|i }Wntij o d}nXt i |ot |||qyti |Wqtij o |ti |tiqXqWyti|Wn/tij o |ti|tinXdS(sRecursively delete a directory tree. This code is taken from the Python 2.4 version of 'shutil', because the 2.3 version doesn't really work right. cWsdS(N((Rp((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pytonerrorscWsdS(N((Rp((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyRlsiN(RgR?RERPRRR@Rtlstattst_modeRtS_ISDIRRRtrmdir(R@t ignore_errorsRlRRtfullnameR`((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyR|s4    "cCs tid}ti||S(Ni(R?tumask(ttmp((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyR^s cCsMddk}tii|id}|tids((RRpR(R,R(RRpRsE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyRs(RRt common_usageR((R,R(sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyRsics7ddddgdtidpddS(t script_argss-qR5s-vRit distclass(RRv((RyRRRv(sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyRs(RRytsetuptools.distR,tdistutils.coreRgRRv(RvR(( R|RRyRvRR{R,RRsE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyR8s  (sRRR?RlRFR"RR*RRRzRRiRRRtsetuptools.sandboxRRRRt sysconfigRRR R Rtdistutils.sysconfigR RRRRtdistutils.errorsRRRRtdistutils.command.installRRtsetuptools.commandRtsetuptools.archive_utilRtsetuptools.package_indexRRRRRRRR R!R"R#R$R%R&R'R(R)R*R+R,R-R.R/R0R1R2Rtsys_executableR@RBR t__all__ReR_tENABLE_USER_SITERaR;R=R4RRGRJR5RRR7R9R'R6RRXR;RtR=RFRIR/RWR_ROR0RMR]R^RR^RxRgR8(((sE/usr/lib/python2.6/vendor-packages/setuptools/command/easy_install.pyt s              ".d           - ) 6 % h   )   4  #