ó . ^c@sÄddlZddlZddlZddlZddlmZddlmZddlZddl m Z ddl m Z ddl mZddlmZd „Zd „Zd „Zd „ZdS( iÿÿÿÿN(tlog(tDistutilsError(t easy_install(tsix(tWheeli(tTemporaryDirectorycCs;t|tjƒr|jƒSt|ttfƒs7t‚|S(s8Ensure find-links option end-up being a list of strings.(t isinstanceRt string_typestsplitttupletlisttAssertionError(t find_links((s8/usr/lib/python2.7/dist-packages/setuptools/installer.pyt_fixup_find_linkss cCs|jidgd6ƒ}|jdƒ}|jƒ|jd„|jdƒjƒDƒƒ|jr¥|j}d|kr’t|ddƒ|}nd|f|d!s R itsetuptargstxt install_dirtexclude_scriptst always_copytbuild_directoryteditabletupgradet multi_versiont no_reporttuserN( t __class__tget_option_dicttcleartupdatetitemstdependency_linksR tget_egg_cache_dirRtTruetFalsetNonetensure_finalized(tdisttreqttmp_disttoptstlinksRtcmd((s8/usr/lib/python2.7/dist-packages/setuptools/installer.pyt_legacy_fetch_build_eggs&      c Cs[ytjdƒWn1tjk rD|jdtjƒt||ƒSXytjdƒWn'tjk r|jdtjƒnXt|ƒ}|jdƒ}d|kr¶t dƒ‚ndt j ksÔd t j krÝt }nt }d t j krûd}n#d |kr|d d }nd}d |krBt|d d ƒ}ng}|jrd|j|jƒnt jj|jƒƒ}tjƒ}x6tj|ƒD]%}||kr˜|j|ƒr˜|Sq˜Wtƒ‹} tjdddddd| g} |r| jdƒn|dk r&| jd|fƒn|dk rYx$|D]} | jd| fƒq9Wn|jru| j|jƒn| jt|ƒƒytj| ƒWn(tj k rÃ} t t| ƒƒ‚nXt!t"j"t jj#| dƒƒdƒ} t jj#|| j$ƒƒ}| j%|ƒtj&|t jj#|dƒƒ}tj'j(|d|ƒ}|SWdQXdS(sLFetch an egg needed for building. Use pip/wheel to fetch/build a wheel.tpips­WARNING: The pip package is not available, falling back to EasyInstall for handling setup_requires/test_requires; this is deprecated and will be removed in a future version.twheels,WARNING: The wheel package is not available.RRsQthe `allow-hosts` option is not supported when using pip to install requirements.t PIP_QUIETt PIP_VERBOSEt PIP_INDEX_URLRiR s-ms--disable-pip-version-checks --no-depss-ws--quiets --index-urls --find-linkss*.whlisEGG-INFOtmetadataN()t pkg_resourcestget_distributiontDistributionNotFoundtannounceRtWARNR3t strip_markerR#RtostenvironR*R)R+R R'textendtpathtrealpathR(t Environmenttfind_distributionstcan_addRtsyst executabletappendturltstrt subprocesst check_calltCalledProcessErrorRtglobtjointegg_nametinstall_as_eggt PathMetadatat Distributiont from_filename(R-R.R0tquietRR teggs_dirt environmenttegg_distttmpdirR2tlinkteR5t dist_locationt dist_metadata((s8/usr/lib/python2.7/dist-packages/setuptools/installer.pytfetch_build_egg8sx                (  cCs%tjjt|ƒƒ}d|_|S(s« Return a new requirement without the environment marker to avoid calling pip with something like `babel; extra == "i18n"`, which would always be ignored. N(R:t RequirementtparseRLR+tmarker(R.((s8/usr/lib/python2.7/dist-packages/setuptools/installer.pyR?s (RPR@RMRHt distutilsRtdistutils.errorsRR:tsetuptools.command.easy_installRtsetuptools.externRtsetuptools.wheelRt py31compatRR R3R`R?(((s8/usr/lib/python2.7/dist-packages/setuptools/installer.pyts       U