?????????????? ?????????????? ?????????????? ?????????????? PK}>]9\Dú*__pycache__/__about__.cpython-36.opt-1.pycnu„[µü¤3 ‡Ì]Ðã@sPddlmZmZmZdddddddd gZd Zd Zd Zd ZdZ dZ dZ de Z dS)é)Úabsolute_importÚdivisionÚprint_functionÚ __title__Ú __summary__Ú__uri__Ú __version__Ú __author__Ú __email__Ú __license__Ú __copyright__Z packagingz"Core utilities for Python packagesz!https://github.com/pypa/packagingz16.8z)Donald Stufft and individual contributorszdonald@stufft.ioz"BSD or Apache License, Version 2.0zCopyright 2014-2016 %sN) Z __future__rrrÚ__all__rrrrr r r r ©rrú/usr/lib/python3.6/__about__.pyÚs  PK}>]9\Dú$__pycache__/__about__.cpython-36.pycnu„[µü¤3 ‡Ì]Ðã@sPddlmZmZmZdddddddd gZd Zd Zd Zd ZdZ dZ dZ de Z dS)é)Úabsolute_importÚdivisionÚprint_functionÚ __title__Ú __summary__Ú__uri__Ú __version__Ú __author__Ú __email__Ú __license__Ú __copyright__Z packagingz"Core utilities for Python packagesz!https://github.com/pypa/packagingz16.8z)Donald Stufft and individual contributorszdonald@stufft.ioz"BSD or Apache License, Version 2.0zCopyright 2014-2016 %sN) Z __future__rrrÚ__all__rrrrr r r r ©rrú/usr/lib/python3.6/__about__.pyÚs  PK}>]¨£ˆgÝÝ)__pycache__/__init__.cpython-36.opt-1.pycnu„[µü¤3 ‡Ì]ã@sTddlmZmZmZddlmZmZmZmZm Z m Z m Z m Z dddddd d d gZ d S) é)Úabsolute_importÚdivisionÚprint_functioné)Ú __author__Ú __copyright__Ú __email__Ú __license__Ú __summary__Ú __title__Ú__uri__Ú __version__r r r r rrr rN)Z __future__rrrÚ __about__rrrr r r r r Ú__all__©rrú/usr/lib/python3.6/__init__.pyÚs( PK}>]¨£ˆgÝÝ#__pycache__/__init__.cpython-36.pycnu„[µü¤3 ‡Ì]ã@sTddlmZmZmZddlmZmZmZmZm Z m Z m Z m Z dddddd d d gZ d S) é)Úabsolute_importÚdivisionÚprint_functioné)Ú __author__Ú __copyright__Ú __email__Ú __license__Ú __summary__Ú __title__Ú__uri__Ú __version__r r r r rrr rN)Z __future__rrrÚ __about__rrrr r r r r Ú__all__©rrú/usr/lib/python3.6/__init__.pyÚs( PK}>]_€•œœ(__pycache__/_compat.cpython-36.opt-1.pycnu„[µü¤3 ‡Ì]\ã@sVddlmZmZmZddlZejddkZejddkZerDefZ ne fZ dd„Z dS)é)Úabsolute_importÚdivisionÚprint_functionNéécs&G‡‡fdd„dˆƒ}tj|dfiƒS)z/ Create a base class with a metaclass. cseZdZ‡‡fdd„ZdS)z!with_metaclass..metaclasscs ˆ|ˆ|ƒS)N©)ÚclsÚnameZ this_basesÚd)ÚbasesÚmetarú/usr/lib/python3.6/_compat.pyÚ__new__sz)with_metaclass..metaclass.__new__N)Ú__name__Ú __module__Ú __qualname__rr)r r rr Ú metaclasssrZtemporary_class)Útyper)r r rr)r r r Úwith_metaclasssr) Z __future__rrrÚsysÚ version_infoZPY2ZPY3ÚstrZ string_typesZ basestringrrrrr ÚsPK}>]_€•œœ"__pycache__/_compat.cpython-36.pycnu„[µü¤3 ‡Ì]\ã@sVddlmZmZmZddlZejddkZejddkZerDefZ ne fZ dd„Z dS)é)Úabsolute_importÚdivisionÚprint_functionNéécs&G‡‡fdd„dˆƒ}tj|dfiƒS)z/ Create a base class with a metaclass. cseZdZ‡‡fdd„ZdS)z!with_metaclass..metaclasscs ˆ|ˆ|ƒS)N©)ÚclsÚnameZ this_basesÚd)ÚbasesÚmetarú/usr/lib/python3.6/_compat.pyÚ__new__sz)with_metaclass..metaclass.__new__N)Ú__name__Ú __module__Ú __qualname__rr)r r rr Ú metaclasssrZtemporary_class)Útyper)r r rr)r r r Úwith_metaclasssr) Z __future__rrrÚsysÚ version_infoZPY2ZPY3ÚstrZ string_typesZ basestringrrrrr ÚsPK}>]¬†þ=Ý Ý ,__pycache__/_structures.cpython-36.opt-1.pycnu„[µü¤3 ‡Ì]ˆã@sDddlmZmZmZGdd„deƒZeƒZGdd„deƒZeƒZdS)é)Úabsolute_importÚdivisionÚprint_functionc@sTeZdZdd„Zdd„Zdd„Zdd„Zd d „Zd d „Zd d„Z dd„Z dd„Z dS)ÚInfinitycCsdS)Nr©)Úselfrrú!/usr/lib/python3.6/_structures.pyÚ__repr__ szInfinity.__repr__cCs tt|ƒƒS)N)ÚhashÚrepr)rrrrÚ__hash__ szInfinity.__hash__cCsdS)NFr)rÚotherrrrÚ__lt__szInfinity.__lt__cCsdS)NFr)rr rrrÚ__le__szInfinity.__le__cCs t||jƒS)N)Ú isinstanceÚ __class__)rr rrrÚ__eq__szInfinity.__eq__cCst||jƒ S)N)rr)rr rrrÚ__ne__szInfinity.__ne__cCsdS)NTr)rr rrrÚ__gt__szInfinity.__gt__cCsdS)NTr)rr rrrÚ__ge__szInfinity.__ge__cCstS)N)ÚNegativeInfinity)rrrrÚ__neg__!szInfinity.__neg__N) Ú__name__Ú __module__Ú __qualname__r r rrrrrrrrrrrrsrc@sTeZdZdd„Zdd„Zdd„Zdd„Zd d „Zd d „Zd d„Z dd„Z dd„Z dS)rcCsdS)Nz -Infinityr)rrrrr )szNegativeInfinity.__repr__cCs tt|ƒƒS)N)r r )rrrrr ,szNegativeInfinity.__hash__cCsdS)NTr)rr rrrr/szNegativeInfinity.__lt__cCsdS)NTr)rr rrrr2szNegativeInfinity.__le__cCs t||jƒS)N)rr)rr rrrr5szNegativeInfinity.__eq__cCst||jƒ S)N)rr)rr rrrr8szNegativeInfinity.__ne__cCsdS)NFr)rr rrrr;szNegativeInfinity.__gt__cCsdS)NFr)rr rrrr>szNegativeInfinity.__ge__cCstS)N)r)rrrrrAszNegativeInfinity.__neg__N) rrrr r rrrrrrrrrrrr'srN)Z __future__rrrÚobjectrrrrrrÚsPK}>]¬†þ=Ý Ý &__pycache__/_structures.cpython-36.pycnu„[µü¤3 ‡Ì]ˆã@sDddlmZmZmZGdd„deƒZeƒZGdd„deƒZeƒZdS)é)Úabsolute_importÚdivisionÚprint_functionc@sTeZdZdd„Zdd„Zdd„Zdd„Zd d „Zd d „Zd d„Z dd„Z dd„Z dS)ÚInfinitycCsdS)Nr©)Úselfrrú!/usr/lib/python3.6/_structures.pyÚ__repr__ szInfinity.__repr__cCs tt|ƒƒS)N)ÚhashÚrepr)rrrrÚ__hash__ szInfinity.__hash__cCsdS)NFr)rÚotherrrrÚ__lt__szInfinity.__lt__cCsdS)NFr)rr rrrÚ__le__szInfinity.__le__cCs t||jƒS)N)Ú isinstanceÚ __class__)rr rrrÚ__eq__szInfinity.__eq__cCst||jƒ S)N)rr)rr rrrÚ__ne__szInfinity.__ne__cCsdS)NTr)rr rrrÚ__gt__szInfinity.__gt__cCsdS)NTr)rr rrrÚ__ge__szInfinity.__ge__cCstS)N)ÚNegativeInfinity)rrrrÚ__neg__!szInfinity.__neg__N) Ú__name__Ú __module__Ú __qualname__r r rrrrrrrrrrrrsrc@sTeZdZdd„Zdd„Zdd„Zdd„Zd d „Zd d „Zd d„Z dd„Z dd„Z dS)rcCsdS)Nz -Infinityr)rrrrr )szNegativeInfinity.__repr__cCs tt|ƒƒS)N)r r )rrrrr ,szNegativeInfinity.__hash__cCsdS)NTr)rr rrrr/szNegativeInfinity.__lt__cCsdS)NTr)rr rrrr2szNegativeInfinity.__le__cCs t||jƒS)N)rr)rr rrrr5szNegativeInfinity.__eq__cCst||jƒ S)N)rr)rr rrrr8szNegativeInfinity.__ne__cCsdS)NFr)rr rrrr;szNegativeInfinity.__gt__cCsdS)NFr)rr rrrr>szNegativeInfinity.__ge__cCstS)N)r)rrrrrAszNegativeInfinity.__neg__N) rrrr r rrrrrrrrrrrr'srN)Z __future__rrrÚobjectrrrrrrÚsPK}>]eå!å!(__pycache__/markers.cpython-36.opt-1.pycnu„[µü¤3 ‡Ì]ùã @s@ddlmZmZmZddlZddlZddlZddlZddlm Z m Z m Z m Z ddlm Z mZmZmZddlmZddlmZddlmZmZd d d d d gZGdd „d eƒZGdd „d eƒZGdd „d eƒZGdd„deƒZGdd„deƒZGdd„deƒZ Gdd„deƒZ!edƒedƒBedƒBedƒBedƒBedƒBedƒBed ƒBed!ƒBed"ƒBed#ƒBed$ƒBed%ƒBed&ƒBed'ƒBed(ƒBed)ƒBed*ƒBZ"d#d"ddddd+œZ#e"j$d,d-„ƒed.ƒed/ƒBed0ƒBed1ƒBed2ƒBed3ƒBed4ƒBed5ƒBZ%e%ed6ƒBed7ƒBZ&e&j$d8d-„ƒed9ƒed:ƒBZ'e'j$d;d-„ƒed<ƒed=ƒBZ(e"e'BZ)ee)e&e)ƒZ*e*j$d>d-„ƒed?ƒj+ƒZ,ed@ƒj+ƒZ-eƒZ.e*ee,e.e-ƒBZ/e.e/e e(e.ƒ>e e.e Z0dAdB„Z1dSdDdE„Z2dFd-„dGd-„ej3ej4ej5ej6ej7ej8dHœZ9dIdJ„Z:eƒZ;dKdL„ZdQd „Z?GdRd „d eƒZ@dS)Té)Úabsolute_importÚdivisionÚprint_functionN)ÚParseExceptionÚ ParseResultsÚ stringStartÚ stringEnd)Ú ZeroOrMoreÚGroupÚForwardÚ QuotedString)ÚLiteralé)Ú string_types)Ú SpecifierÚInvalidSpecifierÚ InvalidMarkerÚUndefinedComparisonÚUndefinedEnvironmentNameÚMarkerÚdefault_environmentc@seZdZdZdS)rzE An invalid marker was found, users should refer to PEP 508. N)Ú__name__Ú __module__Ú __qualname__Ú__doc__©rrú/usr/lib/python3.6/markers.pyrsc@seZdZdZdS)rzP An invalid operation was attempted on a value that doesn't support it. N)rrrrrrrrrsc@seZdZdZdS)rz\ A name was attempted to be used that does not exist inside of the environment. N)rrrrrrrrr%sc@s,eZdZdd„Zdd„Zdd„Zdd„Zd S) ÚNodecCs ||_dS)N)Úvalue)ÚselfrrrrÚ__init__.sz Node.__init__cCs t|jƒS)N)Ústrr)rrrrÚ__str__1sz Node.__str__cCsdj|jjt|ƒƒS)Nz <{0}({1!r})>)ÚformatÚ __class__rr!)rrrrÚ__repr__4sz Node.__repr__cCst‚dS)N)ÚNotImplementedError)rrrrÚ serialize7szNode.serializeN)rrrr r"r%r'rrrrr,src@seZdZdd„ZdS)ÚVariablecCst|ƒS)N)r!)rrrrr'=szVariable.serializeN)rrrr'rrrrr(;sr(c@seZdZdd„ZdS)ÚValuecCs dj|ƒS)Nz"{0}")r#)rrrrr'CszValue.serializeN)rrrr'rrrrr)Asr)c@seZdZdd„ZdS)ÚOpcCst|ƒS)N)r!)rrrrr'Isz Op.serializeN)rrrr'rrrrr*Gsr*Úimplementation_versionÚplatform_python_implementationÚimplementation_nameÚpython_full_versionÚplatform_releaseÚplatform_versionÚplatform_machineÚplatform_systemÚpython_versionÚ sys_platformÚos_namezos.namez sys.platformzplatform.versionzplatform.machinezplatform.python_implementationÚpython_implementationZextra)zos.namez sys.platformzplatform.versionzplatform.machinezplatform.python_implementationr6cCsttj|d|dƒƒS)Nr)r(ÚALIASESÚget)ÚsÚlÚtrrrÚisr<z===z==z>=z<=z!=z~=ú>ú�sz(_coerce_parse_result..)Ú isinstancer)ÚresultsrrrrG�s rGTcCs”t|tƒr4t|ƒdkr4t|dttfƒr4t|dƒSt|tƒrndd„|Dƒ}|rZdj|ƒSddj|ƒdSn"t|tƒrŒdjdd „|DƒƒS|SdS) Nrrcss|]}t|dd�VqdS)F)ÚfirstN)Ú_format_marker)rHÚmrrrú  sz!_format_marker..ú rErFcSsg|] }|jƒ‘qSr)r')rHrOrrrrJ¦sz"_format_marker..)rKÚlistÚlenrDrNÚjoin)ÚmarkerrMÚinnerrrrrN”s    rNcCs||kS)Nr)ÚlhsÚrhsrrrr<¬scCs||kS)Nr)rWrXrrrr<­s)r?znot inr>z<=z==z!=z>=r=c Cslytdj|jƒ|gƒƒ}Wntk r.Yn X|j|ƒStj|jƒƒ}|dkrbtdj|||ƒƒ‚|||ƒS)NÚz#Undefined {0!r} on {1!r} and {2!r}.) rrTr'rÚcontainsÚ _operatorsr8rr#)rWÚoprXÚspecZoperrrrÚ_eval_op·s r^cCs&|j|tƒ}|tkr"tdj|ƒƒ‚|S)Nz/{0!r} does not exist in evaluation environment.)r8Ú _undefinedrr#)Ú environmentÚnamerrrrÚ_get_envËs   rbc Cs´gg}xš|D]’}t|tƒr0|djt||ƒƒq t|tƒrŒ|\}}}t|tƒrbt||jƒ}|j}n|j}t||jƒ}|djt|||ƒƒq |dkr |jgƒq Wt dd„|DƒƒS)NrrCcss|]}t|ƒVqdS)N)Úall)rHÚitemrrrrPîsz$_evaluate_markers..éÿÿÿÿre) rKrRÚappendÚ_evaluate_markersrDr(rbrr^Úany) Zmarkersr`ÚgroupsrUrWr\rXZ lhs_valueZ rhs_valuerrrrgÖs       rgcCs2dj|ƒ}|j}|dkr.||dt|jƒ7}|S)Nz{0.major}.{0.minor}.{0.micro}Úfinalr)r#Ú releaselevelr!Úserial)ÚinfoÚversionZkindrrrÚformat_full_versionñs  roc Cslttdƒr ttjjƒ}tjj}nd}d}||tjtjƒtj ƒtj ƒtjƒtj ƒtj ƒtj ƒdd…tjdœ S)NÚimplementationÚ0rYé) r-r+r5r1r/r2r0r.r,r3r4) ÚhasattrÚsysrorprnraÚosÚplatformÚmachineÚreleaseÚsystemr3r6)Ziverr-rrrrùs    c@s.eZdZdd„Zdd„Zdd„Zd dd „ZdS) rcCs`yttj|ƒƒ|_WnFtk rZ}z*dj|||j|jd…ƒ}t|ƒ‚WYdd}~XnXdS)Nz+Invalid marker: {0!r}, parse error at {1!r}é)rGÚMARKERZ parseStringÚ_markersrr#Úlocr)rrUÚeZerr_strrrrr s zMarker.__init__cCs t|jƒS)N)rNr|)rrrrr"szMarker.__str__cCsdjt|ƒƒS)Nz)r#r!)rrrrr%szMarker.__repr__NcCs$tƒ}|dk r|j|ƒt|j|ƒS)a$Evaluate a marker. Return the boolean from evaluating the given marker against the environment. environment is an optional argument to override all or part of the determined environment. The environment is determined from the current Python process. N)rÚupdatergr|)rr`Zcurrent_environmentrrrÚevaluate s  zMarker.evaluate)N)rrrr r"r%r€rrrrrs)T)AZ __future__rrrÚoperatorrurvrtZ pyparsingrrrrr r r r r ÚLZ_compatrZ specifiersrrÚ__all__Ú ValueErrorrrrÚobjectrr(r)r*ZVARIABLEr7ZsetParseActionZ VERSION_CMPZ MARKER_OPZ MARKER_VALUEZBOOLOPZ MARKER_VARZ MARKER_ITEMÚsuppressZLPARENZRPARENZ MARKER_EXPRZ MARKER_ATOMr{rGrNÚltÚleÚeqÚneÚgeÚgtr[r^r_rbrgrorrrrrrÚsx  †  6       PK}>]fòâO"O""__pycache__/markers.cpython-36.pycnu„[µü¤3 ‡Ì]ùã @s@ddlmZmZmZddlZddlZddlZddlZddlm Z m Z m Z m Z ddlm Z mZmZmZddlmZddlmZddlmZmZd d d d d gZGdd „d eƒZGdd „d eƒZGdd „d eƒZGdd„deƒZGdd„deƒZGdd„deƒZ Gdd„deƒZ!edƒedƒBedƒBedƒBedƒBedƒBedƒBed ƒBed!ƒBed"ƒBed#ƒBed$ƒBed%ƒBed&ƒBed'ƒBed(ƒBed)ƒBed*ƒBZ"d#d"ddddd+œZ#e"j$d,d-„ƒed.ƒed/ƒBed0ƒBed1ƒBed2ƒBed3ƒBed4ƒBed5ƒBZ%e%ed6ƒBed7ƒBZ&e&j$d8d-„ƒed9ƒed:ƒBZ'e'j$d;d-„ƒed<ƒed=ƒBZ(e"e'BZ)ee)e&e)ƒZ*e*j$d>d-„ƒed?ƒj+ƒZ,ed@ƒj+ƒZ-eƒZ.e*ee,e.e-ƒBZ/e.e/e e(e.ƒ>e e.e Z0dAdB„Z1dSdDdE„Z2dFd-„dGd-„ej3ej4ej5ej6ej7ej8dHœZ9dIdJ„Z:eƒZ;dKdL„ZdQd „Z?GdRd „d eƒZ@dS)Té)Úabsolute_importÚdivisionÚprint_functionN)ÚParseExceptionÚ ParseResultsÚ stringStartÚ stringEnd)Ú ZeroOrMoreÚGroupÚForwardÚ QuotedString)ÚLiteralé)Ú string_types)Ú SpecifierÚInvalidSpecifierÚ InvalidMarkerÚUndefinedComparisonÚUndefinedEnvironmentNameÚMarkerÚdefault_environmentc@seZdZdZdS)rzE An invalid marker was found, users should refer to PEP 508. N)Ú__name__Ú __module__Ú __qualname__Ú__doc__©rrú/usr/lib/python3.6/markers.pyrsc@seZdZdZdS)rzP An invalid operation was attempted on a value that doesn't support it. N)rrrrrrrrrsc@seZdZdZdS)rz\ A name was attempted to be used that does not exist inside of the environment. N)rrrrrrrrr%sc@s,eZdZdd„Zdd„Zdd„Zdd„Zd S) ÚNodecCs ||_dS)N)Úvalue)ÚselfrrrrÚ__init__.sz Node.__init__cCs t|jƒS)N)Ústrr)rrrrÚ__str__1sz Node.__str__cCsdj|jjt|ƒƒS)Nz <{0}({1!r})>)ÚformatÚ __class__rr!)rrrrÚ__repr__4sz Node.__repr__cCst‚dS)N)ÚNotImplementedError)rrrrÚ serialize7szNode.serializeN)rrrr r"r%r'rrrrr,src@seZdZdd„ZdS)ÚVariablecCst|ƒS)N)r!)rrrrr'=szVariable.serializeN)rrrr'rrrrr(;sr(c@seZdZdd„ZdS)ÚValuecCs dj|ƒS)Nz"{0}")r#)rrrrr'CszValue.serializeN)rrrr'rrrrr)Asr)c@seZdZdd„ZdS)ÚOpcCst|ƒS)N)r!)rrrrr'Isz Op.serializeN)rrrr'rrrrr*Gsr*Úimplementation_versionÚplatform_python_implementationÚimplementation_nameÚpython_full_versionÚplatform_releaseÚplatform_versionÚplatform_machineÚplatform_systemÚpython_versionÚ sys_platformÚos_namezos.namez sys.platformzplatform.versionzplatform.machinezplatform.python_implementationÚpython_implementationZextra)zos.namez sys.platformzplatform.versionzplatform.machinezplatform.python_implementationr6cCsttj|d|dƒƒS)Nr)r(ÚALIASESÚget)ÚsÚlÚtrrrÚisr<z===z==z>=z<=z!=z~=ú>ú�sz(_coerce_parse_result..)Ú isinstancer)ÚresultsrrrrG�s rGTcCs¨t|tttfƒst‚t|tƒrHt|ƒdkrHt|dttfƒrHt|dƒSt|tƒr‚dd„|Dƒ}|rndj|ƒSddj|ƒdSn"t|tƒr djdd „|DƒƒS|SdS) Nrrcss|]}t|dd�VqdS)F)ÚfirstN)Ú_format_marker)rHÚmrrrú  sz!_format_marker..ú rErFcSsg|] }|jƒ‘qSr)r')rHrOrrrrJ¦sz"_format_marker..)rKÚlistrDrÚAssertionErrorÚlenrNÚjoin)ÚmarkerrMÚinnerrrrrN”s    rNcCs||kS)Nr)ÚlhsÚrhsrrrr<¬scCs||kS)Nr)rXrYrrrr<­s)r?znot inr>z<=z==z!=z>=r=c Cslytdj|jƒ|gƒƒ}Wntk r.Yn X|j|ƒStj|jƒƒ}|dkrbtdj|||ƒƒ‚|||ƒS)NÚz#Undefined {0!r} on {1!r} and {2!r}.) rrUr'rÚcontainsÚ _operatorsr8rr#)rXÚoprYÚspecZoperrrrÚ_eval_op·s r_cCs&|j|tƒ}|tkr"tdj|ƒƒ‚|S)Nz/{0!r} does not exist in evaluation environment.)r8Ú _undefinedrr#)Ú environmentÚnamerrrrÚ_get_envËs   rcc CsÔgg}xº|D]²}t|tttfƒs$t‚t|tƒrD|djt||ƒƒq t|tƒr |\}}}t|tƒrvt||j ƒ}|j }n|j }t||j ƒ}|djt |||ƒƒq |dks¬t‚|dkr |jgƒq Wt dd„|DƒƒS) NrrBrCcss|]}t|ƒVqdS)N)Úall)rHÚitemrrrrPîsz$_evaluate_markers..éÿÿÿÿrf)rBrC) rKrRrDrrSÚappendÚ_evaluate_markersr(rcrr_Úany) ZmarkersraÚgroupsrVrXr]rYZ lhs_valueZ rhs_valuerrrrhÖs"        rhcCs2dj|ƒ}|j}|dkr.||dt|jƒ7}|S)Nz{0.major}.{0.minor}.{0.micro}Úfinalr)r#Ú releaselevelr!Úserial)ÚinfoÚversionZkindrrrÚformat_full_versionñs  rpc Cslttdƒr ttjjƒ}tjj}nd}d}||tjtjƒtj ƒtj ƒtjƒtj ƒtj ƒtj ƒdd…tjdœ S)NÚimplementationÚ0rZé) r-r+r5r1r/r2r0r.r,r3r4) ÚhasattrÚsysrprqrorbÚosÚplatformÚmachineÚreleaseÚsystemr3r6)Ziverr-rrrrùs    c@s.eZdZdd„Zdd„Zdd„Zd dd „ZdS) rcCs`yttj|ƒƒ|_WnFtk rZ}z*dj|||j|jd…ƒ}t|ƒ‚WYdd}~XnXdS)Nz+Invalid marker: {0!r}, parse error at {1!r}é)rGÚMARKERZ parseStringÚ_markersrr#Úlocr)rrVÚeZerr_strrrrr s zMarker.__init__cCs t|jƒS)N)rNr})rrrrr"szMarker.__str__cCsdjt|ƒƒS)Nz)r#r!)rrrrr%szMarker.__repr__NcCs$tƒ}|dk r|j|ƒt|j|ƒS)a$Evaluate a marker. Return the boolean from evaluating the given marker against the environment. environment is an optional argument to override all or part of the determined environment. The environment is determined from the current Python process. N)rÚupdaterhr})rraZcurrent_environmentrrrÚevaluate s  zMarker.evaluate)N)rrrr r"r%r�rrrrrs)T)AZ __future__rrrÚoperatorrvrwruZ pyparsingrrrrr r r r r ÚLZ_compatrZ specifiersrrÚ__all__Ú ValueErrorrrrÚobjectrr(r)r*ZVARIABLEr7ZsetParseActionZ VERSION_CMPZ MARKER_OPZ MARKER_VALUEZBOOLOPZ MARKER_VARZ MARKER_ITEMÚsuppressZLPARENZRPARENZ MARKER_EXPRZ MARKER_ATOMr|rGrNÚltÚleÚeqÚneÚgeÚgtr\r_r`rcrhrprrrrrrÚsx  †  6       PK}>]e/e e=ƒZ?e,e e1ƒe?e>BZ@ee@eZAGd!d"„d"eBƒZCdS)#é)Úabsolute_importÚdivisionÚprint_functionN)Ú stringStartÚ stringEndÚoriginalTextForÚParseException)Ú ZeroOrMoreÚWordÚOptionalÚRegexÚCombine)ÚLiteral)Úparseé)Ú MARKER_EXPRÚMarker)ÚLegacySpecifierÚ SpecifierÚ SpecifierSetc@seZdZdZdS)ÚInvalidRequirementzJ An invalid requirement was found, users should refer to PEP 508. N)Ú__name__Ú __module__Ú __qualname__Ú__doc__©rrú"/usr/lib/python3.6/requirements.pyrsrú[ú]ú(ú)ú,ú;ú@z-_.Únamez[^ ]+ÚurlÚextrasF)Z joinStringZadjacentÚ _raw_speccCs |jpdS)NÚ)r')ÚsÚlÚtrrrÚ6sr,Ú specifiercCs|dS)Nrr)r)r*r+rrrr,9sÚmarkercCst||j|j…ƒS)N)rZ_original_startZ _original_end)r)r*r+rrrr,=sc@s(eZdZdZdd„Zdd„Zdd„ZdS) Ú RequirementzÁParse a requirement. Parse a given requirement string into its parts, such as name, specifier, URL, and extras. Raises InvalidRequirement on a badly-formed requirement string. cCsÜytj|ƒ}Wn@tk rN}z$tdj||j|jd…ƒƒ‚WYdd}~XnX|j|_|jrštj|jƒ}|j ot|j sˆ|j r�|j r�tdƒ‚|j|_nd|_t |j r²|j j ƒngƒ|_ t|jƒ|_|jrÒ|jnd|_dS)Nz+Invalid requirement, parse error at "{0!r}"ézInvalid URL given)Ú REQUIREMENTZ parseStringrrÚformatÚlocr$r%ÚurlparseÚschemeZnetlocÚsetr&ZasListrr-r.)ÚselfZrequirement_stringZreqÚeZ parsed_urlrrrÚ__init__Xs"*   zRequirement.__init__cCsz|jg}|jr*|jdjdjt|jƒƒƒƒ|jr@|jt|jƒƒ|jrX|jdj|jƒƒ|j rp|jdj|j ƒƒdj|ƒS)Nz[{0}]r!z@ {0}z; {0}r() r$r&Úappendr2ÚjoinÚsortedr-Ústrr%r.)r7ÚpartsrrrÚ__str__mszRequirement.__str__cCsdjt|ƒƒS)Nz)r2r=)r7rrrÚ__repr__~szRequirement.__repr__N)rrrrr9r?r@rrrrr/Ksr/)DZ __future__rrrÚstringÚreZ pyparsingrrrrr r r r r rÚLZsix.moves.urllibrr4ZmarkersrrZ specifiersrrrÚ ValueErrorrZ ascii_lettersZdigitsZALPHANUMÚsuppressZLBRACKETZRBRACKETZLPARENZRPARENÚCOMMAZ SEMICOLONÚATZ PUNCTUATIONZIDENTIFIER_ENDZ IDENTIFIERÚNAMEZEXTRAZURIZURLZ EXTRAS_LISTZEXTRASZ _regex_strÚVERBOSEÚ IGNORECASEZVERSION_PEP440ZVERSION_LEGACYZ VERSION_ONEZ VERSION_MANYZ _VERSION_SPECZsetParseActionZ VERSION_SPECZMARKER_SEPERATORZMARKERZVERSION_AND_MARKERZURL_AND_MARKERZNAMED_REQUIREMENTr1Úobjectr/rrrrÚsZ               PK}>]e/e e=ƒZ?e,e e1ƒe?e>BZ@ee@eZAGd!d"„d"eBƒZCdS)#é)Úabsolute_importÚdivisionÚprint_functionN)Ú stringStartÚ stringEndÚoriginalTextForÚParseException)Ú ZeroOrMoreÚWordÚOptionalÚRegexÚCombine)ÚLiteral)Úparseé)Ú MARKER_EXPRÚMarker)ÚLegacySpecifierÚ SpecifierÚ SpecifierSetc@seZdZdZdS)ÚInvalidRequirementzJ An invalid requirement was found, users should refer to PEP 508. N)Ú__name__Ú __module__Ú __qualname__Ú__doc__©rrú"/usr/lib/python3.6/requirements.pyrsrú[ú]ú(ú)ú,ú;ú@z-_.Únamez[^ ]+ÚurlÚextrasF)Z joinStringZadjacentÚ _raw_speccCs |jpdS)NÚ)r')ÚsÚlÚtrrrÚ6sr,Ú specifiercCs|dS)Nrr)r)r*r+rrrr,9sÚmarkercCst||j|j…ƒS)N)rZ_original_startZ _original_end)r)r*r+rrrr,=sc@s(eZdZdZdd„Zdd„Zdd„ZdS) Ú RequirementzÁParse a requirement. Parse a given requirement string into its parts, such as name, specifier, URL, and extras. Raises InvalidRequirement on a badly-formed requirement string. cCsÜytj|ƒ}Wn@tk rN}z$tdj||j|jd…ƒƒ‚WYdd}~XnX|j|_|jrštj|jƒ}|j ot|j sˆ|j r�|j r�tdƒ‚|j|_nd|_t |j r²|j j ƒngƒ|_ t|jƒ|_|jrÒ|jnd|_dS)Nz+Invalid requirement, parse error at "{0!r}"ézInvalid URL given)Ú REQUIREMENTZ parseStringrrÚformatÚlocr$r%ÚurlparseÚschemeZnetlocÚsetr&ZasListrr-r.)ÚselfZrequirement_stringZreqÚeZ parsed_urlrrrÚ__init__Xs"*   zRequirement.__init__cCsz|jg}|jr*|jdjdjt|jƒƒƒƒ|jr@|jt|jƒƒ|jrX|jdj|jƒƒ|j rp|jdj|j ƒƒdj|ƒS)Nz[{0}]r!z@ {0}z; {0}r() r$r&Úappendr2ÚjoinÚsortedr-Ústrr%r.)r7ÚpartsrrrÚ__str__mszRequirement.__str__cCsdjt|ƒƒS)Nz)r2r=)r7rrrÚ__repr__~szRequirement.__repr__N)rrrrr9r?r@rrrrr/Ksr/)DZ __future__rrrÚstringÚreZ pyparsingrrrrr r r r r rÚLZsix.moves.urllibrr4ZmarkersrrZ specifiersrrrÚ ValueErrorrZ ascii_lettersZdigitsZALPHANUMÚsuppressZLBRACKETZRBRACKETZLPARENZRPARENÚCOMMAZ SEMICOLONÚATZ PUNCTUATIONZIDENTIFIER_ENDZ IDENTIFIERÚNAMEZEXTRAZURIZURLZ EXTRAS_LISTZEXTRASZ _regex_strÚVERBOSEÚ IGNORECASEZVERSION_PEP440ZVERSION_LEGACYZ VERSION_ONEZ VERSION_MANYZ _VERSION_SPECZsetParseActionZ VERSION_SPECZMARKER_SEPERATORZMARKERZVERSION_AND_MARKERZURL_AND_MARKERZNAMED_REQUIREMENTr1Úobjectr/rrrrÚsZ               PK}>]€MM+__pycache__/specifiers.cpython-36.opt-1.pycnu„[µü¤3 ‡Ì]ymã@sæddlmZmZmZddlZddlZddlZddlZddlm Z m Z ddl m Z m Z mZGdd„deƒZGdd „d e ejeƒƒZGd d „d eƒZGd d „d eƒZdd„ZGdd„deƒZejdƒZdd„Zdd„ZGdd„deƒZdS)é)Úabsolute_importÚdivisionÚprint_functionNé)Ú string_typesÚwith_metaclass)ÚVersionÚ LegacyVersionÚparsec@seZdZdZdS)ÚInvalidSpecifierzH An invalid specifier was found, users should refer to PEP 440. N)Ú__name__Ú __module__Ú __qualname__Ú__doc__©rrú /usr/lib/python3.6/specifiers.pyr sr c@s€eZdZejdd„ƒZejdd„ƒZejdd„ƒZejdd„ƒZej d d „ƒZ e j d d „ƒZ ejdd d„ƒZ ejddd„ƒZ d S)Ú BaseSpecifiercCsdS)zŽ Returns the str representation of this Specifier like object. This should be representative of the Specifier itself. Nr)ÚselfrrrÚ__str__szBaseSpecifier.__str__cCsdS)zF Returns a hash value for this Specifier like object. Nr)rrrrÚ__hash__szBaseSpecifier.__hash__cCsdS)zq Returns a boolean representing whether or not the two Specifier like objects are equal. Nr)rÚotherrrrÚ__eq__$szBaseSpecifier.__eq__cCsdS)zu Returns a boolean representing whether or not the two Specifier like objects are not equal. Nr)rrrrrÚ__ne__+szBaseSpecifier.__ne__cCsdS)zg Returns whether or not pre-releases as a whole are allowed by this specifier. Nr)rrrrÚ prereleases2szBaseSpecifier.prereleasescCsdS)zd Sets whether or not pre-releases as a whole are allowed by this specifier. Nr)rÚvaluerrrr9sNcCsdS)zR Determines if the given item is contained within this specifier. Nr)rÚitemrrrrÚcontains@szBaseSpecifier.containscCsdS)z• Takes an iterable of items and filters them so that only items which are contained within this specifier are allowed in it. Nr)rÚiterablerrrrÚfilterFszBaseSpecifier.filter)N)N)r r rÚabcÚabstractmethodrrrrÚabstractpropertyrÚsetterrrrrrrrs rc@s eZdZiZd dd„Zdd„Zdd„Zd d „Zd d „Zd d„Z dd„Z dd„Z e dd„ƒZ e dd„ƒZe dd„ƒZejdd„ƒZdd„Zd!dd„Zd"dd„ZdS)#Ú_IndividualSpecifierÚNcCsF|jj|ƒ}|stdj|ƒƒ‚|jdƒjƒ|jdƒjƒf|_||_dS)NzInvalid specifier: '{0}'ÚoperatorÚversion)Ú_regexÚsearchr ÚformatÚgroupÚstripÚ_specÚ _prereleases)rÚspecrÚmatchrrrÚ__init__Rs   z_IndividualSpecifier.__init__cCs0|jdk rdj|jƒnd}dj|jjt|ƒ|ƒS)Nz, prereleases={0!r}r$z<{0}({1!r}{2})>)r-r)rÚ __class__r Ústr)rÚprerrrÚ__repr___s z_IndividualSpecifier.__repr__cCs dj|jŽS)Nz{0}{1})r)r,)rrrrrlsz_IndividualSpecifier.__str__cCs t|jƒS)N)Úhashr,)rrrrrosz_IndividualSpecifier.__hash__c CsLt|tƒr0y|j|ƒ}Wq@tk r,tSXnt||jƒs@tS|j|jkS)N)Ú isinstancerr1r ÚNotImplementedr,)rrrrrrrs  z_IndividualSpecifier.__eq__c CsLt|tƒr0y|j|ƒ}Wq@tk r,tSXnt||jƒs@tS|j|jkS)N)r6rr1r r7r,)rrrrrr}s  z_IndividualSpecifier.__ne__cCst|dj|j|ƒƒS)Nz _compare_{0})Úgetattrr)Ú _operators)rÚoprrrÚ _get_operatorˆsz"_IndividualSpecifier._get_operatorcCst|ttfƒst|ƒ}|S)N)r6r rr )rr&rrrÚ_coerce_version‹sz$_IndividualSpecifier._coerce_versioncCs |jdS)Nr)r,)rrrrr%�sz_IndividualSpecifier.operatorcCs |jdS)Nr)r,)rrrrr&”sz_IndividualSpecifier.versioncCs|jS)N)r-)rrrrr˜sz _IndividualSpecifier.prereleasescCs ||_dS)N)r-)rrrrrrœscCs |j|ƒS)N)r)rrrrrÚ __contains__ sz!_IndividualSpecifier.__contains__cCs<|dkr|j}|j|ƒ}|jr(| r(dS|j|jƒ||jƒS)NF)rr<Ú is_prereleaser;r%r&)rrrrrrr£s   z_IndividualSpecifier.containsccsŒd}g}d|dk r|ndi}xL|D]D}|j|ƒ}|j|f|Žr"|jr\|pL|j r\|j|ƒq"d}|Vq"W| rˆ|rˆx|D] }|VqzWdS)NFrT)r<rr>rÚappend)rrrZyieldedÚfound_prereleasesÚkwr&Úparsed_versionrrrr¶s       z_IndividualSpecifier.filter)r$N)N)N)r r rr9r0r4rrrrr;r<Úpropertyr%r&rr"r=rrrrrrr#Ns         r#c@sveZdZdZejdedejejBƒZdddddd d œZ d d „Z d d„Z dd„Z dd„Z dd„Zdd„Zdd„ZdS)ÚLegacySpecifieraÛ (?P(==|!=|<=|>=|<|>)) \s* (?P [^,;\s)]* # Since this is a "legacy" specifier, and the version # string can be just about anything, we match everything # except for whitespace, a semi-colon for marker support, # a closing paren since versions can be enclosed in # them, and a comma since it's a version separator. ) z^\s*z\s*$ÚequalÚ not_equalÚless_than_equalÚgreater_than_equalÚ less_thanÚ greater_than)z==z!=z<=z>=ú<ú>cCst|tƒstt|ƒƒ}|S)N)r6r r2)rr&rrrr<òs  zLegacySpecifier._coerce_versioncCs||j|ƒkS)N)r<)rÚ prospectiver.rrrÚ_compare_equal÷szLegacySpecifier._compare_equalcCs||j|ƒkS)N)r<)rrMr.rrrÚ_compare_not_equalúsz"LegacySpecifier._compare_not_equalcCs||j|ƒkS)N)r<)rrMr.rrrÚ_compare_less_than_equalýsz(LegacySpecifier._compare_less_than_equalcCs||j|ƒkS)N)r<)rrMr.rrrÚ_compare_greater_than_equalsz+LegacySpecifier._compare_greater_than_equalcCs||j|ƒkS)N)r<)rrMr.rrrÚ_compare_less_thansz"LegacySpecifier._compare_less_thancCs||j|ƒkS)N)r<)rrMr.rrrÚ_compare_greater_thansz%LegacySpecifier._compare_greater_thanN)r r rÚ _regex_strÚreÚcompileÚVERBOSEÚ IGNORECASEr'r9r<rNrOrPrQrRrSrrrrrDÖs  rDcstjˆƒ‡fdd„ƒ}|S)Ncst|tƒsdSˆ|||ƒS)NF)r6r)rrMr.)ÚfnrrÚwrapped s z)_require_version_compare..wrapped)Ú functoolsÚwraps)rYrZr)rYrÚ_require_version_compare sr]c @s¸eZdZdZejdedejejBƒZdddddd d d d œZ e d d„ƒZ e dd„ƒZ e dd„ƒZ e dd„ƒZe dd„ƒZe dd„ƒZe dd„ƒZdd„Zedd„ƒZejdd„ƒZd S)!Ú Specifiera (?P(~=|==|!=|<=|>=|<|>|===)) (?P (?: # The identity operators allow for an escape hatch that will # do an exact string match of the version you wish to install. # This will not be parsed by PEP 440 and we cannot determine # any semantic meaning from it. This operator is discouraged # but included entirely as an escape hatch. (?<====) # Only match for the identity operator \s* [^\s]* # We just match everything, except for whitespace # since we are only testing for strict identity. ) | (?: # The (non)equality operators allow for wild card and local # versions to be specified so we have to define these two # operators separately to enable that. (?<===|!=) # Only match for equals and not equals \s* v? (?:[0-9]+!)? # epoch [0-9]+(?:\.[0-9]+)* # release (?: # pre release [-_\.]? (a|b|c|rc|alpha|beta|pre|preview) [-_\.]? [0-9]* )? (?: # post release (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*) )? # You cannot use a wild card and a dev or local version # together so group them with a | and make them optional. (?: (?:[-_\.]?dev[-_\.]?[0-9]*)? # dev release (?:\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*)? # local | \.\* # Wild card syntax of .* )? ) | (?: # The compatible operator requires at least two digits in the # release segment. (?<=~=) # Only match for the compatible operator \s* v? (?:[0-9]+!)? # epoch [0-9]+(?:\.[0-9]+)+ # release (We have a + instead of a *) (?: # pre release [-_\.]? (a|b|c|rc|alpha|beta|pre|preview) [-_\.]? [0-9]* )? (?: # post release (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*) )? (?:[-_\.]?dev[-_\.]?[0-9]*)? # dev release ) | (?: # All other operators only allow a sub set of what the # (non)equality operators do. Specifically they do not allow # local versions to be specified nor do they allow the prefix # matching wild cards. (?=rKrLz===cCsNdjttjdd„t|ƒƒƒdd…ƒ}|d7}|jdƒ||ƒoL|jdƒ||ƒS) NÚ.cSs|jdƒ o|jdƒ S)NZpostZdev)Ú startswith)ÚxrrrÚ�s z/Specifier._compare_compatible..rz.*z>=z==éÿÿÿÿ)ÚjoinÚlistÚ itertoolsÚ takewhileÚ_version_splitr;)rrMr.ÚprefixrrrÚ_compare_compatible‚s   zSpecifier._compare_compatiblecCsp|jdƒrPt|jƒ}t|dd…ƒ}tt|ƒƒ}|dt|ƒ…}t||ƒ\}}nt|ƒ}|jsht|jƒ}||kS)Nz.*ééþÿÿÿ)ÚendswithrZpublicrhr2ÚlenÚ _pad_versionÚlocal)rrMr.rrrrN�s    zSpecifier._compare_equalcCs|j||ƒ S)N)rN)rrMr.rrrrOÀszSpecifier._compare_not_equalcCs |t|ƒkS)N)r)rrMr.rrrrPÄsz"Specifier._compare_less_than_equalcCs |t|ƒkS)N)r)rrMr.rrrrQÈsz%Specifier._compare_greater_than_equalcCs>t|ƒ}||ksdS|j r:|jr:t|jƒt|jƒkr:dSdS)NFT)rr>Ú base_version)rrMr.rrrrRÌszSpecifier._compare_less_thancCs`t|ƒ}||ksdS|j r:|jr:t|jƒt|jƒkr:dS|jdk r\t|jƒt|jƒkr\dSdS)NFT)rZis_postreleaserqrp)rrMr.rrrrSås zSpecifier._compare_greater_thancCst|ƒjƒt|ƒjƒkS)N)r2Úlower)rrMr.rrrÚ_compare_arbitraryszSpecifier._compare_arbitrarycCsR|jdk r|jS|j\}}|d krN|dkr@|jdƒr@|dd …}t|ƒjrNdSd S) Nú==ú>=ú<=ú~=ú===z.*rkTF)rtrurvrwrxrl)r-r,rmr r>)rr%r&rrrrs    zSpecifier.prereleasescCs ||_dS)N)r-)rrrrrrsN)r r rrTrUrVrWrXr'r9r]rjrNrOrPrQrRrSrsrCrr"rrrrr^s*^  #      r^z^([0-9]+)((?:a|b|c|rc)[0-9]+)$cCsDg}x:|jdƒD],}tj|ƒ}|r2|j|jƒƒq|j|ƒqW|S)Nr_)ÚsplitÚ _prefix_regexr(ÚextendÚgroupsr?)r&Úresultrr/rrrrh's rhc Csægg}}|jttjdd„|ƒƒƒ|jttjdd„|ƒƒƒ|j|t|dƒd…ƒ|j|t|dƒd…ƒ|jddgtdt|dƒt|dƒƒƒ|jddgtdt|dƒt|dƒƒƒttj|Žƒttj|ŽƒfS)NcSs|jƒS)N)Úisdigit)rarrrrb6sz_pad_version..cSs|jƒS)N)r~)rarrrrb7srrÚ0)r?rerfrgrnÚinsertÚmaxÚchain)ÚleftÚrightZ left_splitZ right_splitrrrro2s && roc@sŒeZdZddd„Zdd„Zdd„Zd d „Zd d „Zd d„Zdd„Z dd„Z dd„Z e dd„ƒZ e jdd„ƒZ dd„Zddd„Zd dd„ZdS)!Ú SpecifierSetr$Nc Csrdd„|jdƒDƒ}tƒ}xB|D]:}y|jt|ƒƒWq tk rX|jt|ƒƒYq Xq Wt|ƒ|_||_dS)NcSsg|]}|jƒr|jƒ‘qSr)r+)Ú.0Úsrrrú Rsz)SpecifierSet.__init__..ú,) ryÚsetÚaddr^r rDÚ frozensetÚ_specsr-)rZ specifiersrZparsedÚ specifierrrrr0Os  zSpecifierSet.__init__cCs*|jdk rdj|jƒnd}djt|ƒ|ƒS)Nz, prereleases={0!r}r$z)r-r)rr2)rr3rrrr4dszSpecifierSet.__repr__cCsdjtdd„|jDƒƒƒS)Nr‰css|]}t|ƒVqdS)N)r2)r†r‡rrrú nsz'SpecifierSet.__str__..)rdÚsortedr�)rrrrrmszSpecifierSet.__str__cCs t|jƒS)N)r5r�)rrrrrpszSpecifierSet.__hash__cCs˜t|tƒrt|ƒ}nt|tƒs"tStƒ}t|j|jBƒ|_|jdkrX|jdk rX|j|_n<|jdk rv|jdkrv|j|_n|j|jkrŒ|j|_ntdƒ‚|S)NzFCannot combine SpecifierSets with True and False prerelease overrides.)r6rr…r7rŒr�r-Ú ValueError)rrrŽrrrÚ__and__ss       zSpecifierSet.__and__cCsFt|tƒrt|ƒ}n&t|tƒr,tt|ƒƒ}nt|tƒs:tS|j|jkS)N)r6rr…r#r2r7r�)rrrrrrŠs    zSpecifierSet.__eq__cCsFt|tƒrt|ƒ}n&t|tƒr,tt|ƒƒ}nt|tƒs:tS|j|jkS)N)r6rr…r#r2r7r�)rrrrrr”s    zSpecifierSet.__ne__cCs t|jƒS)N)rnr�)rrrrÚ__len__žszSpecifierSet.__len__cCs t|jƒS)N)Úiterr�)rrrrÚ__iter__¡szSpecifierSet.__iter__cCs.|jdk r|jS|jsdStdd„|jDƒƒS)Ncss|] }|jVqdS)N)r)r†r‡rrrr�³sz+SpecifierSet.prereleases..)r-r�Úany)rrrrr¤s  zSpecifierSet.prereleasescCs ||_dS)N)r-)rrrrrrµscCs |j|ƒS)N)r)rrrrrr=¹szSpecifierSet.__contains__csNtˆttfƒstˆƒ‰ˆdkr$|j‰ˆ r4ˆjr4dSt‡‡fdd„|jDƒƒS)NFc3s|]}|jˆˆd�VqdS))rN)r)r†r‡)rrrrr�Õsz(SpecifierSet.contains..)r6r rr rr>Úallr�)rrrr)rrrr¼s  zSpecifierSet.containscCs¼|dkr|j}|jr:x |jD]}|j|t|ƒd�}qW|Sg}g}xZ|D]R}t|ttfƒsdt|ƒ}n|}t|tƒrtqH|jr�| r�|sš|j |ƒqH|j |ƒqHW| r´|r´|dkr´|S|SdS)N)r) rr�rÚboolr6r rr r>r?)rrrr.Zfilteredr@rrBrrrrÙs*      zSpecifierSet.filter)r$N)N)N)r r rr0r4rrr’rrr“r•rCrr"r=rrrrrrr…Ms      r…)Z __future__rrrrr[rfrUZ_compatrrr&rr r r‘r ÚABCMetaÚobjectrr#rDr]r^rVrzrhror…rrrrÚs&9 4   PK}>]€MM%__pycache__/specifiers.cpython-36.pycnu„[µü¤3 ‡Ì]ymã@sæddlmZmZmZddlZddlZddlZddlZddlm Z m Z ddl m Z m Z mZGdd„deƒZGdd „d e ejeƒƒZGd d „d eƒZGd d „d eƒZdd„ZGdd„deƒZejdƒZdd„Zdd„ZGdd„deƒZdS)é)Úabsolute_importÚdivisionÚprint_functionNé)Ú string_typesÚwith_metaclass)ÚVersionÚ LegacyVersionÚparsec@seZdZdZdS)ÚInvalidSpecifierzH An invalid specifier was found, users should refer to PEP 440. N)Ú__name__Ú __module__Ú __qualname__Ú__doc__©rrú /usr/lib/python3.6/specifiers.pyr sr c@s€eZdZejdd„ƒZejdd„ƒZejdd„ƒZejdd„ƒZej d d „ƒZ e j d d „ƒZ ejdd d„ƒZ ejddd„ƒZ d S)Ú BaseSpecifiercCsdS)zŽ Returns the str representation of this Specifier like object. This should be representative of the Specifier itself. Nr)ÚselfrrrÚ__str__szBaseSpecifier.__str__cCsdS)zF Returns a hash value for this Specifier like object. Nr)rrrrÚ__hash__szBaseSpecifier.__hash__cCsdS)zq Returns a boolean representing whether or not the two Specifier like objects are equal. Nr)rÚotherrrrÚ__eq__$szBaseSpecifier.__eq__cCsdS)zu Returns a boolean representing whether or not the two Specifier like objects are not equal. Nr)rrrrrÚ__ne__+szBaseSpecifier.__ne__cCsdS)zg Returns whether or not pre-releases as a whole are allowed by this specifier. Nr)rrrrÚ prereleases2szBaseSpecifier.prereleasescCsdS)zd Sets whether or not pre-releases as a whole are allowed by this specifier. Nr)rÚvaluerrrr9sNcCsdS)zR Determines if the given item is contained within this specifier. Nr)rÚitemrrrrÚcontains@szBaseSpecifier.containscCsdS)z• Takes an iterable of items and filters them so that only items which are contained within this specifier are allowed in it. Nr)rÚiterablerrrrÚfilterFszBaseSpecifier.filter)N)N)r r rÚabcÚabstractmethodrrrrÚabstractpropertyrÚsetterrrrrrrrs rc@s eZdZiZd dd„Zdd„Zdd„Zd d „Zd d „Zd d„Z dd„Z dd„Z e dd„ƒZ e dd„ƒZe dd„ƒZejdd„ƒZdd„Zd!dd„Zd"dd„ZdS)#Ú_IndividualSpecifierÚNcCsF|jj|ƒ}|stdj|ƒƒ‚|jdƒjƒ|jdƒjƒf|_||_dS)NzInvalid specifier: '{0}'ÚoperatorÚversion)Ú_regexÚsearchr ÚformatÚgroupÚstripÚ_specÚ _prereleases)rÚspecrÚmatchrrrÚ__init__Rs   z_IndividualSpecifier.__init__cCs0|jdk rdj|jƒnd}dj|jjt|ƒ|ƒS)Nz, prereleases={0!r}r$z<{0}({1!r}{2})>)r-r)rÚ __class__r Ústr)rÚprerrrÚ__repr___s z_IndividualSpecifier.__repr__cCs dj|jŽS)Nz{0}{1})r)r,)rrrrrlsz_IndividualSpecifier.__str__cCs t|jƒS)N)Úhashr,)rrrrrosz_IndividualSpecifier.__hash__c CsLt|tƒr0y|j|ƒ}Wq@tk r,tSXnt||jƒs@tS|j|jkS)N)Ú isinstancerr1r ÚNotImplementedr,)rrrrrrrs  z_IndividualSpecifier.__eq__c CsLt|tƒr0y|j|ƒ}Wq@tk r,tSXnt||jƒs@tS|j|jkS)N)r6rr1r r7r,)rrrrrr}s  z_IndividualSpecifier.__ne__cCst|dj|j|ƒƒS)Nz _compare_{0})Úgetattrr)Ú _operators)rÚoprrrÚ _get_operatorˆsz"_IndividualSpecifier._get_operatorcCst|ttfƒst|ƒ}|S)N)r6r rr )rr&rrrÚ_coerce_version‹sz$_IndividualSpecifier._coerce_versioncCs |jdS)Nr)r,)rrrrr%�sz_IndividualSpecifier.operatorcCs |jdS)Nr)r,)rrrrr&”sz_IndividualSpecifier.versioncCs|jS)N)r-)rrrrr˜sz _IndividualSpecifier.prereleasescCs ||_dS)N)r-)rrrrrrœscCs |j|ƒS)N)r)rrrrrÚ __contains__ sz!_IndividualSpecifier.__contains__cCs<|dkr|j}|j|ƒ}|jr(| r(dS|j|jƒ||jƒS)NF)rr<Ú is_prereleaser;r%r&)rrrrrrr£s   z_IndividualSpecifier.containsccsŒd}g}d|dk r|ndi}xL|D]D}|j|ƒ}|j|f|Žr"|jr\|pL|j r\|j|ƒq"d}|Vq"W| rˆ|rˆx|D] }|VqzWdS)NFrT)r<rr>rÚappend)rrrZyieldedÚfound_prereleasesÚkwr&Úparsed_versionrrrr¶s       z_IndividualSpecifier.filter)r$N)N)N)r r rr9r0r4rrrrr;r<Úpropertyr%r&rr"r=rrrrrrr#Ns         r#c@sveZdZdZejdedejejBƒZdddddd d œZ d d „Z d d„Z dd„Z dd„Z dd„Zdd„Zdd„ZdS)ÚLegacySpecifieraÛ (?P(==|!=|<=|>=|<|>)) \s* (?P [^,;\s)]* # Since this is a "legacy" specifier, and the version # string can be just about anything, we match everything # except for whitespace, a semi-colon for marker support, # a closing paren since versions can be enclosed in # them, and a comma since it's a version separator. ) z^\s*z\s*$ÚequalÚ not_equalÚless_than_equalÚgreater_than_equalÚ less_thanÚ greater_than)z==z!=z<=z>=ú<ú>cCst|tƒstt|ƒƒ}|S)N)r6r r2)rr&rrrr<òs  zLegacySpecifier._coerce_versioncCs||j|ƒkS)N)r<)rÚ prospectiver.rrrÚ_compare_equal÷szLegacySpecifier._compare_equalcCs||j|ƒkS)N)r<)rrMr.rrrÚ_compare_not_equalúsz"LegacySpecifier._compare_not_equalcCs||j|ƒkS)N)r<)rrMr.rrrÚ_compare_less_than_equalýsz(LegacySpecifier._compare_less_than_equalcCs||j|ƒkS)N)r<)rrMr.rrrÚ_compare_greater_than_equalsz+LegacySpecifier._compare_greater_than_equalcCs||j|ƒkS)N)r<)rrMr.rrrÚ_compare_less_thansz"LegacySpecifier._compare_less_thancCs||j|ƒkS)N)r<)rrMr.rrrÚ_compare_greater_thansz%LegacySpecifier._compare_greater_thanN)r r rÚ _regex_strÚreÚcompileÚVERBOSEÚ IGNORECASEr'r9r<rNrOrPrQrRrSrrrrrDÖs  rDcstjˆƒ‡fdd„ƒ}|S)Ncst|tƒsdSˆ|||ƒS)NF)r6r)rrMr.)ÚfnrrÚwrapped s z)_require_version_compare..wrapped)Ú functoolsÚwraps)rYrZr)rYrÚ_require_version_compare sr]c @s¸eZdZdZejdedejejBƒZdddddd d d d œZ e d d„ƒZ e dd„ƒZ e dd„ƒZ e dd„ƒZe dd„ƒZe dd„ƒZe dd„ƒZdd„Zedd„ƒZejdd„ƒZd S)!Ú Specifiera (?P(~=|==|!=|<=|>=|<|>|===)) (?P (?: # The identity operators allow for an escape hatch that will # do an exact string match of the version you wish to install. # This will not be parsed by PEP 440 and we cannot determine # any semantic meaning from it. This operator is discouraged # but included entirely as an escape hatch. (?<====) # Only match for the identity operator \s* [^\s]* # We just match everything, except for whitespace # since we are only testing for strict identity. ) | (?: # The (non)equality operators allow for wild card and local # versions to be specified so we have to define these two # operators separately to enable that. (?<===|!=) # Only match for equals and not equals \s* v? (?:[0-9]+!)? # epoch [0-9]+(?:\.[0-9]+)* # release (?: # pre release [-_\.]? (a|b|c|rc|alpha|beta|pre|preview) [-_\.]? [0-9]* )? (?: # post release (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*) )? # You cannot use a wild card and a dev or local version # together so group them with a | and make them optional. (?: (?:[-_\.]?dev[-_\.]?[0-9]*)? # dev release (?:\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*)? # local | \.\* # Wild card syntax of .* )? ) | (?: # The compatible operator requires at least two digits in the # release segment. (?<=~=) # Only match for the compatible operator \s* v? (?:[0-9]+!)? # epoch [0-9]+(?:\.[0-9]+)+ # release (We have a + instead of a *) (?: # pre release [-_\.]? (a|b|c|rc|alpha|beta|pre|preview) [-_\.]? [0-9]* )? (?: # post release (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*) )? (?:[-_\.]?dev[-_\.]?[0-9]*)? # dev release ) | (?: # All other operators only allow a sub set of what the # (non)equality operators do. Specifically they do not allow # local versions to be specified nor do they allow the prefix # matching wild cards. (?=rKrLz===cCsNdjttjdd„t|ƒƒƒdd…ƒ}|d7}|jdƒ||ƒoL|jdƒ||ƒS) NÚ.cSs|jdƒ o|jdƒ S)NZpostZdev)Ú startswith)ÚxrrrÚ�s z/Specifier._compare_compatible..rz.*z>=z==éÿÿÿÿ)ÚjoinÚlistÚ itertoolsÚ takewhileÚ_version_splitr;)rrMr.ÚprefixrrrÚ_compare_compatible‚s   zSpecifier._compare_compatiblecCsp|jdƒrPt|jƒ}t|dd…ƒ}tt|ƒƒ}|dt|ƒ…}t||ƒ\}}nt|ƒ}|jsht|jƒ}||kS)Nz.*ééþÿÿÿ)ÚendswithrZpublicrhr2ÚlenÚ _pad_versionÚlocal)rrMr.rrrrN�s    zSpecifier._compare_equalcCs|j||ƒ S)N)rN)rrMr.rrrrOÀszSpecifier._compare_not_equalcCs |t|ƒkS)N)r)rrMr.rrrrPÄsz"Specifier._compare_less_than_equalcCs |t|ƒkS)N)r)rrMr.rrrrQÈsz%Specifier._compare_greater_than_equalcCs>t|ƒ}||ksdS|j r:|jr:t|jƒt|jƒkr:dSdS)NFT)rr>Ú base_version)rrMr.rrrrRÌszSpecifier._compare_less_thancCs`t|ƒ}||ksdS|j r:|jr:t|jƒt|jƒkr:dS|jdk r\t|jƒt|jƒkr\dSdS)NFT)rZis_postreleaserqrp)rrMr.rrrrSås zSpecifier._compare_greater_thancCst|ƒjƒt|ƒjƒkS)N)r2Úlower)rrMr.rrrÚ_compare_arbitraryszSpecifier._compare_arbitrarycCsR|jdk r|jS|j\}}|d krN|dkr@|jdƒr@|dd …}t|ƒjrNdSd S) Nú==ú>=ú<=ú~=ú===z.*rkTF)rtrurvrwrxrl)r-r,rmr r>)rr%r&rrrrs    zSpecifier.prereleasescCs ||_dS)N)r-)rrrrrrsN)r r rrTrUrVrWrXr'r9r]rjrNrOrPrQrRrSrsrCrr"rrrrr^s*^  #      r^z^([0-9]+)((?:a|b|c|rc)[0-9]+)$cCsDg}x:|jdƒD],}tj|ƒ}|r2|j|jƒƒq|j|ƒqW|S)Nr_)ÚsplitÚ _prefix_regexr(ÚextendÚgroupsr?)r&Úresultrr/rrrrh's rhc Csægg}}|jttjdd„|ƒƒƒ|jttjdd„|ƒƒƒ|j|t|dƒd…ƒ|j|t|dƒd…ƒ|jddgtdt|dƒt|dƒƒƒ|jddgtdt|dƒt|dƒƒƒttj|Žƒttj|ŽƒfS)NcSs|jƒS)N)Úisdigit)rarrrrb6sz_pad_version..cSs|jƒS)N)r~)rarrrrb7srrÚ0)r?rerfrgrnÚinsertÚmaxÚchain)ÚleftÚrightZ left_splitZ right_splitrrrro2s && roc@sŒeZdZddd„Zdd„Zdd„Zd d „Zd d „Zd d„Zdd„Z dd„Z dd„Z e dd„ƒZ e jdd„ƒZ dd„Zddd„Zd dd„ZdS)!Ú SpecifierSetr$Nc Csrdd„|jdƒDƒ}tƒ}xB|D]:}y|jt|ƒƒWq tk rX|jt|ƒƒYq Xq Wt|ƒ|_||_dS)NcSsg|]}|jƒr|jƒ‘qSr)r+)Ú.0Úsrrrú Rsz)SpecifierSet.__init__..ú,) ryÚsetÚaddr^r rDÚ frozensetÚ_specsr-)rZ specifiersrZparsedÚ specifierrrrr0Os  zSpecifierSet.__init__cCs*|jdk rdj|jƒnd}djt|ƒ|ƒS)Nz, prereleases={0!r}r$z)r-r)rr2)rr3rrrr4dszSpecifierSet.__repr__cCsdjtdd„|jDƒƒƒS)Nr‰css|]}t|ƒVqdS)N)r2)r†r‡rrrú nsz'SpecifierSet.__str__..)rdÚsortedr�)rrrrrmszSpecifierSet.__str__cCs t|jƒS)N)r5r�)rrrrrpszSpecifierSet.__hash__cCs˜t|tƒrt|ƒ}nt|tƒs"tStƒ}t|j|jBƒ|_|jdkrX|jdk rX|j|_n<|jdk rv|jdkrv|j|_n|j|jkrŒ|j|_ntdƒ‚|S)NzFCannot combine SpecifierSets with True and False prerelease overrides.)r6rr…r7rŒr�r-Ú ValueError)rrrŽrrrÚ__and__ss       zSpecifierSet.__and__cCsFt|tƒrt|ƒ}n&t|tƒr,tt|ƒƒ}nt|tƒs:tS|j|jkS)N)r6rr…r#r2r7r�)rrrrrrŠs    zSpecifierSet.__eq__cCsFt|tƒrt|ƒ}n&t|tƒr,tt|ƒƒ}nt|tƒs:tS|j|jkS)N)r6rr…r#r2r7r�)rrrrrr”s    zSpecifierSet.__ne__cCs t|jƒS)N)rnr�)rrrrÚ__len__žszSpecifierSet.__len__cCs t|jƒS)N)Úiterr�)rrrrÚ__iter__¡szSpecifierSet.__iter__cCs.|jdk r|jS|jsdStdd„|jDƒƒS)Ncss|] }|jVqdS)N)r)r†r‡rrrr�³sz+SpecifierSet.prereleases..)r-r�Úany)rrrrr¤s  zSpecifierSet.prereleasescCs ||_dS)N)r-)rrrrrrµscCs |j|ƒS)N)r)rrrrrr=¹szSpecifierSet.__contains__csNtˆttfƒstˆƒ‰ˆdkr$|j‰ˆ r4ˆjr4dSt‡‡fdd„|jDƒƒS)NFc3s|]}|jˆˆd�VqdS))rN)r)r†r‡)rrrrr�Õsz(SpecifierSet.contains..)r6r rr rr>Úallr�)rrrr)rrrr¼s  zSpecifierSet.containscCs¼|dkr|j}|jr:x |jD]}|j|t|ƒd�}qW|Sg}g}xZ|D]R}t|ttfƒsdt|ƒ}n|}t|tƒrtqH|jr�| r�|sš|j |ƒqH|j |ƒqHW| r´|r´|dkr´|S|SdS)N)r) rr�rÚboolr6r rr r>r?)rrrr.Zfilteredr@rrBrrrrÙs*      zSpecifierSet.filter)r$N)N)N)r r rr0r4rrr’rrr“r•rCrr"r=rrrrrrr…Ms      r…)Z __future__rrrrr[rfrUZ_compatrrr&rr r r‘r ÚABCMetaÚobjectrr#rDr]r^rVrzrhror…rrrrÚs&9 4   PK}>]¾²¤á˜˜&__pycache__/utils.cpython-36.opt-1.pycnu„[µü¤3 ‡Ì]¥ã@s2ddlmZmZmZddlZejdƒZdd„ZdS)é)Úabsolute_importÚdivisionÚprint_functionNz[-_.]+cCstjd|ƒjƒS)Nú-)Ú_canonicalize_regexÚsubÚlower)Úname©r ú/usr/lib/python3.6/utils.pyÚcanonicalize_name sr )Z __future__rrrÚreÚcompilerr r r r r Ús PK}>]¾²¤á˜˜ __pycache__/utils.cpython-36.pycnu„[µü¤3 ‡Ì]¥ã@s2ddlmZmZmZddlZejdƒZdd„ZdS)é)Úabsolute_importÚdivisionÚprint_functionNz[-_.]+cCstjd|ƒjƒS)Nú-)Ú_canonicalize_regexÚsubÚlower)Úname©r ú/usr/lib/python3.6/utils.pyÚcanonicalize_name sr )Z __future__rrrÚreÚcompilerr r r r r Ús PK}>]Z3_Â))(__pycache__/version.cpython-36.opt-1.pycnu„[µü¤3 ‡Ì]$-ã@sþddlmZmZmZddlZddlZddlZddlmZddddd gZ ej d d d d dddgƒZ dd„Z Gdd„de ƒZGdd„deƒZGdd„deƒZejdejƒZddddddœZdd„Zdd„ZdZGd d„deƒZd!d"„Zejd#ƒZd$d%„Zd&d'„ZdS)(é)Úabsolute_importÚdivisionÚprint_functionNé)ÚInfinityÚparseÚVersionÚ LegacyVersionÚInvalidVersionÚVERSION_PATTERNÚ_VersionÚepochÚreleaseÚdevÚpreÚpostÚlocalc Cs&yt|ƒStk r t|ƒSXdS)zÑ Parse the given version string and return either a :class:`Version` object or a :class:`LegacyVersion` object depending on if the given version is a valid PEP 440 version or a legacy version. N)rr r )Úversion©rú/usr/lib/python3.6/version.pyrsc@seZdZdZdS)r zF An invalid version was found, users should refer to PEP 440. N)Ú__name__Ú __module__Ú __qualname__Ú__doc__rrrrr $sc@sLeZdZdd„Zdd„Zdd„Zdd„Zd d „Zd d „Zd d„Z dd„Z dS)Ú _BaseVersioncCs t|jƒS)N)ÚhashÚ_key)ÚselfrrrÚ__hash__,sz_BaseVersion.__hash__cCs|j|dd„ƒS)NcSs||kS)Nr)ÚsÚorrrÚ0sz%_BaseVersion.__lt__..)Ú_compare)rÚotherrrrÚ__lt__/sz_BaseVersion.__lt__cCs|j|dd„ƒS)NcSs||kS)Nr)rr rrrr!3sz%_BaseVersion.__le__..)r")rr#rrrÚ__le__2sz_BaseVersion.__le__cCs|j|dd„ƒS)NcSs||kS)Nr)rr rrrr!6sz%_BaseVersion.__eq__..)r")rr#rrrÚ__eq__5sz_BaseVersion.__eq__cCs|j|dd„ƒS)NcSs||kS)Nr)rr rrrr!9sz%_BaseVersion.__ge__..)r")rr#rrrÚ__ge__8sz_BaseVersion.__ge__cCs|j|dd„ƒS)NcSs||kS)Nr)rr rrrr!<sz%_BaseVersion.__gt__..)r")rr#rrrÚ__gt__;sz_BaseVersion.__gt__cCs|j|dd„ƒS)NcSs||kS)Nr)rr rrrr!?sz%_BaseVersion.__ne__..)r")rr#rrrÚ__ne__>sz_BaseVersion.__ne__cCst|tƒstS||j|jƒS)N)Ú isinstancerÚNotImplementedr)rr#Úmethodrrrr"As z_BaseVersion._compareN) rrrrr$r%r&r'r(r)r"rrrrr*src@s`eZdZdd„Zdd„Zdd„Zedd„ƒZed d „ƒZed d „ƒZ ed d„ƒZ edd„ƒZ dS)r cCst|ƒ|_t|jƒ|_dS)N)ÚstrÚ_versionÚ_legacy_cmpkeyr)rrrrrÚ__init__Js zLegacyVersion.__init__cCs|jS)N)r.)rrrrÚ__str__NszLegacyVersion.__str__cCsdjtt|ƒƒƒS)Nz)ÚformatÚreprr-)rrrrÚ__repr__QszLegacyVersion.__repr__cCs|jS)N)r.)rrrrÚpublicTszLegacyVersion.publiccCs|jS)N)r.)rrrrÚ base_versionXszLegacyVersion.base_versioncCsdS)Nr)rrrrr\szLegacyVersion.localcCsdS)NFr)rrrrÚ is_prerelease`szLegacyVersion.is_prereleasecCsdS)NFr)rrrrÚis_postreleasedszLegacyVersion.is_postreleaseN) rrrr0r1r4Úpropertyr5r6rr7r8rrrrr Hs    z(\d+ | [a-z]+ | \.| -)Úczfinal-ú@)rÚpreviewú-ÚrcrccsbxVtj|ƒD]H}tj||ƒ}| s |dkr,q |dd…dkrJ|jdƒVq d|Vq WdVdS)NÚ.rÚ 0123456789éÚ*z*final)Ú_legacy_version_component_reÚsplitÚ_legacy_version_replacement_mapÚgetÚzfill)rÚpartrrrÚ_parse_version_partsrs rIcCs†d}g}xlt|jƒƒD]\}|jdƒrh|dkrJx|rH|ddkrH|jƒq.Wx|rf|ddkrf|jƒqLW|j|ƒqWt|ƒ}||fS) NrrBz*finalz*final-Z00000000éÿÿÿÿrJrJ)rIÚlowerÚ startswithÚpopÚappendÚtuple)rr ÚpartsrHrrrr/ƒs   r/a— v? (?: (?:(?P[0-9]+)!)? # epoch (?P[0-9]+(?:\.[0-9]+)*) # release segment (?P
                                          # pre-release
            [-_\.]?
            (?P(a|b|c|rc|alpha|beta|pre|preview))
            [-_\.]?
            (?P[0-9]+)?
        )?
        (?P                                         # post release
            (?:-(?P[0-9]+))
            |
            (?:
                [-_\.]?
                (?Ppost|rev|r)
                [-_\.]?
                (?P[0-9]+)?
            )
        )?
        (?P                                          # dev release
            [-_\.]?
            (?Pdev)
            [-_\.]?
            (?P[0-9]+)?
        )?
    )
    (?:\+(?P[a-z0-9]+(?:[-_\.][a-z0-9]+)*))?       # local version
c@s|eZdZejdedejejBƒZdd„Z	dd„Z
dd„Zed	d
„ƒZ
edd„ƒZed
d„ƒZedd„ƒZedd„ƒZdS)rz^\s*z\s*$c	Csà|jj|ƒ}|stdj|ƒƒ‚t|jdƒr8t|jdƒƒndtdd„|jdƒjdƒDƒƒt	|jdƒ|jd	ƒƒt	|jd
ƒ|jdƒp†|jdƒƒt	|jd
ƒ|jdƒƒt
|jdƒƒd�|_t|jj
|jj|jj|jj|jj|jjƒ|_dS)NzInvalid version: '{0}'r
rcss|]}t|ƒVqdS)N)Úint)Ú.0Úirrrú	Ïsz#Version.__init__..rr?Zpre_lZpre_nZpost_lZpost_n1Zpost_n2Zdev_lZdev_nr)r
rrrrr)Ú_regexÚsearchr
r2rÚgrouprQrOrDÚ_parse_letter_versionÚ_parse_local_versionr.Ú_cmpkeyr
rrrrrr)rrÚmatchrrrr0Æs.

zVersion.__init__cCsdjtt|ƒƒƒS)Nz)r2r3r-)rrrrr4észVersion.__repr__cCsîg}|jjdkr$|jdj|jjƒƒ|jdjdd„|jjDƒƒƒ|jjdk	rl|jdjdd„|jjDƒƒƒ|jjdk	r�|jdj|jjd	ƒƒ|jjdk	r´|jd
j|jjd	ƒƒ|jj	dk	rä|jdjdjdd„|jj	Dƒƒƒƒdj|ƒS)
Nrz{0}!r?css|]}t|ƒVqdS)N)r-)rRÚxrrrrTôsz"Version.__str__..Úcss|]}t|ƒVqdS)N)r-)rRr\rrrrTøsz.post{0}rz.dev{0}z+{0}css|]}t|ƒVqdS)N)r-)rRr\rrrrTs)
r.r
rNr2Újoinrrrrr)rrPrrrr1ìs zVersion.__str__cCst|ƒjddƒdS)Nú+rr)r-rD)rrrrr5
szVersion.publiccCsLg}|jjdkr$|jdj|jjƒƒ|jdjdd„|jjDƒƒƒdj|ƒS)Nrz{0}!r?css|]}t|ƒVqdS)N)r-)rRr\rrrrTsz'Version.base_version..r])r.r
rNr2r^r)rrPrrrr6s
zVersion.base_versioncCs$t|ƒ}d|kr |jddƒdSdS)Nr_r)r-rD)rZversion_stringrrrrsz
Version.localcCst|jjp|jjƒS)N)Úboolr.rr)rrrrr7!szVersion.is_prereleasecCst|jjƒS)N)r`r.r)rrrrr8%szVersion.is_postreleaseN)rrrÚreÚcompilerÚVERBOSEÚ
IGNORECASErUr0r4r1r9r5r6rr7r8rrrrr¿s
#
cCsx|rZ|dkrd}|jƒ}|dkr&d}n(|dkr4d}n|d
krBd	}n|dkrNd}|t|ƒfS|rt|rtd}|t|ƒfSdS)NrZalphaÚaZbetaÚbr:rr<r>ÚrevÚrr)r:rr<)rgrh)rKrQ)ZletterZnumberrrrrX*s 
rXz[\._-]cCs$|dk	r tdd„tj|ƒDƒƒSdS)zR
    Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve").
    Ncss&|]}|jƒs|jƒnt|ƒVqdS)N)ÚisdigitrKrQ)rRrHrrrrTRsz'_parse_local_version..)rOÚ_local_version_seperatorsrD)rrrrrYLsrYcCs˜ttttjdd„t|ƒƒƒƒƒ}|dkr@|dkr@|dk	r@t}n|dkrLt}|dkrZt}|dkrft}|dkrvt}ntdd„|Dƒƒ}||||||fS)NcSs|dkS)Nrr)r\rrrr!`sz_cmpkey..css*|]"}t|tƒr|dfnt|fVqdS)r]N)r*rQr)rRrSrrrrT…sz_cmpkey..)rOÚreversedÚlistÚ	itertoolsÚ	dropwhiler)r
rrrrrrrrrZWs&		
rZ)Z
__future__rrrÚcollectionsrmraZ_structuresrÚ__all__Ú
namedtuplerrÚ
ValueErrorr
Úobjectrr	rbrcrCrErIr/rrrXrjrYrZrrrrÚs.!
9k
PK}>]Z3_Â))"__pycache__/version.cpython-36.pycnu„[µü¤3

‡Ì]$-ã@sþddlmZmZmZddlZddlZddlZddlmZddddd	gZ	ej
d
ddd
dddgƒZdd„ZGdd„de
ƒZGdd„deƒZGdd„deƒZejdejƒZddddddœZdd„Zdd„ZdZGd d„deƒZd!d"„Zejd#ƒZd$d%„Zd&d'„ZdS)(é)Úabsolute_importÚdivisionÚprint_functionNé)ÚInfinityÚparseÚVersionÚ
LegacyVersionÚInvalidVersionÚVERSION_PATTERNÚ_VersionÚepochÚreleaseÚdevÚpreÚpostÚlocalcCs&yt|ƒStk
r t|ƒSXdS)zÑ
    Parse the given version string and return either a :class:`Version` object
    or a :class:`LegacyVersion` object depending on if the given version is
    a valid PEP 440 version or a legacy version.
    N)rr
r	)Úversion©rú/usr/lib/python3.6/version.pyrsc@seZdZdZdS)r
zF
    An invalid version was found, users should refer to PEP 440.
    N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__rrrrr
$sc@sLeZdZdd„Zdd„Zdd„Zdd„Zd	d
„Zdd„Zd
d„Z	dd„Z
dS)Ú_BaseVersioncCs
t|jƒS)N)ÚhashÚ_key)ÚselfrrrÚ__hash__,sz_BaseVersion.__hash__cCs|j|dd„ƒS)NcSs||kS)Nr)ÚsÚorrrÚ0sz%_BaseVersion.__lt__..)Ú_compare)rÚotherrrrÚ__lt__/sz_BaseVersion.__lt__cCs|j|dd„ƒS)NcSs||kS)Nr)rr rrrr!3sz%_BaseVersion.__le__..)r")rr#rrrÚ__le__2sz_BaseVersion.__le__cCs|j|dd„ƒS)NcSs||kS)Nr)rr rrrr!6sz%_BaseVersion.__eq__..)r")rr#rrrÚ__eq__5sz_BaseVersion.__eq__cCs|j|dd„ƒS)NcSs||kS)Nr)rr rrrr!9sz%_BaseVersion.__ge__..)r")rr#rrrÚ__ge__8sz_BaseVersion.__ge__cCs|j|dd„ƒS)NcSs||kS)Nr)rr rrrr!<sz%_BaseVersion.__gt__..)r")rr#rrrÚ__gt__;sz_BaseVersion.__gt__cCs|j|dd„ƒS)NcSs||kS)Nr)rr rrrr!?sz%_BaseVersion.__ne__..)r")rr#rrrÚ__ne__>sz_BaseVersion.__ne__cCst|tƒstS||j|jƒS)N)Ú
isinstancerÚNotImplementedr)rr#Úmethodrrrr"As
z_BaseVersion._compareN)rrrrr$r%r&r'r(r)r"rrrrr*src@s`eZdZdd„Zdd„Zdd„Zedd„ƒZed	d
„ƒZedd„ƒZ	ed
d„ƒZ
edd„ƒZdS)r	cCst|ƒ|_t|jƒ|_dS)N)ÚstrÚ_versionÚ_legacy_cmpkeyr)rrrrrÚ__init__Js
zLegacyVersion.__init__cCs|jS)N)r.)rrrrÚ__str__NszLegacyVersion.__str__cCsdjtt|ƒƒƒS)Nz)ÚformatÚreprr-)rrrrÚ__repr__QszLegacyVersion.__repr__cCs|jS)N)r.)rrrrÚpublicTszLegacyVersion.publiccCs|jS)N)r.)rrrrÚbase_versionXszLegacyVersion.base_versioncCsdS)Nr)rrrrr\szLegacyVersion.localcCsdS)NFr)rrrrÚ
is_prerelease`szLegacyVersion.is_prereleasecCsdS)NFr)rrrrÚis_postreleasedszLegacyVersion.is_postreleaseN)rrrr0r1r4Úpropertyr5r6rr7r8rrrrr	Hsz(\d+ | [a-z]+ | \.| -)Úczfinal-ú@)rÚpreviewú-ÚrcrccsbxVtj|ƒD]H}tj||ƒ}|s|dkr,q|dd…dkrJ|jdƒVqd|VqWdVdS)NÚ.rÚ
0123456789éÚ*z*final)Ú_legacy_version_component_reÚsplitÚ_legacy_version_replacement_mapÚgetÚzfill)rÚpartrrrÚ_parse_version_partsrsrIcCs†d}g}xlt|jƒƒD]\}|jdƒrh|dkrJx|rH|ddkrH|jƒq.Wx|rf|ddkrf|jƒqLW|j|ƒqWt|ƒ}||fS)	NrrBz*finalz*final-Z00000000éÿÿÿÿrJrJ)rIÚlowerÚ
startswithÚpopÚappendÚtuple)rr
ÚpartsrHrrrr/ƒs
r/a—
    v?
    (?:
        (?:(?P[0-9]+)!)?                           # epoch
        (?P[0-9]+(?:\.[0-9]+)*)                  # release segment
        (?P
                                          # pre-release
            [-_\.]?
            (?P(a|b|c|rc|alpha|beta|pre|preview))
            [-_\.]?
            (?P[0-9]+)?
        )?
        (?P                                         # post release
            (?:-(?P[0-9]+))
            |
            (?:
                [-_\.]?
                (?Ppost|rev|r)
                [-_\.]?
                (?P[0-9]+)?
            )
        )?
        (?P                                          # dev release
            [-_\.]?
            (?Pdev)
            [-_\.]?
            (?P[0-9]+)?
        )?
    )
    (?:\+(?P[a-z0-9]+(?:[-_\.][a-z0-9]+)*))?       # local version
c@s|eZdZejdedejejBƒZdd„Z	dd„Z
dd„Zed	d
„ƒZ
edd„ƒZed
d„ƒZedd„ƒZedd„ƒZdS)rz^\s*z\s*$c	Csà|jj|ƒ}|stdj|ƒƒ‚t|jdƒr8t|jdƒƒndtdd„|jdƒjdƒDƒƒt	|jdƒ|jd	ƒƒt	|jd
ƒ|jdƒp†|jdƒƒt	|jd
ƒ|jdƒƒt
|jdƒƒd�|_t|jj
|jj|jj|jj|jj|jjƒ|_dS)NzInvalid version: '{0}'r
rcss|]}t|ƒVqdS)N)Úint)Ú.0Úirrrú	Ïsz#Version.__init__..rr?Zpre_lZpre_nZpost_lZpost_n1Zpost_n2Zdev_lZdev_nr)r
rrrrr)Ú_regexÚsearchr
r2rÚgrouprQrOrDÚ_parse_letter_versionÚ_parse_local_versionr.Ú_cmpkeyr
rrrrrr)rrÚmatchrrrr0Æs.

zVersion.__init__cCsdjtt|ƒƒƒS)Nz)r2r3r-)rrrrr4észVersion.__repr__cCsîg}|jjdkr$|jdj|jjƒƒ|jdjdd„|jjDƒƒƒ|jjdk	rl|jdjdd„|jjDƒƒƒ|jjdk	r�|jdj|jjd	ƒƒ|jjdk	r´|jd
j|jjd	ƒƒ|jj	dk	rä|jdjdjdd„|jj	Dƒƒƒƒdj|ƒS)
Nrz{0}!r?css|]}t|ƒVqdS)N)r-)rRÚxrrrrTôsz"Version.__str__..Úcss|]}t|ƒVqdS)N)r-)rRr\rrrrTøsz.post{0}rz.dev{0}z+{0}css|]}t|ƒVqdS)N)r-)rRr\rrrrTs)
r.r
rNr2Újoinrrrrr)rrPrrrr1ìs zVersion.__str__cCst|ƒjddƒdS)Nú+rr)r-rD)rrrrr5
szVersion.publiccCsLg}|jjdkr$|jdj|jjƒƒ|jdjdd„|jjDƒƒƒdj|ƒS)Nrz{0}!r?css|]}t|ƒVqdS)N)r-)rRr\rrrrTsz'Version.base_version..r])r.r
rNr2r^r)rrPrrrr6s
zVersion.base_versioncCs$t|ƒ}d|kr |jddƒdSdS)Nr_r)r-rD)rZversion_stringrrrrsz
Version.localcCst|jjp|jjƒS)N)Úboolr.rr)rrrrr7!szVersion.is_prereleasecCst|jjƒS)N)r`r.r)rrrrr8%szVersion.is_postreleaseN)rrrÚreÚcompilerÚVERBOSEÚ
IGNORECASErUr0r4r1r9r5r6rr7r8rrrrr¿s
#
cCsx|rZ|dkrd}|jƒ}|dkr&d}n(|dkr4d}n|d
krBd	}n|dkrNd}|t|ƒfS|rt|rtd}|t|ƒfSdS)NrZalphaÚaZbetaÚbr:rr<r>ÚrevÚrr)r:rr<)rgrh)rKrQ)ZletterZnumberrrrrX*s 
rXz[\._-]cCs$|dk	r tdd„tj|ƒDƒƒSdS)zR
    Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve").
    Ncss&|]}|jƒs|jƒnt|ƒVqdS)N)ÚisdigitrKrQ)rRrHrrrrTRsz'_parse_local_version..)rOÚ_local_version_seperatorsrD)rrrrrYLsrYcCs˜ttttjdd„t|ƒƒƒƒƒ}|dkr@|dkr@|dk	r@t}n|dkrLt}|dkrZt}|dkrft}|dkrvt}ntdd„|Dƒƒ}||||||fS)NcSs|dkS)Nrr)r\rrrr!`sz_cmpkey..css*|]"}t|tƒr|dfnt|fVqdS)r]N)r*rQr)rRrSrrrrT…sz_cmpkey..)rOÚreversedÚlistÚ	itertoolsÚ	dropwhiler)r
rrrrrrrrrZWs&		
rZ)Z
__future__rrrÚcollectionsrmraZ_structuresrÚ__all__Ú
namedtuplerrÚ
ValueErrorr
Úobjectrr	rbrcrCrErIr/rrrXrjrYrZrrrrÚs.!
9k
PK}>]<)XÆÐÐ__about__.pynu„[µü¤# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function

__all__ = [
    "__title__", "__summary__", "__uri__", "__version__", "__author__",
    "__email__", "__license__", "__copyright__",
]

__title__ = "packaging"
__summary__ = "Core utilities for Python packages"
__uri__ = "https://github.com/pypa/packaging"

__version__ = "16.8"

__author__ = "Donald Stufft and individual contributors"
__email__ = "donald@stufft.io"

__license__ = "BSD or Apache License, Version 2.0"
__copyright__ = "Copyright 2014-2016 %s" % __author__
PK}>]�v–Ê__init__.pynu„[µü¤# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function

from .__about__ import (
    __author__, __copyright__, __email__, __license__, __summary__, __title__,
    __uri__, __version__
)

__all__ = [
    "__title__", "__summary__", "__uri__", "__version__", "__author__",
    "__email__", "__license__", "__copyright__",
]
PK}>]æiJã\\
_compat.pynu„[µü¤# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function

import sys


PY2 = sys.version_info[0] == 2
PY3 = sys.version_info[0] == 3

# flake8: noqa

if PY3:
    string_types = str,
else:
    string_types = basestring,


def with_metaclass(meta, *bases):
    """
    Create a base class with a metaclass.
    """
    # This requires a bit of explanation: the basic idea is to make a dummy
    # metaclass for one level of class instantiation that replaces itself with
    # the actual metaclass.
    class metaclass(meta):
        def __new__(cls, name, this_bases, d):
            return meta(name, bases, d)
    return type.__new__(metaclass, 'temporary_class', (), {})
PK}>]úý¤ˆˆ_structures.pynu„[µü¤# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function


class Infinity(object):

    def __repr__(self):
        return "Infinity"

    def __hash__(self):
        return hash(repr(self))

    def __lt__(self, other):
        return False

    def __le__(self, other):
        return False

    def __eq__(self, other):
        return isinstance(other, self.__class__)

    def __ne__(self, other):
        return not isinstance(other, self.__class__)

    def __gt__(self, other):
        return True

    def __ge__(self, other):
        return True

    def __neg__(self):
        return NegativeInfinity

Infinity = Infinity()


class NegativeInfinity(object):

    def __repr__(self):
        return "-Infinity"

    def __hash__(self):
        return hash(repr(self))

    def __lt__(self, other):
        return True

    def __le__(self, other):
        return True

    def __eq__(self, other):
        return isinstance(other, self.__class__)

    def __ne__(self, other):
        return not isinstance(other, self.__class__)

    def __gt__(self, other):
        return False

    def __ge__(self, other):
        return False

    def __neg__(self):
        return Infinity

NegativeInfinity = NegativeInfinity()
PK}>]Ü@}Hùù
markers.pynu„[µü¤# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function

import operator
import os
import platform
import sys

from pyparsing import ParseException, ParseResults, stringStart, stringEnd
from pyparsing import ZeroOrMore, Group, Forward, QuotedString
from pyparsing import Literal as L  # noqa

from ._compat import string_types
from .specifiers import Specifier, InvalidSpecifier


__all__ = [
    "InvalidMarker", "UndefinedComparison", "UndefinedEnvironmentName",
    "Marker", "default_environment",
]


class InvalidMarker(ValueError):
    """
    An invalid marker was found, users should refer to PEP 508.
    """


class UndefinedComparison(ValueError):
    """
    An invalid operation was attempted on a value that doesn't support it.
    """


class UndefinedEnvironmentName(ValueError):
    """
    A name was attempted to be used that does not exist inside of the
    environment.
    """


class Node(object):

    def __init__(self, value):
        self.value = value

    def __str__(self):
        return str(self.value)

    def __repr__(self):
        return "<{0}({1!r})>".format(self.__class__.__name__, str(self))

    def serialize(self):
        raise NotImplementedError


class Variable(Node):

    def serialize(self):
        return str(self)


class Value(Node):

    def serialize(self):
        return '"{0}"'.format(self)


class Op(Node):

    def serialize(self):
        return str(self)


VARIABLE = (
    L("implementation_version") |
    L("platform_python_implementation") |
    L("implementation_name") |
    L("python_full_version") |
    L("platform_release") |
    L("platform_version") |
    L("platform_machine") |
    L("platform_system") |
    L("python_version") |
    L("sys_platform") |
    L("os_name") |
    L("os.name") |  # PEP-345
    L("sys.platform") |  # PEP-345
    L("platform.version") |  # PEP-345
    L("platform.machine") |  # PEP-345
    L("platform.python_implementation") |  # PEP-345
    L("python_implementation") |  # undocumented setuptools legacy
    L("extra")
)
ALIASES = {
    'os.name': 'os_name',
    'sys.platform': 'sys_platform',
    'platform.version': 'platform_version',
    'platform.machine': 'platform_machine',
    'platform.python_implementation': 'platform_python_implementation',
    'python_implementation': 'platform_python_implementation'
}
VARIABLE.setParseAction(lambda s, l, t: Variable(ALIASES.get(t[0], t[0])))

VERSION_CMP = (
    L("===") |
    L("==") |
    L(">=") |
    L("<=") |
    L("!=") |
    L("~=") |
    L(">") |
    L("<")
)

MARKER_OP = VERSION_CMP | L("not in") | L("in")
MARKER_OP.setParseAction(lambda s, l, t: Op(t[0]))

MARKER_VALUE = QuotedString("'") | QuotedString('"')
MARKER_VALUE.setParseAction(lambda s, l, t: Value(t[0]))

BOOLOP = L("and") | L("or")

MARKER_VAR = VARIABLE | MARKER_VALUE

MARKER_ITEM = Group(MARKER_VAR + MARKER_OP + MARKER_VAR)
MARKER_ITEM.setParseAction(lambda s, l, t: tuple(t[0]))

LPAREN = L("(").suppress()
RPAREN = L(")").suppress()

MARKER_EXPR = Forward()
MARKER_ATOM = MARKER_ITEM | Group(LPAREN + MARKER_EXPR + RPAREN)
MARKER_EXPR << MARKER_ATOM + ZeroOrMore(BOOLOP + MARKER_EXPR)

MARKER = stringStart + MARKER_EXPR + stringEnd


def _coerce_parse_result(results):
    if isinstance(results, ParseResults):
        return [_coerce_parse_result(i) for i in results]
    else:
        return results


def _format_marker(marker, first=True):
    assert isinstance(marker, (list, tuple, string_types))

    # Sometimes we have a structure like [[...]] which is a single item list
    # where the single item is itself it's own list. In that case we want skip
    # the rest of this function so that we don't get extraneous () on the
    # outside.
    if (isinstance(marker, list) and len(marker) == 1 and
            isinstance(marker[0], (list, tuple))):
        return _format_marker(marker[0])

    if isinstance(marker, list):
        inner = (_format_marker(m, first=False) for m in marker)
        if first:
            return " ".join(inner)
        else:
            return "(" + " ".join(inner) + ")"
    elif isinstance(marker, tuple):
        return " ".join([m.serialize() for m in marker])
    else:
        return marker


_operators = {
    "in": lambda lhs, rhs: lhs in rhs,
    "not in": lambda lhs, rhs: lhs not in rhs,
    "<": operator.lt,
    "<=": operator.le,
    "==": operator.eq,
    "!=": operator.ne,
    ">=": operator.ge,
    ">": operator.gt,
}


def _eval_op(lhs, op, rhs):
    try:
        spec = Specifier("".join([op.serialize(), rhs]))
    except InvalidSpecifier:
        pass
    else:
        return spec.contains(lhs)

    oper = _operators.get(op.serialize())
    if oper is None:
        raise UndefinedComparison(
            "Undefined {0!r} on {1!r} and {2!r}.".format(op, lhs, rhs)
        )

    return oper(lhs, rhs)


_undefined = object()


def _get_env(environment, name):
    value = environment.get(name, _undefined)

    if value is _undefined:
        raise UndefinedEnvironmentName(
            "{0!r} does not exist in evaluation environment.".format(name)
        )

    return value


def _evaluate_markers(markers, environment):
    groups = [[]]

    for marker in markers:
        assert isinstance(marker, (list, tuple, string_types))

        if isinstance(marker, list):
            groups[-1].append(_evaluate_markers(marker, environment))
        elif isinstance(marker, tuple):
            lhs, op, rhs = marker

            if isinstance(lhs, Variable):
                lhs_value = _get_env(environment, lhs.value)
                rhs_value = rhs.value
            else:
                lhs_value = lhs.value
                rhs_value = _get_env(environment, rhs.value)

            groups[-1].append(_eval_op(lhs_value, op, rhs_value))
        else:
            assert marker in ["and", "or"]
            if marker == "or":
                groups.append([])

    return any(all(item) for item in groups)


def format_full_version(info):
    version = '{0.major}.{0.minor}.{0.micro}'.format(info)
    kind = info.releaselevel
    if kind != 'final':
        version += kind[0] + str(info.serial)
    return version


def default_environment():
    if hasattr(sys, 'implementation'):
        iver = format_full_version(sys.implementation.version)
        implementation_name = sys.implementation.name
    else:
        iver = '0'
        implementation_name = ''

    return {
        "implementation_name": implementation_name,
        "implementation_version": iver,
        "os_name": os.name,
        "platform_machine": platform.machine(),
        "platform_release": platform.release(),
        "platform_system": platform.system(),
        "platform_version": platform.version(),
        "python_full_version": platform.python_version(),
        "platform_python_implementation": platform.python_implementation(),
        "python_version": platform.python_version()[:3],
        "sys_platform": sys.platform,
    }


class Marker(object):

    def __init__(self, marker):
        try:
            self._markers = _coerce_parse_result(MARKER.parseString(marker))
        except ParseException as e:
            err_str = "Invalid marker: {0!r}, parse error at {1!r}".format(
                marker, marker[e.loc:e.loc + 8])
            raise InvalidMarker(err_str)

    def __str__(self):
        return _format_marker(self._markers)

    def __repr__(self):
        return "".format(str(self))

    def evaluate(self, environment=None):
        """Evaluate a marker.

        Return the boolean from evaluating the given marker against the
        environment. environment is an optional argument to override all or
        part of the determined environment.

        The environment is determined from the current Python process.
        """
        current_environment = default_environment()
        if environment is not None:
            current_environment.update(environment)

        return _evaluate_markers(self._markers, current_environment)
PK}>]u'{¯¯requirements.pynu„[µü¤# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function

import string
import re

from pyparsing import stringStart, stringEnd, originalTextFor, ParseException
from pyparsing import ZeroOrMore, Word, Optional, Regex, Combine
from pyparsing import Literal as L  # noqa
from six.moves.urllib import parse as urlparse

from .markers import MARKER_EXPR, Marker
from .specifiers import LegacySpecifier, Specifier, SpecifierSet


class InvalidRequirement(ValueError):
    """
    An invalid requirement was found, users should refer to PEP 508.
    """


ALPHANUM = Word(string.ascii_letters + string.digits)

LBRACKET = L("[").suppress()
RBRACKET = L("]").suppress()
LPAREN = L("(").suppress()
RPAREN = L(")").suppress()
COMMA = L(",").suppress()
SEMICOLON = L(";").suppress()
AT = L("@").suppress()

PUNCTUATION = Word("-_.")
IDENTIFIER_END = ALPHANUM | (ZeroOrMore(PUNCTUATION) + ALPHANUM)
IDENTIFIER = Combine(ALPHANUM + ZeroOrMore(IDENTIFIER_END))

NAME = IDENTIFIER("name")
EXTRA = IDENTIFIER

URI = Regex(r'[^ ]+')("url")
URL = (AT + URI)

EXTRAS_LIST = EXTRA + ZeroOrMore(COMMA + EXTRA)
EXTRAS = (LBRACKET + Optional(EXTRAS_LIST) + RBRACKET)("extras")

VERSION_PEP440 = Regex(Specifier._regex_str, re.VERBOSE | re.IGNORECASE)
VERSION_LEGACY = Regex(LegacySpecifier._regex_str, re.VERBOSE | re.IGNORECASE)

VERSION_ONE = VERSION_PEP440 ^ VERSION_LEGACY
VERSION_MANY = Combine(VERSION_ONE + ZeroOrMore(COMMA + VERSION_ONE),
                       joinString=",", adjacent=False)("_raw_spec")
_VERSION_SPEC = Optional(((LPAREN + VERSION_MANY + RPAREN) | VERSION_MANY))
_VERSION_SPEC.setParseAction(lambda s, l, t: t._raw_spec or '')

VERSION_SPEC = originalTextFor(_VERSION_SPEC)("specifier")
VERSION_SPEC.setParseAction(lambda s, l, t: t[1])

MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
MARKER_EXPR.setParseAction(
    lambda s, l, t: Marker(s[t._original_start:t._original_end])
)
MARKER_SEPERATOR = SEMICOLON
MARKER = MARKER_SEPERATOR + MARKER_EXPR

VERSION_AND_MARKER = VERSION_SPEC + Optional(MARKER)
URL_AND_MARKER = URL + Optional(MARKER)

NAMED_REQUIREMENT = \
    NAME + Optional(EXTRAS) + (URL_AND_MARKER | VERSION_AND_MARKER)

REQUIREMENT = stringStart + NAMED_REQUIREMENT + stringEnd


class Requirement(object):
    """Parse a requirement.

    Parse a given requirement string into its parts, such as name, specifier,
    URL, and extras. Raises InvalidRequirement on a badly-formed requirement
    string.
    """

    # TODO: Can we test whether something is contained within a requirement?
    #       If so how do we do that? Do we need to test against the _name_ of
    #       the thing as well as the version? What about the markers?
    # TODO: Can we normalize the name and extra name?

    def __init__(self, requirement_string):
        try:
            req = REQUIREMENT.parseString(requirement_string)
        except ParseException as e:
            raise InvalidRequirement(
                "Invalid requirement, parse error at \"{0!r}\"".format(
                    requirement_string[e.loc:e.loc + 8]))

        self.name = req.name
        if req.url:
            parsed_url = urlparse.urlparse(req.url)
            if not (parsed_url.scheme and parsed_url.netloc) or (
                    not parsed_url.scheme and not parsed_url.netloc):
                raise InvalidRequirement("Invalid URL given")
            self.url = req.url
        else:
            self.url = None
        self.extras = set(req.extras.asList() if req.extras else [])
        self.specifier = SpecifierSet(req.specifier)
        self.marker = req.marker if req.marker else None

    def __str__(self):
        parts = [self.name]

        if self.extras:
            parts.append("[{0}]".format(",".join(sorted(self.extras))))

        if self.specifier:
            parts.append(str(self.specifier))

        if self.url:
            parts.append("@ {0}".format(self.url))

        if self.marker:
            parts.append("; {0}".format(self.marker))

        return "".join(parts)

    def __repr__(self):
        return "".format(str(self))
PK}>]|EƒŒymym
specifiers.pynu„[µü¤# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function

import abc
import functools
import itertools
import re

from ._compat import string_types, with_metaclass
from .version import Version, LegacyVersion, parse


class InvalidSpecifier(ValueError):
    """
    An invalid specifier was found, users should refer to PEP 440.
    """


class BaseSpecifier(with_metaclass(abc.ABCMeta, object)):

    @abc.abstractmethod
    def __str__(self):
        """
        Returns the str representation of this Specifier like object. This
        should be representative of the Specifier itself.
        """

    @abc.abstractmethod
    def __hash__(self):
        """
        Returns a hash value for this Specifier like object.
        """

    @abc.abstractmethod
    def __eq__(self, other):
        """
        Returns a boolean representing whether or not the two Specifier like
        objects are equal.
        """

    @abc.abstractmethod
    def __ne__(self, other):
        """
        Returns a boolean representing whether or not the two Specifier like
        objects are not equal.
        """

    @abc.abstractproperty
    def prereleases(self):
        """
        Returns whether or not pre-releases as a whole are allowed by this
        specifier.
        """

    @prereleases.setter
    def prereleases(self, value):
        """
        Sets whether or not pre-releases as a whole are allowed by this
        specifier.
        """

    @abc.abstractmethod
    def contains(self, item, prereleases=None):
        """
        Determines if the given item is contained within this specifier.
        """

    @abc.abstractmethod
    def filter(self, iterable, prereleases=None):
        """
        Takes an iterable of items and filters them so that only items which
        are contained within this specifier are allowed in it.
        """


class _IndividualSpecifier(BaseSpecifier):

    _operators = {}

    def __init__(self, spec="", prereleases=None):
        match = self._regex.search(spec)
        if not match:
            raise InvalidSpecifier("Invalid specifier: '{0}'".format(spec))

        self._spec = (
            match.group("operator").strip(),
            match.group("version").strip(),
        )

        # Store whether or not this Specifier should accept prereleases
        self._prereleases = prereleases

    def __repr__(self):
        pre = (
            ", prereleases={0!r}".format(self.prereleases)
            if self._prereleases is not None
            else ""
        )

        return "<{0}({1!r}{2})>".format(
            self.__class__.__name__,
            str(self),
            pre,
        )

    def __str__(self):
        return "{0}{1}".format(*self._spec)

    def __hash__(self):
        return hash(self._spec)

    def __eq__(self, other):
        if isinstance(other, string_types):
            try:
                other = self.__class__(other)
            except InvalidSpecifier:
                return NotImplemented
        elif not isinstance(other, self.__class__):
            return NotImplemented

        return self._spec == other._spec

    def __ne__(self, other):
        if isinstance(other, string_types):
            try:
                other = self.__class__(other)
            except InvalidSpecifier:
                return NotImplemented
        elif not isinstance(other, self.__class__):
            return NotImplemented

        return self._spec != other._spec

    def _get_operator(self, op):
        return getattr(self, "_compare_{0}".format(self._operators[op]))

    def _coerce_version(self, version):
        if not isinstance(version, (LegacyVersion, Version)):
            version = parse(version)
        return version

    @property
    def operator(self):
        return self._spec[0]

    @property
    def version(self):
        return self._spec[1]

    @property
    def prereleases(self):
        return self._prereleases

    @prereleases.setter
    def prereleases(self, value):
        self._prereleases = value

    def __contains__(self, item):
        return self.contains(item)

    def contains(self, item, prereleases=None):
        # Determine if prereleases are to be allowed or not.
        if prereleases is None:
            prereleases = self.prereleases

        # Normalize item to a Version or LegacyVersion, this allows us to have
        # a shortcut for ``"2.0" in Specifier(">=2")
        item = self._coerce_version(item)

        # Determine if we should be supporting prereleases in this specifier
        # or not, if we do not support prereleases than we can short circuit
        # logic if this version is a prereleases.
        if item.is_prerelease and not prereleases:
            return False

        # Actually do the comparison to determine if this item is contained
        # within this Specifier or not.
        return self._get_operator(self.operator)(item, self.version)

    def filter(self, iterable, prereleases=None):
        yielded = False
        found_prereleases = []

        kw = {"prereleases": prereleases if prereleases is not None else True}

        # Attempt to iterate over all the values in the iterable and if any of
        # them match, yield them.
        for version in iterable:
            parsed_version = self._coerce_version(version)

            if self.contains(parsed_version, **kw):
                # If our version is a prerelease, and we were not set to allow
                # prereleases, then we'll store it for later incase nothing
                # else matches this specifier.
                if (parsed_version.is_prerelease and not
                        (prereleases or self.prereleases)):
                    found_prereleases.append(version)
                # Either this is not a prerelease, or we should have been
                # accepting prereleases from the begining.
                else:
                    yielded = True
                    yield version

        # Now that we've iterated over everything, determine if we've yielded
        # any values, and if we have not and we have any prereleases stored up
        # then we will go ahead and yield the prereleases.
        if not yielded and found_prereleases:
            for version in found_prereleases:
                yield version


class LegacySpecifier(_IndividualSpecifier):

    _regex_str = (
        r"""
        (?P(==|!=|<=|>=|<|>))
        \s*
        (?P
            [^,;\s)]* # Since this is a "legacy" specifier, and the version
                      # string can be just about anything, we match everything
                      # except for whitespace, a semi-colon for marker support,
                      # a closing paren since versions can be enclosed in
                      # them, and a comma since it's a version separator.
        )
        """
    )

    _regex = re.compile(
        r"^\s*" + _regex_str + r"\s*$", re.VERBOSE | re.IGNORECASE)

    _operators = {
        "==": "equal",
        "!=": "not_equal",
        "<=": "less_than_equal",
        ">=": "greater_than_equal",
        "<": "less_than",
        ">": "greater_than",
    }

    def _coerce_version(self, version):
        if not isinstance(version, LegacyVersion):
            version = LegacyVersion(str(version))
        return version

    def _compare_equal(self, prospective, spec):
        return prospective == self._coerce_version(spec)

    def _compare_not_equal(self, prospective, spec):
        return prospective != self._coerce_version(spec)

    def _compare_less_than_equal(self, prospective, spec):
        return prospective <= self._coerce_version(spec)

    def _compare_greater_than_equal(self, prospective, spec):
        return prospective >= self._coerce_version(spec)

    def _compare_less_than(self, prospective, spec):
        return prospective < self._coerce_version(spec)

    def _compare_greater_than(self, prospective, spec):
        return prospective > self._coerce_version(spec)


def _require_version_compare(fn):
    @functools.wraps(fn)
    def wrapped(self, prospective, spec):
        if not isinstance(prospective, Version):
            return False
        return fn(self, prospective, spec)
    return wrapped


class Specifier(_IndividualSpecifier):

    _regex_str = (
        r"""
        (?P(~=|==|!=|<=|>=|<|>|===))
        (?P
            (?:
                # The identity operators allow for an escape hatch that will
                # do an exact string match of the version you wish to install.
                # This will not be parsed by PEP 440 and we cannot determine
                # any semantic meaning from it. This operator is discouraged
                # but included entirely as an escape hatch.
                (?<====)  # Only match for the identity operator
                \s*
                [^\s]*    # We just match everything, except for whitespace
                          # since we are only testing for strict identity.
            )
            |
            (?:
                # The (non)equality operators allow for wild card and local
                # versions to be specified so we have to define these two
                # operators separately to enable that.
                (?<===|!=)            # Only match for equals and not equals

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)*   # release
                (?:                   # pre release
                    [-_\.]?
                    (a|b|c|rc|alpha|beta|pre|preview)
                    [-_\.]?
                    [0-9]*
                )?
                (?:                   # post release
                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                )?

                # You cannot use a wild card and a dev or local version
                # together so group them with a | and make them optional.
                (?:
                    (?:[-_\.]?dev[-_\.]?[0-9]*)?         # dev release
                    (?:\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*)? # local
                    |
                    \.\*  # Wild card syntax of .*
                )?
            )
            |
            (?:
                # The compatible operator requires at least two digits in the
                # release segment.
                (?<=~=)               # Only match for the compatible operator

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)+   # release  (We have a + instead of a *)
                (?:                   # pre release
                    [-_\.]?
                    (a|b|c|rc|alpha|beta|pre|preview)
                    [-_\.]?
                    [0-9]*
                )?
                (?:                                   # post release
                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                )?
                (?:[-_\.]?dev[-_\.]?[0-9]*)?          # dev release
            )
            |
            (?:
                # All other operators only allow a sub set of what the
                # (non)equality operators do. Specifically they do not allow
                # local versions to be specified nor do they allow the prefix
                # matching wild cards.
                (?=": "greater_than_equal",
        "<": "less_than",
        ">": "greater_than",
        "===": "arbitrary",
    }

    @_require_version_compare
    def _compare_compatible(self, prospective, spec):
        # Compatible releases have an equivalent combination of >= and ==. That
        # is that ~=2.2 is equivalent to >=2.2,==2.*. This allows us to
        # implement this in terms of the other specifiers instead of
        # implementing it ourselves. The only thing we need to do is construct
        # the other specifiers.

        # We want everything but the last item in the version, but we want to
        # ignore post and dev releases and we want to treat the pre-release as
        # it's own separate segment.
        prefix = ".".join(
            list(
                itertools.takewhile(
                    lambda x: (not x.startswith("post") and not
                               x.startswith("dev")),
                    _version_split(spec),
                )
            )[:-1]
        )

        # Add the prefix notation to the end of our string
        prefix += ".*"

        return (self._get_operator(">=")(prospective, spec) and
                self._get_operator("==")(prospective, prefix))

    @_require_version_compare
    def _compare_equal(self, prospective, spec):
        # We need special logic to handle prefix matching
        if spec.endswith(".*"):
            # In the case of prefix matching we want to ignore local segment.
            prospective = Version(prospective.public)
            # Split the spec out by dots, and pretend that there is an implicit
            # dot in between a release segment and a pre-release segment.
            spec = _version_split(spec[:-2])  # Remove the trailing .*

            # Split the prospective version out by dots, and pretend that there
            # is an implicit dot in between a release segment and a pre-release
            # segment.
            prospective = _version_split(str(prospective))

            # Shorten the prospective version to be the same length as the spec
            # so that we can determine if the specifier is a prefix of the
            # prospective version or not.
            prospective = prospective[:len(spec)]

            # Pad out our two sides with zeros so that they both equal the same
            # length.
            spec, prospective = _pad_version(spec, prospective)
        else:
            # Convert our spec string into a Version
            spec = Version(spec)

            # If the specifier does not have a local segment, then we want to
            # act as if the prospective version also does not have a local
            # segment.
            if not spec.local:
                prospective = Version(prospective.public)

        return prospective == spec

    @_require_version_compare
    def _compare_not_equal(self, prospective, spec):
        return not self._compare_equal(prospective, spec)

    @_require_version_compare
    def _compare_less_than_equal(self, prospective, spec):
        return prospective <= Version(spec)

    @_require_version_compare
    def _compare_greater_than_equal(self, prospective, spec):
        return prospective >= Version(spec)

    @_require_version_compare
    def _compare_less_than(self, prospective, spec):
        # Convert our spec to a Version instance, since we'll want to work with
        # it as a version.
        spec = Version(spec)

        # Check to see if the prospective version is less than the spec
        # version. If it's not we can short circuit and just return False now
        # instead of doing extra unneeded work.
        if not prospective < spec:
            return False

        # This special case is here so that, unless the specifier itself
        # includes is a pre-release version, that we do not accept pre-release
        # versions for the version mentioned in the specifier (e.g. <3.1 should
        # not match 3.1.dev0, but should match 3.0.dev0).
        if not spec.is_prerelease and prospective.is_prerelease:
            if Version(prospective.base_version) == Version(spec.base_version):
                return False

        # If we've gotten to here, it means that prospective version is both
        # less than the spec version *and* it's not a pre-release of the same
        # version in the spec.
        return True

    @_require_version_compare
    def _compare_greater_than(self, prospective, spec):
        # Convert our spec to a Version instance, since we'll want to work with
        # it as a version.
        spec = Version(spec)

        # Check to see if the prospective version is greater than the spec
        # version. If it's not we can short circuit and just return False now
        # instead of doing extra unneeded work.
        if not prospective > spec:
            return False

        # This special case is here so that, unless the specifier itself
        # includes is a post-release version, that we do not accept
        # post-release versions for the version mentioned in the specifier
        # (e.g. >3.1 should not match 3.0.post0, but should match 3.2.post0).
        if not spec.is_postrelease and prospective.is_postrelease:
            if Version(prospective.base_version) == Version(spec.base_version):
                return False

        # Ensure that we do not allow a local version of the version mentioned
        # in the specifier, which is techincally greater than, to match.
        if prospective.local is not None:
            if Version(prospective.base_version) == Version(spec.base_version):
                return False

        # If we've gotten to here, it means that prospective version is both
        # greater than the spec version *and* it's not a pre-release of the
        # same version in the spec.
        return True

    def _compare_arbitrary(self, prospective, spec):
        return str(prospective).lower() == str(spec).lower()

    @property
    def prereleases(self):
        # If there is an explicit prereleases set for this, then we'll just
        # blindly use that.
        if self._prereleases is not None:
            return self._prereleases

        # Look at all of our specifiers and determine if they are inclusive
        # operators, and if they are if they are including an explicit
        # prerelease.
        operator, version = self._spec
        if operator in ["==", ">=", "<=", "~=", "==="]:
            # The == specifier can include a trailing .*, if it does we
            # want to remove before parsing.
            if operator == "==" and version.endswith(".*"):
                version = version[:-2]

            # Parse the version, and if it is a pre-release than this
            # specifier allows pre-releases.
            if parse(version).is_prerelease:
                return True

        return False

    @prereleases.setter
    def prereleases(self, value):
        self._prereleases = value


_prefix_regex = re.compile(r"^([0-9]+)((?:a|b|c|rc)[0-9]+)$")


def _version_split(version):
    result = []
    for item in version.split("."):
        match = _prefix_regex.search(item)
        if match:
            result.extend(match.groups())
        else:
            result.append(item)
    return result


def _pad_version(left, right):
    left_split, right_split = [], []

    # Get the release segment of our versions
    left_split.append(list(itertools.takewhile(lambda x: x.isdigit(), left)))
    right_split.append(list(itertools.takewhile(lambda x: x.isdigit(), right)))

    # Get the rest of our versions
    left_split.append(left[len(left_split[0]):])
    right_split.append(right[len(right_split[0]):])

    # Insert our padding
    left_split.insert(
        1,
        ["0"] * max(0, len(right_split[0]) - len(left_split[0])),
    )
    right_split.insert(
        1,
        ["0"] * max(0, len(left_split[0]) - len(right_split[0])),
    )

    return (
        list(itertools.chain(*left_split)),
        list(itertools.chain(*right_split)),
    )


class SpecifierSet(BaseSpecifier):

    def __init__(self, specifiers="", prereleases=None):
        # Split on , to break each indidivual specifier into it's own item, and
        # strip each item to remove leading/trailing whitespace.
        specifiers = [s.strip() for s in specifiers.split(",") if s.strip()]

        # Parsed each individual specifier, attempting first to make it a
        # Specifier and falling back to a LegacySpecifier.
        parsed = set()
        for specifier in specifiers:
            try:
                parsed.add(Specifier(specifier))
            except InvalidSpecifier:
                parsed.add(LegacySpecifier(specifier))

        # Turn our parsed specifiers into a frozen set and save them for later.
        self._specs = frozenset(parsed)

        # Store our prereleases value so we can use it later to determine if
        # we accept prereleases or not.
        self._prereleases = prereleases

    def __repr__(self):
        pre = (
            ", prereleases={0!r}".format(self.prereleases)
            if self._prereleases is not None
            else ""
        )

        return "".format(str(self), pre)

    def __str__(self):
        return ",".join(sorted(str(s) for s in self._specs))

    def __hash__(self):
        return hash(self._specs)

    def __and__(self, other):
        if isinstance(other, string_types):
            other = SpecifierSet(other)
        elif not isinstance(other, SpecifierSet):
            return NotImplemented

        specifier = SpecifierSet()
        specifier._specs = frozenset(self._specs | other._specs)

        if self._prereleases is None and other._prereleases is not None:
            specifier._prereleases = other._prereleases
        elif self._prereleases is not None and other._prereleases is None:
            specifier._prereleases = self._prereleases
        elif self._prereleases == other._prereleases:
            specifier._prereleases = self._prereleases
        else:
            raise ValueError(
                "Cannot combine SpecifierSets with True and False prerelease "
                "overrides."
            )

        return specifier

    def __eq__(self, other):
        if isinstance(other, string_types):
            other = SpecifierSet(other)
        elif isinstance(other, _IndividualSpecifier):
            other = SpecifierSet(str(other))
        elif not isinstance(other, SpecifierSet):
            return NotImplemented

        return self._specs == other._specs

    def __ne__(self, other):
        if isinstance(other, string_types):
            other = SpecifierSet(other)
        elif isinstance(other, _IndividualSpecifier):
            other = SpecifierSet(str(other))
        elif not isinstance(other, SpecifierSet):
            return NotImplemented

        return self._specs != other._specs

    def __len__(self):
        return len(self._specs)

    def __iter__(self):
        return iter(self._specs)

    @property
    def prereleases(self):
        # If we have been given an explicit prerelease modifier, then we'll
        # pass that through here.
        if self._prereleases is not None:
            return self._prereleases

        # If we don't have any specifiers, and we don't have a forced value,
        # then we'll just return None since we don't know if this should have
        # pre-releases or not.
        if not self._specs:
            return None

        # Otherwise we'll see if any of the given specifiers accept
        # prereleases, if any of them do we'll return True, otherwise False.
        return any(s.prereleases for s in self._specs)

    @prereleases.setter
    def prereleases(self, value):
        self._prereleases = value

    def __contains__(self, item):
        return self.contains(item)

    def contains(self, item, prereleases=None):
        # Ensure that our item is a Version or LegacyVersion instance.
        if not isinstance(item, (LegacyVersion, Version)):
            item = parse(item)

        # Determine if we're forcing a prerelease or not, if we're not forcing
        # one for this particular filter call, then we'll use whatever the
        # SpecifierSet thinks for whether or not we should support prereleases.
        if prereleases is None:
            prereleases = self.prereleases

        # We can determine if we're going to allow pre-releases by looking to
        # see if any of the underlying items supports them. If none of them do
        # and this item is a pre-release then we do not allow it and we can
        # short circuit that here.
        # Note: This means that 1.0.dev1 would not be contained in something
        #       like >=1.0.devabc however it would be in >=1.0.debabc,>0.0.dev0
        if not prereleases and item.is_prerelease:
            return False

        # We simply dispatch to the underlying specs here to make sure that the
        # given version is contained within all of them.
        # Note: This use of all() here means that an empty set of specifiers
        #       will always return True, this is an explicit design decision.
        return all(
            s.contains(item, prereleases=prereleases)
            for s in self._specs
        )

    def filter(self, iterable, prereleases=None):
        # Determine if we're forcing a prerelease or not, if we're not forcing
        # one for this particular filter call, then we'll use whatever the
        # SpecifierSet thinks for whether or not we should support prereleases.
        if prereleases is None:
            prereleases = self.prereleases

        # If we have any specifiers, then we want to wrap our iterable in the
        # filter method for each one, this will act as a logical AND amongst
        # each specifier.
        if self._specs:
            for spec in self._specs:
                iterable = spec.filter(iterable, prereleases=bool(prereleases))
            return iterable
        # If we do not have any specifiers, then we need to have a rough filter
        # which will filter out any pre-releases, unless there are no final
        # releases, and which will filter out LegacyVersion in general.
        else:
            filtered = []
            found_prereleases = []

            for item in iterable:
                # Ensure that we some kind of Version class for this item.
                if not isinstance(item, (LegacyVersion, Version)):
                    parsed_version = parse(item)
                else:
                    parsed_version = item

                # Filter out any item which is parsed as a LegacyVersion
                if isinstance(parsed_version, LegacyVersion):
                    continue

                # Store any item which is a pre-release for later unless we've
                # already found a final version or we are accepting prereleases
                if parsed_version.is_prerelease and not prereleases:
                    if not filtered:
                        found_prereleases.append(item)
                else:
                    filtered.append(item)

            # If we've found no items except for pre-releases, then we'll go
            # ahead and use the pre-releases
            if not filtered and found_prereleases and prereleases is None:
                return found_prereleases

            return filtered
PK}>]Åê'¥¥utils.pynu„[µü¤# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function

import re


_canonicalize_regex = re.compile(r"[-_.]+")


def canonicalize_name(name):
    # This is taken from PEP 503.
    return _canonicalize_regex.sub("-", name).lower()
PK}>]ïÆ¡$-$-
version.pynu„[µü¤# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function

import collections
import itertools
import re

from ._structures import Infinity


__all__ = [
    "parse", "Version", "LegacyVersion", "InvalidVersion", "VERSION_PATTERN"
]


_Version = collections.namedtuple(
    "_Version",
    ["epoch", "release", "dev", "pre", "post", "local"],
)


def parse(version):
    """
    Parse the given version string and return either a :class:`Version` object
    or a :class:`LegacyVersion` object depending on if the given version is
    a valid PEP 440 version or a legacy version.
    """
    try:
        return Version(version)
    except InvalidVersion:
        return LegacyVersion(version)


class InvalidVersion(ValueError):
    """
    An invalid version was found, users should refer to PEP 440.
    """


class _BaseVersion(object):

    def __hash__(self):
        return hash(self._key)

    def __lt__(self, other):
        return self._compare(other, lambda s, o: s < o)

    def __le__(self, other):
        return self._compare(other, lambda s, o: s <= o)

    def __eq__(self, other):
        return self._compare(other, lambda s, o: s == o)

    def __ge__(self, other):
        return self._compare(other, lambda s, o: s >= o)

    def __gt__(self, other):
        return self._compare(other, lambda s, o: s > o)

    def __ne__(self, other):
        return self._compare(other, lambda s, o: s != o)

    def _compare(self, other, method):
        if not isinstance(other, _BaseVersion):
            return NotImplemented

        return method(self._key, other._key)


class LegacyVersion(_BaseVersion):

    def __init__(self, version):
        self._version = str(version)
        self._key = _legacy_cmpkey(self._version)

    def __str__(self):
        return self._version

    def __repr__(self):
        return "".format(repr(str(self)))

    @property
    def public(self):
        return self._version

    @property
    def base_version(self):
        return self._version

    @property
    def local(self):
        return None

    @property
    def is_prerelease(self):
        return False

    @property
    def is_postrelease(self):
        return False


_legacy_version_component_re = re.compile(
    r"(\d+ | [a-z]+ | \.| -)", re.VERBOSE,
)

_legacy_version_replacement_map = {
    "pre": "c", "preview": "c", "-": "final-", "rc": "c", "dev": "@",
}


def _parse_version_parts(s):
    for part in _legacy_version_component_re.split(s):
        part = _legacy_version_replacement_map.get(part, part)

        if not part or part == ".":
            continue

        if part[:1] in "0123456789":
            # pad for numeric comparison
            yield part.zfill(8)
        else:
            yield "*" + part

    # ensure that alpha/beta/candidate are before final
    yield "*final"


def _legacy_cmpkey(version):
    # We hardcode an epoch of -1 here. A PEP 440 version can only have a epoch
    # greater than or equal to 0. This will effectively put the LegacyVersion,
    # which uses the defacto standard originally implemented by setuptools,
    # as before all PEP 440 versions.
    epoch = -1

    # This scheme is taken from pkg_resources.parse_version setuptools prior to
    # it's adoption of the packaging library.
    parts = []
    for part in _parse_version_parts(version.lower()):
        if part.startswith("*"):
            # remove "-" before a prerelease tag
            if part < "*final":
                while parts and parts[-1] == "*final-":
                    parts.pop()

            # remove trailing zeros from each series of numeric parts
            while parts and parts[-1] == "00000000":
                parts.pop()

        parts.append(part)
    parts = tuple(parts)

    return epoch, parts

# Deliberately not anchored to the start and end of the string, to make it
# easier for 3rd party code to reuse
VERSION_PATTERN = r"""
    v?
    (?:
        (?:(?P[0-9]+)!)?                           # epoch
        (?P[0-9]+(?:\.[0-9]+)*)                  # release segment
        (?P
                                          # pre-release
            [-_\.]?
            (?P(a|b|c|rc|alpha|beta|pre|preview))
            [-_\.]?
            (?P[0-9]+)?
        )?
        (?P                                         # post release
            (?:-(?P[0-9]+))
            |
            (?:
                [-_\.]?
                (?Ppost|rev|r)
                [-_\.]?
                (?P[0-9]+)?
            )
        )?
        (?P                                          # dev release
            [-_\.]?
            (?Pdev)
            [-_\.]?
            (?P[0-9]+)?
        )?
    )
    (?:\+(?P[a-z0-9]+(?:[-_\.][a-z0-9]+)*))?       # local version
"""


class Version(_BaseVersion):

    _regex = re.compile(
        r"^\s*" + VERSION_PATTERN + r"\s*$",
        re.VERBOSE | re.IGNORECASE,
    )

    def __init__(self, version):
        # Validate the version and parse it into pieces
        match = self._regex.search(version)
        if not match:
            raise InvalidVersion("Invalid version: '{0}'".format(version))

        # Store the parsed out pieces of the version
        self._version = _Version(
            epoch=int(match.group("epoch")) if match.group("epoch") else 0,
            release=tuple(int(i) for i in match.group("release").split(".")),
            pre=_parse_letter_version(
                match.group("pre_l"),
                match.group("pre_n"),
            ),
            post=_parse_letter_version(
                match.group("post_l"),
                match.group("post_n1") or match.group("post_n2"),
            ),
            dev=_parse_letter_version(
                match.group("dev_l"),
                match.group("dev_n"),
            ),
            local=_parse_local_version(match.group("local")),
        )

        # Generate a key which will be used for sorting
        self._key = _cmpkey(
            self._version.epoch,
            self._version.release,
            self._version.pre,
            self._version.post,
            self._version.dev,
            self._version.local,
        )

    def __repr__(self):
        return "".format(repr(str(self)))

    def __str__(self):
        parts = []

        # Epoch
        if self._version.epoch != 0:
            parts.append("{0}!".format(self._version.epoch))

        # Release segment
        parts.append(".".join(str(x) for x in self._version.release))

        # Pre-release
        if self._version.pre is not None:
            parts.append("".join(str(x) for x in self._version.pre))

        # Post-release
        if self._version.post is not None:
            parts.append(".post{0}".format(self._version.post[1]))

        # Development release
        if self._version.dev is not None:
            parts.append(".dev{0}".format(self._version.dev[1]))

        # Local version segment
        if self._version.local is not None:
            parts.append(
                "+{0}".format(".".join(str(x) for x in self._version.local))
            )

        return "".join(parts)

    @property
    def public(self):
        return str(self).split("+", 1)[0]

    @property
    def base_version(self):
        parts = []

        # Epoch
        if self._version.epoch != 0:
            parts.append("{0}!".format(self._version.epoch))

        # Release segment
        parts.append(".".join(str(x) for x in self._version.release))

        return "".join(parts)

    @property
    def local(self):
        version_string = str(self)
        if "+" in version_string:
            return version_string.split("+", 1)[1]

    @property
    def is_prerelease(self):
        return bool(self._version.dev or self._version.pre)

    @property
    def is_postrelease(self):
        return bool(self._version.post)


def _parse_letter_version(letter, number):
    if letter:
        # We consider there to be an implicit 0 in a pre-release if there is
        # not a numeral associated with it.
        if number is None:
            number = 0

        # We normalize any letters to their lower case form
        letter = letter.lower()

        # We consider some words to be alternate spellings of other words and
        # in those cases we want to normalize the spellings to our preferred
        # spelling.
        if letter == "alpha":
            letter = "a"
        elif letter == "beta":
            letter = "b"
        elif letter in ["c", "pre", "preview"]:
            letter = "rc"
        elif letter in ["rev", "r"]:
            letter = "post"

        return letter, int(number)
    if not letter and number:
        # We assume if we are given a number, but we are not given a letter
        # then this is using the implicit post release syntax (e.g. 1.0-1)
        letter = "post"

        return letter, int(number)


_local_version_seperators = re.compile(r"[\._-]")


def _parse_local_version(local):
    """
    Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve").
    """
    if local is not None:
        return tuple(
            part.lower() if not part.isdigit() else int(part)
            for part in _local_version_seperators.split(local)
        )


def _cmpkey(epoch, release, pre, post, dev, local):
    # When we compare a release version, we want to compare it with all of the
    # trailing zeros removed. So we'll use a reverse the list, drop all the now
    # leading zeros until we come to something non zero, then take the rest
    # re-reverse it back into the correct order and make it a tuple and use
    # that for our sorting key.
    release = tuple(
        reversed(list(
            itertools.dropwhile(
                lambda x: x == 0,
                reversed(release),
            )
        ))
    )

    # We need to "trick" the sorting algorithm to put 1.0.dev0 before 1.0a0.
    # We'll do this by abusing the pre segment, but we _only_ want to do this
    # if there is not a pre or a post segment. If we have one of those then
    # the normal sorting rules will handle this case correctly.
    if pre is None and post is None and dev is not None:
        pre = -Infinity
    # Versions without a pre-release (except as noted above) should sort after
    # those with one.
    elif pre is None:
        pre = Infinity

    # Versions without a post segment should sort before those with one.
    if post is None:
        post = -Infinity

    # Versions without a development segment should sort after those with one.
    if dev is None:
        dev = Infinity

    if local is None:
        # Versions without a local segment should sort before those with one.
        local = -Infinity
    else:
        # Versions with a local segment need that segment parsed to implement
        # the sorting rules in PEP440.
        # - Alpha numeric segments sort before numeric segments
        # - Alpha numeric segments sort lexicographically
        # - Numeric segments sort numerically
        # - Shorter versions sort before longer versions when the prefixes
        #   match exactly
        local = tuple(
            (i, "") if isinstance(i, int) else (-Infinity, i)
            for i in local
        )

    return epoch, release, pre, post, dev, local
PK}>]9\Dú*__pycache__/__about__.cpython-36.opt-1.pycnu„[µü¤PK}>]9\Dú$Ù__pycache__/__about__.cpython-36.pycnu„[µü¤PK}>]¨£ˆgÝÝ)¬__pycache__/__init__.cpython-36.opt-1.pycnu„[µü¤PK}>]¨£ˆgÝÝ#â__pycache__/__init__.cpython-36.pycnu„[µü¤PK}>]_€•œœ(
__pycache__/_compat.cpython-36.opt-1.pycnu„[µü¤PK}>]_€•œœ"__pycache__/_compat.cpython-36.pycnu„[µü¤PK}>]¬†þ=Ý
Ý
,ô__pycache__/_structures.cpython-36.opt-1.pycnu„[µü¤PK}>]¬†þ=Ý
Ý
&-__pycache__/_structures.cpython-36.pycnu„[µü¤PK}>]eå!å!(`(__pycache__/markers.cpython-36.opt-1.pycnu„[µü¤PK}>]fòâO"O""�J__pycache__/markers.cpython-36.pycnu„[µü¤PK}>]m__pycache__/requirements.cpython-36.opt-1.pycnu„[µü¤PK}>]]€MM+N‹__pycache__/specifiers.cpython-36.opt-1.pycnu„[µü¤PK}>]€MM%ÈØ__pycache__/specifiers.cpython-36.pycnu„[µü¤PK}>]¾²¤á˜˜&<&__pycache__/utils.cpython-36.opt-1.pycnu„[µü¤PK}>]¾²¤á˜˜ *(__pycache__/utils.cpython-36.pycnu„[µü¤PK}>]Z3_Â))(*__pycache__/version.cpython-36.opt-1.pycnu„[µü¤PK}>]Z3_Â))"€S__pycache__/version.cpython-36.pycnu„[µü¤PK}>]<)XÆÐÐè|__about__.pynu„[µü¤PK}>]�v–Êô__init__.pynu„[µü¤PK}>]æiJã\\
0‚_compat.pynu„[µü¤PK}>]úý¤ˆˆÆ…_structures.pynu„[µü¤PK}>]Ü@}Hùù
Œ‹markers.pynu„[µü¤PK}>]u'{¯¯¿«requirements.pynu„[µü¤PK}>]|EƒŒymym
­¼specifiers.pynu„[µü¤PK}>]Åê'¥¥c*utils.pynu„[µü¤PK}>]ïÆ¡$-$-
@,version.pynu„[µü¤PKÛ	žY