9Tc@@s>dZddklZddkZddkZddkZddkZddkZddkZddk Z ddk Z ddk Z ddk Z ddk lZddklZddklZddklZlZddklZdd klZdd klZlZlZlZlZdd k l!Z!dd k"l#Z#dd k$l%Z%ddk&l'Z'dZ(ddfZ)ei*e+Z,ddd>dZ-dZ.dZ/e i0de i1Z2dZ3dZ4e5e6e6e7e6e5dZ8dZ9e9dZ:dZ;dZ<de=fdYZ>d e=fd!YZ?dS("sH Support for installing and building the "wheel" binary package format. i(tabsolute_importN(turlsafe_b64encode(tParser(tStringIO(tInvalidWheelFilenametUnsupportedWheel(tdistutils_scheme(t pep425tags(tcall_subprocesstnormalize_pathtmake_path_relativetcaptured_stdouttremove_tracebacks(t indent_log(t ScriptMaker(t pkg_resources(t configparsers.whlitsha256ic C@sti|}d}t|dii}zW|~}|i|}x8|o0|t|7}|i||i|}qMWWdQXdt|i i di d}||fS(s6Return (hash, length) for path using hashlib.new(algo)itrbNssha256=tlatin1t=( thashlibtnewtopent__exit__t __enter__treadtlentupdateRtdigesttdecodetrstrip( tpathtalgot blocksizethtlengtht_[1]tftblockR((s//usr/lib/python2.6/vendor-packages/pip/wheel.pytrehash)s& cC@sKtiddjoh}d}nhdd6}d}t||||S(Niitbttnewline(tsyst version_infoR(tnametmodetnltbin((s//usr/lib/python2.6/vendor-packages/pip/wheel.pyt open_for_csv9s   c C@stii|ot|dii}zl|~}|i}|idptSt i i t i }d|ti i d}|i}WdQXt|dii}z'|~}|i||i|WdQXtSdS(sLReplace #!python with #!/path/to/python Return True if file was changed.Rs#!pythons#!tasciiNtwb(tosR tisfileRRRtreadlinet startswithtFalseR,t executabletencodetgetfilesystemencodingtlinesepRtwritetTrue(R R%tscriptt firstlinetexenametrestt_[2]((s//usr/lib/python2.6/vendor-packages/pip/wheel.pyt fix_scriptCs& & sZ^(?P(?P.+?)(-(?P\d.+?))?) \.dist-info$cC@s|idd}xti|D]}ti|}|o|id|jotttii||di i }zB|~}x2|D]*}|i i }|djot SqWWdQXq"q"WtS(sP Return True if the extracted wheel in wheeldir should go into purelib. t-t_R.tWHEELsroot-is-purelib: trueN(treplaceR5tlistdirt dist_info_retmatchtgroupRR tjoinRRtlowerRR?R9(R.twheeldirt name_foldedtitemRLR%twheeltline((s//usr/lib/python2.6/vendor-packages/pip/wheel.pytroot_is_purelibXs5 cC@stii|p hhfSt|ii}zT|~}t}x.|D]&}|i|i|idqQW|i dWdQXt i }|i |h}h}|i dot|id}n|i dot|id}n||fS(Ns itconsole_scriptst gui_scripts(R5R texistsRRRRR>tstriptseekRtRawConfigParsertreadfpt has_sectiontdicttitems(tfilenameR%tfptdataRTtcptconsoletgui((s//usr/lib/python2.6/vendor-packages/pip/wheel.pytget_entrypointshs$ #   c -)@s|p(t|d|d|d|d|}nt|o|dn |dgg itiitii} htg} |o\tii } z&| ~ } t i | dt dt Wd QXt it| ind tfd  d d  fd } | | t ptd tiidd}t|\ fd}x D]}d }d }xtitii|D]g}d }|djot}|}ntii||} ||}| | |td|d|qWqWtd |dt _td*_t _fd}|_d_idd }|odtijo$d|}| i i!|ntii"dddjo1dt#i$d |f}| i i!|ndt#i$d |f}| i i!|g}D]$}t%i&d|o ||qoqo~}x|D] }|=qWnidd }|odtijo$d |}| i i!|nd!t#i$d |f}| i i!|g}D]$}t%i&d"|o ||q=q=~}x|D] }|=qqWnt'djo?| i i(g}i)D]}|d#|q~nt' djoI| i i(g} i)D]}| d#|q~ ht d$6ntiidd%}!tiidd&}"t*|!d'ii }#z*|#~#}$t*|"d(ii }%z|%~%}&t+i,|$}'t+i-|&}(xl|'D]d})i|)d|)d|)d<|)djo"t.|)d\|)d<|)d) 1.1); and warn when installing a version only minor version ahead (e.g 1.2 > 1.1). version: a 2-tuple representing a Wheel-Version (Major, Minor) name: name of wheel or package to raise exception about :raises UnsupportedWheel: when an incompatible Wheel-Version is given s(%s is in an unsupported or invalid wheelisB%s's Wheel-Version (%s) is not compatible with this version of pipRs*Installing from a newer Wheel-Version (%s)N(RtVERSION_COMPATIBLERNRtstrRtwarning(RR.((s//usr/lib/python2.6/vendor-packages/pip/wheel.pytcheck_compatibilitys & tWheelcB@sDeZdZeideiZdZddZ ddZ RS(s A wheel files^(?P(?P.+?)-(?P\d.*?)) ((-(?P\d.*?))?-(?P.+?)-(?P.+?)-(?P.+?) \.whl|\.dist-info)$c@sii|}|ptd|n|_|ididd_|ididd_|idid_ |idid_ |id id_ t fd i D_ d S( sX :raises InvalidWheelFilename: when the filename is invalid for a wheel s!%s is not a valid wheel filename.R.RGRFtvertpyverRtabitplatc3@sJxC|]<}x3iD](}xiD]}|||fVq&WqWqWdS(N(tabistplats(t.0txtytz(tself(s//usr/lib/python2.6/vendor-packages/pip/wheel.pys s N(t wheel_file_reRLRR`RMRIR.RRt pyversionsR R Rt file_tags(RR`t wheel_info((Rs//usr/lib/python2.6/vendor-packages/pip/wheel.pyt__init__s cC@sn|djo ti}ng}|iD]'}||jo||i|q(q(~}|o t|SdS(s" Return the lowest index that one of the wheel's file_tag combinations achieves in the supported_tags list e.g. if there are 8 supported tags, and one of the file tags is first in the list, then return 0. Returns None is the wheel is not supported. N(RRtsupported_tagsRtindextmin(RttagsR%tctindexes((s//usr/lib/python2.6/vendor-packages/pip/wheel.pytsupport_index_min s  >cC@s6|djo ti}ntt|i|iS(s'Is this wheel supported on this system?N(RRRtboolRt intersectionR(RR((s//usr/lib/python2.6/vendor-packages/pip/wheel.pyt supporteds  N( t__name__t __module__t__doc__RtcompiletVERBOSERRRRR!(((s//usr/lib/python2.6/vendor-packages/pip/wheel.pyRs   t WheelBuildercB@s/eZdZdddZdZdZRS(s#Build wheels from a RequirementSet.cC@sE||_||_t||_|pg|_|pg|_dS(N(trequirement_settfinderR t wheel_dirt build_optionstglobal_options(RR(R)R*R+R,((s//usr/lib/python2.6/vendor-packages/pip/wheel.pyRs   c C@stidd|igt|i}tid|itid|i|dd|ig|i }y!t |d|i dt t SWntid |it SXd S( sBuild one wheel.s-csjimport setuptools;__file__=%r;exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))s#Running setup.py bdist_wheel for %ssDestination directory: %st bdist_wheels-dtcwdt show_stdoutsFailed building wheel for %sN(R,R:tsetup_pytlistR,RRR.R*R+RRR9R?terror(RRt base_argst wheel_args((s//usr/lib/python2.6/vendor-packages/pip/wheel.pyt _build_one's  c C@s|ii|i|iii}g}x]|D]U}|iotid|iq2|i otid|iq2|i |q2W|pt Stiddi g}|D]}||iq~t iizPgg}}x<|D]4}|i|o|i |q|i |qWWdQX|o;tiddi g}|D]}||iqV~n|o;tiddi g}|D]}||iq~nt|d jS( s Build wheels.s(Skipping %s, due to already being wheel.s"Skipping %s, due to being editables*Building wheels for collected packages: %ss, NsSuccessfully built %st sFailed to build %si(R(t prepare_filesR)t requirementstvaluestis_wheelRRR.teditableRR?RNR RRR5R( RtreqsettbuildsetRR%t build_successt build_failureRDR((s//usr/lib/python2.6/vendor-packages/pip/wheel.pytbuild<sB  . 22N(R"R#R$RRR5R@(((s//usr/lib/python2.6/vendor-packages/pip/wheel.pyR's   (@R$t __future__RRRRRtloggingR5RRRR,tbase64Rt email.parserRtpip._vendor.sixRtpip.exceptionsRRt pip.locationsRRRRRR R R R tpip.utils.loggingR tpip._vendor.distlib.scriptsRt pip._vendorRtpip._vendor.six.movesRt wheel_extRt getLoggerR"RR(R2RER%R&RKRURfR9RR?RRRRRtobjectRR'(((s//usr/lib/python2.6/vendor-packages/pip/wheel.pytsR          (        7