+
    SBiz                     J   ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIt^ RIH	t	H
t
HtHtHtHtHtHtHt R t ! R R]P&                  4      t]P                  P*                  t ! R R4      t ! R	 R
4      t ! R R4      t ! R R4      t ! R R4      t ! R R4      tR# )    N)SpecifierSet)	Distribution
EntryPointRequirementVersionConflict
WorkingSetparse_requirementsparse_version	safe_namesafe_versionc                `    \         P                  ! V 4      w  r\        VR4       \        W4      # )z$s -> (s0,s1), (s1,s2), (s2, s3), ...N)	itertoolsteenextzip)iterableabs   &  G/usr/lib/python3.14/site-packages/pkg_resources/tests/test_resources.pypairwiser      s%    =="DADMq9    c                   T   a  ] tR t^ t o RtV 3R lR ltV 3R lR ltR tR tRt	V t
R	# )
MetadatazAMock object to return metadata as if from an on-disk distributionc                   < V ^8  d   QhRR/# )   returnN )format__classdict__s   "r   __annotate__Metadata.__annotate__#   s     $ $$ $r   c                &    \        V4      V n        R # N)dictmetadata)selfpairss   &*r   __init__Metadata.__init__#   s    Ur   c                    < V ^8  d   QhRS[ /# )r   r   )bool)r   r   s   "r   r    r!   &   s     % %D %r   c                    WP                   9   # r#   r%   r&   names   &&r   has_metadataMetadata.has_metadata&   s    }}$$r   c                (    V P                   V,          # r#   r-   r.   s   &&r   get_metadataMetadata.get_metadata)   s    }}T""r   c                L    \         P                  ! V P                  V4      4      # r#   )pkg_resourcesyield_linesr3   r.   s   &&r   get_metadata_linesMetadata.get_metadata_lines,   s    (():):4)@AAr   r-   N)__name__
__module____qualname____firstlineno____doc__r(   r0   r3   r8   __static_attributes____classdictcell__r   s   @r   r   r       s-     K$ $% %#B Br   r   c                     a  ] tR t^3t o R tR tR tR tR tR t	RR lt
R t]P                  P                  ]! ]R	4      '       * R
R7      tR t]R 4       t]R 4       tR tR tR tR tR tR tR tR t]P                  P;                  ]P>                  R,          R8H  ;'       d    ]P>                  P@                  R8g  RR7      R 4       t!Rt"V t#R# )
TestDistroc                   \         P                  ! . R R R7      p\        V4      . 8X  g   Q hVR,          . 8X  g   Q hVP                  \	        R4      4       VP                  \	        R4      4       VP                  \	        R4      4       VR,          '       g   Q h\        V4      R.8X  g   Q h. ROpVR,           Uu. uF  q3P
                  NK  	  upV8X  g   Q hVP                  VR,          ^,          4       VR,           Uu. uF  q3P
                  NK  	  upRR.8X  g   Q hVP                  \	        R	4      4       VR,           Uu. uF  q3P
                  NK  	  up. RO8X  g   Q h\        . 4      p\	        R4      p\	        R4      p\        R4      w  pVP                  Wt4      P
                  R
8X  g   Q hVP                  V4       VP                  Wt4      P
                  R8X  g   Q h\        . 4      pVP                  V4       VP                  V4       \        P                  ! \        4      ;_uu_ 4        VP                  Wt4       R R R 4       \        . 4      pVP                  V4       VP                  V4       VP                  V4       VP                  Wt4      P
                  R8X  g   Q hR # u upi u upi u upi   + '       g   i     L; i)N)platformpythonFooPkgFooPkg-1.3_1.eggzFooPkg-1.4-py2.4-win32.eggFooPkg-1.2-py2.4.eggfoopkg1.41.2zFooPkg-1.9.egg1.9zFooPkg>=1.3)rK   1.3-1rL   )rM   rK   rL   )r6   Environmentlistadddist_from_fnversionremover   r	   
best_matchpytestraisesr   )r&   adexpecteddistwsfoo12foo14reqs   &       r   testCollectionTestDistro.testCollection4   sF   &&rDFBx2~~(|r!!!
|./0
|89:
|234 (|||BxH:%%% +)+H66(BBB 			"X,q/")+H665%.HHH 	|,-.)+H66:OOOO^349:#M2 }}S%--666
u}}S%--666 ^
u
u]]?++MM#" , ^
u
u
u}}S%--666C 7 7 7" ,+s   =J8J=
K<KK	c                    VP                   R 8X  g   Q hVP                  R8X  g   Q hVP                  R8X  g   Q hVP                  R8X  g   Q hVP                  R8X  g   Q hVP
                  \        R4      8X  g   Q hR# )rG   rJ   z	1.3.post12.4win32rN   N)project_namekeyrS   
py_versionrE   parsed_versionr
   r&   ds   &&r   checkFooPkgTestDistro.checkFooPkgg   su    ~~)))uu   yyK'''||u$$$zzW$$$=#9999r   c                   \        R RRRRR7      pV P                  V4       \        R 4      pVP                  \        P                  P
                   R\        P                  P                   28X  g   Q hVP                  e   Q hR# )
/some/pathrG   rN   rb   rc   )rd   rS   rf   rE   .N)r   rj   rf   sysversion_infomajorminorrE   rh   s   & r   testDistroBasicsTestDistro.testDistroBasicso   s|    !
 	&||#"2"2"8"8!93;K;K;Q;Q:RSSSSzz!!!r   c                v    \        R 4      pV P                  V4       \        R4      pV P                  V4       R# )z FooPkg-1.3.post1-py2.4-win32.eggz%FooPkg-1.3.post1-py2.4-win32.egg-infoN)rR   rj   rh   s   & r   testDistroParseTestDistro.testDistroParse}   s4    ;<@Ar   c           	     Z    \        R RRR\        R4      R7      pV P                  V4       R# )rm   rG   rb   rc   )rd   rf   rE   r%   N)zPKG-INFOz%Metadata-Version: 1.0
Version: 1.3-1
)r   r   rj   rh   s   & r   testDistroMetadataTestDistro.testDistroMetadata   s1    !UV
 	r   c                2    \        R \        RV34      R7      # )z/foodepends.txtr-   )r   r   )r&   txts   &&r   distRequiresTestDistro.distRequires   s    FX}c6J-KLLr   c                l    \        VP                  V4      4      \        \        V4      4      8X  g   Q hR # r#   )rP   requiresr	   )r&   rZ   r}   extrass   &&&&r   checkRequiresTestDistro.checkRequires   s)    DMM&)*d3Ec3J.KKKKr   c                Z    R F$  pV P                  V P                  V4      V4       K&  	  R# )Twisted>=1.5N)r   zTwisted>=1.5
ZConfig>=2.0)r   r~   )r&   vs   & r   testDistroDependsSimple"TestDistro.testDistroDependsSimple   s'    =At003Q7 >r   __dir__z8object.__dir__ necessary for self.__dir__ implementationreasonc                F    \         P                  ! 4       p\        V4       R # r#   )r6   r   dirrh   s   & r   test_distribution_dir TestDistro.test_distribution_dir   s    &&(Ar   c                    \         P                  ! 4       pVP                  4       pR V9  g   Q hRVP                  n        VP                  4       p\        V4      \        V4      ^,           8X  g   Q hR V9   g   Q hR# )	test_attrN)r6   r   r   	_providerr   lenr&   ri   beforeafters   &   r   +test_distribution_dir_includes_provider_dir6TestDistro.test_distribution_dir_includes_provider_dir   sh    &&(&((( $		5zS[1_,,,e###r   c                    \         P                  ! 4       pVP                  4       pR V9  g   Q hRVP                  n        VP                  4       p\        V4      \        V4      8X  g   Q hR V9  g   Q hR# )
_test_attrN)r6   r   r   r   r   r   r   s   &   r   =test_distribution_dir_ignores_provider_dir_leading_underscoreHTestDistro.test_distribution_dir_ignores_provider_dir_leading_underscore   sd    &&(6)))!%		5zS[(((5(((r   c                   \         P                  ! . 4      p\        . 4      p\        VP	                  . V4      4      . 8X  g   Q h\
        P                  ! \         P                  4      ;_uu_ 4        VP	                  \        R 4      V4       RRR4       \        P                  ! R\        R
4      R7      pVP                  V4       VP                  \        P                  ! R4      4       \        ^4       FO  p\        VP	                  \        R 4      V4      4      pWS.8X  g   Q h\        \        VP                  V4      4       KQ  	  \
        P                  ! \        4      ;_uu_ 4        VP	                  \        R4      V4       RRR4       \        . 4      p\
        P                  ! \         P                  4      ;_uu_ 4        VP	                  \        R4      V4       RRR4       \        P                  ! R\        R4      R7      pVP                  V4       \        VP	                  \        R4      V4      4      W6.8X  g   Q h\
        P                  ! \        4      ;_uu_ 4       pVP	                  \        R4      V4       RRR4       R	pXP                   P#                  4       V8X  g   Q hR#   + '       g   i     EL0; i  + '       g   i     ELI; i  + '       g   i     EL; i  + '       g   i     Lq; i)FooN/foo_dir/Foo-1.2.eggr-   zFoo-0.9.eggzFoo==0.9zFoo[bar]z/foo_dir/Baz-2.1.eggzFoo==1.2
Foo!=1.2z-Foo 0.9 is installed but Foo==1.2 is required)r|   z[bar]
Baz>=2.0)r|   r   )r6   rO   r   rP   resolverV   rW   DistributionNotFoundr	   r   from_filenamer   rQ   rangemapr   valuereport)	r&   rX   r[   r   itargetsBazvcmsgs	   &        r   testResolveTestDistro.testResolve   s!   &&r*^BJJr2&'2---]]===>>JJ)%0"5 ? (("@A
 	s
|))-89 qA2::&8&?DEGe###RVVW%&  ]]?++JJ)*5r: ,^ ]]===>>JJ)*5r: ?(("X6L-M
 	s BJJ1*=rBCzQQQ]]?++rJJ)*>?D , >xx C'''E ?>> ,++
 ?>> ,+s0   0J3+KK*K/3K	K	K,	/K?	c                    \         P                  ! . 4      p\        . 4      pVP                  \	        R4      V4      p\        V4      . 8X  g   Q hR# )z5Environment markers are evaluated at resolution time.zFoo;python_version<'2'N)r6   rO   r   r   r	   rP   )r&   rX   r[   ress   &   r   +test_environment_marker_evaluation_negative6TestDistro.test_environment_marker_evaluation_negative   sB    &&r*^jj+,DErJCyBr   c                    \         P                  ! . 4      p\        . 4      p\        P                  ! R 4      pVP                  V4       VP                  \        R4      V4      p\        V4      V.8X  g   Q hR# )/foo_dir/Foo-1.2.dist-infozFoo;python_version>='2'N)	r6   rO   r   r   r   rQ   r   r	   rP   )r&   rX   r[   r   r   s   &    r   +test_environment_marker_evaluation_positive6TestDistro.test_environment_marker_evaluation_positive   sb    &&r*^(()EF
sjj+,EFKCySE!!!r   c                V   \        R4      w  p\        R4      w  p\        P                  ! W!P                  /4      pVP	                  V4      '       g   Q h\        R4      w  p\        R4      w  p\        P                  ! W!P                  /4      pVP	                  V4      '       g   Q hR# )za
If one package foo requires bar without any extras,
markers should pass for bar without extras.
foozbar;python_version>='2'zfoo[]N)r	   r6   
_ReqExtrasr   markers_pass)r&   
parent_reqr^   
req_extrass   &   r   )test_environment_marker_evaluation_called4TestDistro.test_environment_marker_evaluation_called   s    
 +51#$=>"--s4E4E.FG
&&s++++*73#$=>"--s4E4E.FG
&&s++++r   c                   \         P                  ! . 4      p\        . 4      p\        P                  ! R\        R4      R7      pVP                  V4       \        VP                  \        R4      V4      4      V.8X  g   Q h\        P                  ! R4      pVP                  V4       \        VP                  \        R4      V4      4      pWSV.8X  g   Q hR# )8Extras are also evaluated as markers at resolution time.r   r-   r   /foo_dir/quux-1.0.dist-infozFoo[baz]N)METADATAz5Provides-Extra: baz
Requires-Dist: quux; extra=='baz'
r6   rO   r   r   r   r   rQ   rP   r   r	   r&   rX   r[   r   quuxr   s   &     r   "test_marker_evaluation_with_extras-TestDistro.test_marker_evaluation_with_extras   s    &&r*^(((  
 	sBJJ1%8"=>3%GGG))*GH
t2::0<bABDk!!!r   c                   \         P                  ! . 4      p\        . 4      p\        P                  ! R\        R4      R7      pVP                  V4       \        VP                  \        R4      V4      4      V.8X  g   Q h\        P                  ! R4      pVP                  V4       \        VP                  \        R4      V4      4      pWSV.8X  g   Q hR# )r   r   r-   r   r   zFoo[baz-lightyear]N)r   zIProvides-Extra: baz-lightyear
Requires-Dist: quux; extra=='baz-lightyear'r   r   s   &     r   ,test_marker_evaluation_with_extras_normlized7TestDistro.test_marker_evaluation_with_extras_normlized  s    &&r*^(((  
 	sBJJ1%8"=>3%GGG))*GH
t2::01EFKLDk!!!r   c                   \         P                  ! . 4      p\        . 4      p\        P                  ! R \        R4      R7      pVP                  V4       \        P                  ! R4      pVP                  V4       \        P                  ! R4      pVP                  V4       \        VP                  \        R4      V4      4      p\        V4      WTV.8X  g   Q hR# )r   r-   r   z/foo_dir/fred-0.1.dist-infozFoo[baz,bar]N)r   zlProvides-Extra: baz
Requires-Dist: quux; extra=='baz'
Provides-Extra: bar
Requires-Dist: fred; extra=='bar'
)r6   rO   r   r   r   r   rQ   rP   r   r	   sorted)r&   rX   r[   r   r   fredr   s   &      r   +test_marker_evaluation_with_multiple_extras6TestDistro.test_marker_evaluation_with_multiple_extras!  s    &&r*^(((  	
 	s))*GH
t))*GH
t2::0@"EFc{t3////r   c                   \         P                  ! . 4      p\        . 4      p\        P                  ! R \        R4      R7      p\        P                  ! R\        R4      R7      p\        P                  ! R\        R	4      R7      p\        P                  ! R4      pW4WV3 F  pVP                  V4       K  	  \        VP                  \        R4      V4      4      pWWTV.8X  g   Q hR# )
z/foo_dir/a-0.2.dist-infor-   z/foo_dir/b-0.3.dist-infoz/foo_dir/c-1.0.dist-infoz/foo_dir/foo-0.1.dist-infor   N)r   zRequires-Dist: c[a])r   zRequires-Dist: c[b])r   z]Provides-Extra: a
Requires-Dist: b;extra=='a'
Provides-Extra: b
Requires-Dist: foo;extra=='b'r   )	r&   rX   r[   r   r   cr   rZ   r   s	   &        r   'test_marker_evaluation_with_extras_loop2TestDistro.test_marker_evaluation_with_extras_loop6  s    &&r*^&&&AB
 &&&AB
 &&&  	
 (()EF1NDFF4L #2::05r:;!n$$$r   :Nr   Nfinalz/https://github.com/python/cpython/issues/103632c                   V P                  R 4      pV P                  VR4       V P                  VRP                  4       R.4       V P                  VRP                  4       R.4       V P                  VRP                  4       RR.4       V P                  VRP                  4       RR.4       \        P                  ! \
        P                  4      ;_uu_ 4        VP                  R.4       R	R	R	4       R	#   + '       g   i     R	# ; i)
z
            Twisted>=1.5
            [docgen]
            ZConfig>=2.0
            docutils>=0.3
            [fastcgi]
            fcgiapp>=0.1r   z'Twisted>=1.5 ZConfig>=2.0 docutils>=0.3docgenzTwisted>=1.5 fcgiapp>=0.1fastcgiz4Twisted>=1.5 ZConfig>=2.0 docutils>=0.3 fcgiapp>=0.1z4Twisted>=1.5 fcgiapp>=0.1 ZConfig>=2.0 docutils>=0.3r   N)r~   r   splitrV   rW   r6   UnknownExtrar   rh   s   & r   testDistroDependsOptions#TestDistro.testDistroDependsOptionsQ  s    
 
 	1n-8>>@8*	
 	19??AI;OBHHJy!	

 	BHHJ!	

 ]]=5566JJw 7666s   C77D	r   N)r   )      )$r:   r;   r<   r=   r_   rj   rs   rv   ry   r~   r   r   rV   markskipifhasattrobjectneeds_object_dirr   r   r   r   r   r   r   r   r   r   r   xfailro   rp   releaselevelr   r?   r@   rA   s   @r   rC   rC   3   s	    17f:"ML8 {{))FI&&I * 
 $ $ ) )((T","$"&0*%6 [['TTC,<,<,I,IW,T@   	 r   rC   c                   ,   a  ] tR tRt o R tR tRtV tR# )TestWorkingSetir  c                v   \        . 4      p\        P                  ! R 4      pVP                  V4       \	        \        R4      4      p\        P                  ! \        4      ;_uu_ 4       pVP                  V4       RRR4       RpXP                  P                  4       V8X  g   Q hR#   + '       g   i     L5; i)r   zFoo<1.2Nz,Foo 1.2 is installed but Foo<1.2 is required)r   r   r   rQ   r   r	   rV   rW   r   findr   r   )r&   r[   r   r^   r   r   s   &     r   test_find_conflicting$TestWorkingSet.test_find_conflictings  s    ^(()?@
s %i01]]?++rGGCL , =xx C'''	 ,+s   )B((B8	c                   \        . 4      p\        R
4      p\        P                  ! RVR7      pVP	                  V4       \        R4      p\        P                  ! RVR7      pVP	                  V4       \        P                  ! R4      pVP	                  V4       \        P                  ! R4      pVP	                  V4       \
        P                  ! \        4      ;_uu_ 4       pVP                  \        R4      4       RRR4       RpV\        \        R	.4      4      ,          pXP                  P                  4       V8X  g   Q hR#   + '       g   i     LQ; i)z}
A ContextualVersionConflict should be raised when a requirement
conflicts with a prior requirement for a different package.
z/foo_dir/Foo-1.0.eggr-   z/foo_dir/Bar-1.0.eggz/foo_dir/Baz-1.0.eggz/foo_dir/Baz-2.0.eggzFoo
Bar
Nz1Baz 1.0 is installed but Baz==2.0 is required by Bar)r|   zBaz==1.0)r|   zBaz==2.0)r   r   r   r   rQ   rV   rW   r   r   r	   reprsetr   r   )r&   r[   mdr   r   r   r   r   s   &       r   !test_resolve_conflicts_with_prior0TestWorkingSet.test_resolve_conflicts_with_prior  s     ^12(()?"M
s12(()?"M
s(()?@
s(()?@
s]]?++rJJ),78 , BtCL!!xx C''' ,+s   $EE	r   N)r:   r;   r<   r=   r   r   r?   r@   rA   s   @r   r   r   r  s     (( (r   r   c            
          a  ] tR tRt o R tR tR tR tRt]	P                  P                  R]4      R 4       tR tR	 t]! ]! R
RR.4      ]! RRR.RR.4      ]! RRR.R7      R7      tRtR tR tR tRtV tR# )TestEntryPointsi  c                    VP                   R 8X  g   Q hVP                  R8X  g   Q hVP                  R8X  g   Q hVP                  R8X  g   Q hVP	                  4       \
        J g   Q hRp\        V4      V8X  g   Q hR# )r   "pkg_resources.tests.test_resources<foo = pkg_resources.tests.test_resources:TestEntryPoints [x]N)r   )x)r/   module_nameattrsr   loadr   str)r&   epexpects   && r   assertfieldsTestEntryPoints.assertfields  sw    ww%~~!EEEExx////yyF"""wwyO+++O2w&   r   c                R    \         P                  ! R \        R4      R7      V n        R# )rI   r-   N)zrequires.txtz[x])r   r   r   rZ   )r&   methods   &&r   setup_methodTestEntryPoints.setup_method  s     .."X6M-N
	r   c                ^    \        R RR.R.V P                  4      pV P                  V4       R# )r   r   r   r   N)r   rZ   r   r&   r   s   & r   
testBasicsTestEntryPoints.testBasics  s4    0EII
 	"r   c                J   R p\         P                  ! WP                  4      pV P                  V4       \         P                  ! R4      pVP                  R8X  g   Q hVP
                  R8X  g   Q hVP                  R
8X  g   Q hVP                  R8X  g   Q h\         P                  ! R4      pVP                  R8X  g   Q hVP
                  R8X  g   Q hVP                  R8X  g   Q hVP                  R
8X  g   Q hRp\         P                  ! V4      pVP                  R8X  g   Q hR	# )r   zbar baz=  spammity[PING]zbar bazspammityz fizzly =  wocka:foofizzlywockaz0html+mako = mako.ext.pygmentplugin:MakoHtmlLexerz	html+makoNr   )ping)r   )r   parserZ   r   r/   r   r   r   )r&   sr   specs   &   r   	testParseTestEntryPoints.testParse  s   Ja+"89ww)###~~+++xx2~~yyI%%%45ww("""~~(((xx8###yyB Bd#ww+%%%r   reject_specc                    \         P                  ! \        4      ;_uu_ 4        \        P                  ! V4       R R R 4       R #   + '       g   i     R # ; ir#   )rV   rW   
ValueErrorr   r  )r&   r  s   &&r   test_reject_spec TestEntryPoints.test_reject_spec  s.    ]]:&&[) '&&&s   AA	c                    \         P                  P                  4       pRP                  ! R/ \	        4       B p\
        P                  ! V4      pVP                  V8X  g   Q hR# )z,
Allow any printable character in the name.
z{name} = module:attrNr   )string	printablestripr   localsr   r  r/   )r&   r/   r  r   s   &   r   test_printable_name#TestEntryPoints.test_printable_name  sM    
 %%'%,,8vx8d#ww$r   c                >   \        V4      \        V P                  4      8X  g   Q hV P                  P                  4        F  w  r#VP                  V4      P                  VP                  8X  g   Q hVP                  V4      P
                  VP
                  8X  g   Q h\        VP                  V4      P                  4      \        VP                  4      8X  g   Q h\        VP                  V4      P                  4      \        VP                  4      8X  d   K  Q h	  R # r#   )	r   submap_expectitemsgetr/   r   r   r   r   )r&   mre   r   s   &&  r   checkSubMapTestEntryPoints.checkSubMap  s    1vT//0000))//1GC55:??bgg---55:))R^^;;;!%%***+vbhh/????!%%*++,ryy0AAAA	 2r   feature1
somemodulesomefunctionfeature2zanother.module	SomeClassextra1extra2feature3zthis.module	something)r   )r%  r(  r,  z
            # define features for blah blah
            feature1 = somemodule:somefunction
            feature2 = another.module:SomeClass [extra1,extra2]
            feature3 = this.module [something]
    c                   V P                  \        P                  ! R V P                  4      4       \        P
                  ! \        4      ;_uu_ 4        \        P                  ! RR4       RRR4       \        P
                  ! \        4      ;_uu_ 4        \        P                  ! RRR.4       RRR4       R#   + '       g   i     LV; i  + '       g   i     R# ; i)xyzzx azfoo=barNr   zfoo=baz)r#  r   parse_group
submap_strrV   rW   r  r&   s   &r   testParseListTestEntryPoints.testParseList  s    //tGH]]:&&""5)4 ']]:&&""3I(>? '& '&&&&s   B9C9C		C	c                   \         P                  ! R V P                  /4      pV P                  VR ,          4       \	        VP                  4       4      R .8X  g   Q h\         P                  ! RV P                  ,           4      pV P                  VR ,          4       \	        VP                  4       4      R .8X  g   Q h\        P                  ! \        4      ;_uu_ 4        \         P                  ! RR.4       RRR4       \        P                  ! \        4      ;_uu_ 4        \         P                  ! V P                  4       RRR4       R#   + '       g   i     L]; i  + '       g   i     R# ; i)r/  z[xyz]
z[xyz]N)	r   	parse_mapr1  r#  rP   keysrV   rW   r  )r&   r"  s   & r   testParseMapTestEntryPoints.testParseMap  s      %!9:5"AFFH~%(((  T__!<=5"AFFH~%(((]]:&&  '7!34 ']]:&&  1 '& '&&&&s   E!!EE	E0	c                    \        R RR.R.4      p\        P                  ! \        P                  4      ;_uu_ 4        VP                  RR7       RRR4       R#   + '       g   i     R# ; i)r   r   r   r   F)requireN)r   rV   warnsr6   PkgResourcesDeprecationWarningr   r  s   & r   testDeprecationWarnings'TestEntryPoints.testDeprecationWarnings  sQ    7:K9Lse
 \\-FFGGGGEG" HGGGs   AA+	)rZ   N)r   zx=a:b:czq=x/nazfez=pish:tush-zzx=f[a]>2)r:   r;   r<   r=   r   r  r  r  reject_specsrV   r   parametrizer  r  r#  r$   r   r  r1  r3  r8  r>  r?   r@   rA   s   @r   r   r     s     !

&, ML[[]L9* :*B J~6FG(;-(H9M
 J{mLMJ@
2# #r   r   c                   D   a  ] tR tRt o R tR tR tR tR tR t	Rt
V tR	# )
TestRequirementsi  c                R   \         P                  ! R 4      p\        V4      R 8X  g   Q h\        V4      R8X  g   Q hV\        R 4      8X  g   Q hV\        R4      8X  g   Q hV\        R4      8w  g   Q hV\        R4      8w  g   Q hV\        R4      8w  g   Q hV\        R4      8w  g   Q hR# )Twisted>=1.2z!Requirement.parse('Twisted>=1.2')ztwisTed>=1.2zTwisted>=2.0z	Zope>=1.2z	Zope>=3.0zTwisted[extras]>=1.2N)r   r  r   r   )r&   rs   & r   r  TestRequirements.testBasics  s    n-1v'''Aw====K////K////K////K,,,,K,,,,K 67777r   c                    \        R 4      p\        R4      pW8X  g   Q h\        V4      \        V4      8X  g   Q h\        V4      R 8X  g   Q h\        R4      \        R4      8w  g   Q hR# )zTwisted==1.2c1,>=1.2zTwisted>=1.2,==1.2c1Twisted'Twisted @ https://localhost/twisted.zipN)r   r   r&   r1r2s   &  r   testOrderingTestRequirements.testOrdering  sk    /0/0xx2w#b'!!!2w00009%5*
 
 	
 
r   c                <   \        R 4      p\        P                  ! R4      p\        P                  ! R4      p\        P                  ! R4      p\        R4      V9   g   Q h\        R4      V9  g   Q hRV9   g   Q hRV9  g   Q hW!9  g   Q hW19  g   Q hWA9   g   Q hR# )rE  rH   zTwisted-1.1.eggzTwisted-1.2.eggrL   1.1N)r   r   r   r
   )r&   rF  foo_disttwist11twist12s   &    r   testBasicContains"TestRequirements.testBasicContains#  s    '--.@A,,->?,,->?U#q(((U#1,,,zzA~~   ||r   c           
     (   \         P                  ! R 4      p\         P                  ! R4      pW8X  g   Q h\        VP                  4      \        R	4      8X  g   Q h\        VP                  4      \        R	4      8X  g   Q h\	        V4      \	        V4      8X  g   Q h\	        V4      \	        RR\        R4      \        RR.4      R34      8X  g   Q h\	        \         P                  ! R4      4      \	        RR\        4       \        4       R34      8X  g   Q hR# )
zTwisted[foo,bar]>=1.2zTwisted[bar,FOO]>=1.2r   bartwistedNz>=1.2rJ  zhttps://localhost/twisted.zip)r   rX  )r   r  r   r   hashr   	frozensetrK  s   &  r   testOptionsAndHashing&TestRequirements.testOptionsAndHashing0  s    6767xx299~^!4444299~^!4444Bx48###Bx4!uen%!
   	  GH
+NK
  	 r   c                P   \         P                  ! R 4      p\         P                  ! R4      p\        P                  pV! R4      V9  g   Q hV! R4      V9  g   Q hV! R4      V9  g   Q hV! R4      V9   g   Q hV! R4      V9   g   Q hV! R4      V9   g   Q hV! R4      V9   g   Q hR# )z
foo==0.3a2z
foo!=0.3a4zfoo-0.3a4.eggzfoo-0.3a1.eggzfoo-0.3a2.eggzfoo-0.3a3.eggzfoo-0.3a5.eggN)r   r  r   r   )r&   rL  rM  ri   s   &   r   testVersionEquality$TestRequirements.testVersionEqualityH  s    |,|,&&!+++!+++!+++!R'''!R'''!R'''!R'''r   c                >   \         P                  ! R4      P                  R8X  g   Q h\         P                  ! R4      P                  R8X  g   Q h\         P                  ! R4      P                  R8X  g   Q h\         P                  ! R4      P                  R8X  g   Q hR# )zA
The setuptools project should implement the setuptools package.

setuptoolszsetuptools == 0.7zsetuptools == 0.7a1zsetuptools >= 0.7N)r   r  rd   r2  s   &r   testSetuptoolsProjectName*TestRequirements.testSetuptoolsProjectNameV  s    
   .;;|KKK  !45BBlRRR  !67DDTTT  !45BBlRRRr   r   N)r:   r;   r<   r=   r  rN  rU  r\  r_  rc  r?   r@   rA   s   @r   rC  rC    s*     	8
0(	S 	Sr   rC  c                   >  a  ] tR tRt o R tR tR tR tR tR t	R t
R	 tR
 t]P                  P                  R. RO4      R 4       tRt]P                  P                  R. RO]! ]! ]! ]P+                  4       4      4      4      ,           4      R 4       tR tRtV tR# )TestParsingib  c                <    \        \        R 4      4      . 8X  g   Q hR# ) N)rP   r	   r2  s   &r   testEmptyParseTestParsing.testEmptyParsec  s    &r*+r111r   c                    . . 3R R .3. .. 3RR R.3RR.R R.33 F+  w  r\        \        P                  ! V4      4      V8X  d   K+  Q h	  R# )r   z x
 yyzx

N)rP   r6   r7   )r&   inpouts   &  r   testYieldingTestParsing.testYieldingf  se    H3%LT2JSz"s^c3Z(
HC 11#673>>>
r   c                :   R p\        \        P                  ! V4      4      RR.3RRR.3RR.3R. 3R	R
.3.8X  g   Q h\        P                  ! \
        4      ;_uu_ 4        \        \        P                  ! R4      4       RRR4       R#   + '       g   i     R# ; i)a   
                    x
                    [Y]
                    z

                    a
                    [b ]
                    # foo
                    c
                    [ d]
                    [q]
                    v
                    Nr   Yzr   r   r   ri   qr   z[foo)rP   r6   split_sectionsrV   rW   r  )r&   samples   & r   testSplittingTestParsing.testSplittingp  s     M0089C5M3*3%L"I3%L>
 
 	
 
 ]]:&&--f56 '&&&s    B		B	c                    \        R 4      R 8X  g   Q h\        R4      R8X  g   Q h\        R4      R8X  g   Q h\        R4      R8X  g   Q h\        R4      R8w  g   Q hR# )	zadns-pythonz
WSGI Utilsz
WSGI-UtilszWSGI  UtilsMoney$$$MakerMoney-Makerpeak.webzpeak-webN)r   r2  s   &r   testSafeNameTestParsing.testSafeName  sa    '=888&,666'<777)]:::$
222r   c                    \        R 4      R8X  g   Q h\        R4      R8X  g   Q h\        R4      R8X  g   Q h\        R4      R8X  g   Q h\        R4      R8X  g   Q hR	# )
z1.2-1z	1.2.post1z	1.2 alphaz	1.2.alphaz2.3.4 20050521z2.3.4.20050521rz  r{  r|  N)r   r2  s   &r   testSafeVersionTestParsing.testSafeVersion  sc    G$333K(K777,-1AAAAO,===J':555r   c                2   \        \        R 4      4      \        R 4      .8X  g   Q h\        \        R4      4      \        R4      .8X  g   Q h\        P                  ! R4      \        R4      8X  g   Q h\        P
                  ! \        4      ;_uu_ 4        \        P                  ! R4       RRR4       \        P
                  ! \        4      ;_uu_ 4        \        P                  ! R4       RRR4       \        P
                  ! \        4      ;_uu_ 4        \        P                  ! R4       RRR4       \        P
                  ! \        4      ;_uu_ 4        \        P                  ! R4       RRR4       \        P
                  ! \        4      ;_uu_ 4        \        P                  ! R	4       RRR4       R#   + '       g   i     EL; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     R# ; i)
zTwis-Ted>=1.2-1zTwisted >=1.2, \ # more
<2.0zTwisted>=1.2,<2.0zFooBar==1.99a3z>=2.3Nzx\zx==2 qz	X==1
Y==2#)rP   r	   r   r  rV   rW   r  r2  s   &r   testSimpleRequirements"TestParsing.testSimpleRequirements  sW   &'89:)*?
 
 	
 
 &'GHI+,N
 
 	
 
   !12kBR6SSSS]]:&&g& ']]:&&e$ ']]:&&h' ']]:&&l+ ']]:&&c" '& '&&&&&&&&&&&s<   F8GGG2H8G		G	G/	2H	H	c                   \         P                  ! R 4      \         P                  ! R 4      8X  g   Q h\         P                  ! R4      \         P                  ! R4      8w  g   Q h\         P                  ! R4      \         P                  ! R4      8w  g   Q h\         P                  ! R4      \         P                  ! R4      8w  g   Q hR# )zfoobar;os_name=='a'zname==1.1;python_version=='2.7'zname==1.1;python_version=='3.6'zname==1.0;python_version=='2.7'zname==1.2;python_version=='2.7'z$name[foo]==1.0;python_version=='3.6'z(name[foo,bar]==1.0;python_version=='3.6'N)r   r  r2  s   &r   test_requirements_with_markers*TestParsing.test_requirements_with_markers  s      !67;;L;L!<
 
 	
 
   -
@AB 	B B   -
@AB 	B B   2
IJK 	K Kr   c                    \        R 4       R# )zfoo==1.0+org1Nr	   r2  s   &r   test_local_versionTestParsing.test_local_version  s
    ?+r   c                2    \        R 4       \        R4       R# )zfoo>=1.0, <3zfoo >= 1.0, < 3Nr  r2  s   &r   %test_spaces_between_multiple_versions1TestParsing.test_spaces_between_multiple_versions  s    >*,-r   c                <    \        V4      \        V4      8X  g   Q hR # r#   r
   r&   loweruppers   &&&r   r_  TestParsing.testVersionEquality  s      U#}U';;;;r   z
        0.80.1-3 0.80.1-2 0.80.1-1 0.79.9999+0.80.0pre4-1
        0.79.9999+0.80.0pre2-3 0.79.9999+0.80.0pre2-2
        0.77.2-1 0.77.1-1 0.77.0-1
        c                <    \        V4      \        V4      8  g   Q hR # r#   r  r  s   &&&r   testVersionOrderingTestParsing.testVersionOrdering  s    . U#mE&::::r   c                `    \        \        R4      4      \        \        R4      4      8X  g   Q hR# )zl
Ensure that our versions stay hashable even though we've subclassed
them and added some shim code to them.
z1.0N)rZ  r
   r2  s   &r   testVersionHashableTestParsing.testVersionHashable  s&    
 M%()T-2F-GGGGr   r   N)r  r  )
)z1.2-rc1z1.2rc1)0.40.4.0)z0.4.0.0r  )z0.4.0-0z0.4-0)0post1z0.0post1)0pre10.0c1)z0.0.0preview10c1)r  z0-rc1)z1.2a1z1.2.a.1)z1.2.az1.2a))2.12.1.1)2a12b0)r  r  )z2.3a1z2.3)2.1-1z2.1-2)r  r  )r  z2.1post4)z2.1a0-20040501r  )rQ  z02.1)z3.2z	3.2.post0)z3.2post1z3.2post2)r  z4.0)z0.0.4r  )r  z0.4post1)z	2.1.0-rc1z2.1.0)z2.1devz2.1a0)r:   r;   r<   r=   ri  ro  rw  r}  r  r  r  r  r  rV   r   rA  r_  torturerP   r   reversedr   r  r  r?   r@   rA   s   @r   rf  rf  b  s     2?7036#&K,. [[	
<<G [[	
$ x12
3%	4,;-,;H Hr   rf  c                      a  ] tR tRt o Rt]P                  R 4       t]P                  ! RR7      R 4       t]P                  P                  ]P                  ! 4       R8H  RR	7      t]R
 4       t]R 4       tRtV tR# )TestNamespacesi  z8__import__('pkg_resources').declare_namespace(__name__)
c              #  F  "   \        \        R4      '       g   \        V4      x  R# \        V4      R,           p\        P                  ! \        V4      V4        \	        V4      ! V4      x  \        P
                  ! V4       R#   \        P
                  ! T4       i ; i5i)zu
Where available, return the tempdir as a symlink,
which as revealed in #231 is more fragile than
a natural tempdir.
symlinkNz-linked)r   osr   r  typeunlink)r&   tmpdir	link_names   && r   symlinked_tmpdirTestNamespaces.symlinked_tmpdir  sm      r9%%f+K)+	


3v;	*	!v,y))IIi BIIi s   AB!B .B!BB!T)autousec              #  V  "   \         P                  P                  4       p\        P                  R,          pVP                  R4      p\        P                  P                  \        V4      4        Rx  V\         n        V\        n        R#   T\         n        T\        n        i ; i5i)zt
Patch sys.path to include the 'site-pkgs' dir. Also
restore pkg_resources._namespace_packages to its
former state.
:NNN	site-pkgsN)r6   _namespace_packagescopyro   pathmkdirappendr   )r&   r  saved_ns_pkgssaved_sys_path	site_pkgss   &&   r   patched_pathTestNamespaces.patched_path  ss      &99>>@!LL-	I'	&0=M-%CH 1>M-%CHs   A/B)2B 6B)B&&B)Windowsz#591r   c                   VP                  4       pTp\        P                  P                  \	        VR,          4      4       VR,          VR,          3pV Fm  pVR,          pVR,          pVP                  4        VR,          P                  V P                  RR7       VR,          P                  V P                  RR7       Ko  	  \        P                  ! \        RR	7      ;_uu_ 4        ^ R
IpR
R
R
4       R\        P                  9   g   Q h\        P                  ! \        RR	7      ;_uu_ 4        ^ R
IpR
R
R
4       R\        P                  9   g   Q h\        P                  R,          R.8X  g   Q h\	        VR,          R,          R,          4      \	        VR,          R,          R,          4      .pXP                  P                   V8X  g   Q hR
#   + '       g   i     L; i  + '       g   i     L; i)z
Test nested namespace packages
Create namespace packages in the following tree :
    site-packages-1/pkg1/pkg2
    site-packages-2/pkg1/pkg2
Check both are in the _namespace_packages dict and that their __path__
is correct

site-pkgs2r  pkg1pkg2__init__.pyutf-8encodingpkg_resources.declare_namespacematchNz	pkg1.pkg2)realpathro   r  r  r   
ensure_dir
write_textns_strrV   r<  DeprecationWarningr  r6   r  	pkg1.pkg2r  __path__)	r&   r  real_tmpdirr  	site_dirssiter  r  rY   s	   &&       r   test_two_levels_deep#TestNamespaces.test_two_levels_deep  s    '//1!F\123[(&<*??	D&=D&=DOOM!--dkkG-LM!--dkkG-L  \\,4UVV W:::::\\,4UVV W m?????008[MIII k)F2V;<l*V3f<=
 yy!!X--- WV WVs   +G3G(G%	(G8	c                   TpVR,          VR,          VR,          3pRp\        V^4       F  w  rVV^8  d)   \        P                  P                  \	        V4      4       VR,          pVR,          pVP                  4        VR,          P                  V P                  RR	7       VR,          P                  WE,          RR	7       K  	  \        P                  ! \        R
R7      ;_uu_ 4        ^ RIp^ RIpRRR4       V Uu. uF#  p\	        VP                  4       R,          4      NK%  	  p	pXP                  V	8X  g   Q hVP                  P                   ^8X  g   Q hR#   + '       g   i     Lq; iu upi )a&  
Test that if multiple versions of the same namespace package subpackage
are on different sys.path entries, that only the one earliest on
sys.path is imported, and that the namespace package's __path__ is in
the correct order.

Regression test for https://github.com/pypa/setuptools/issues/207
r  r  z
site-pkgs3z__version__ = %rnspkgsubpkgr  r  r  r  r  N)	enumeratero   r  r  r   r  r  r  rV   r<  r  r  nspkg.subpkgr  r  r  __version__)
r&   r  r  r  vers_strnumberr  r  r  rY   s
   &&        r   test_path_orderTestNamespaces.test_path_orderC  s5    "[ \!\!
	 &%i3LFzD	*7NEX%F]"..t{{W.Mm#//0AG/T 4 \\,4UVV W @IIytC'12yI~~)))||''1,,, WV Js   -	E)E2E/	r   N)r:   r;   r<   r=   r  rV   fixturer  r  r   r   rE   systemissue591r  r  r?   r@   rA   s   @r   r  r    s     HF^^! !" ^^D!& "&  {{  !2i!? OH!. !.F !- !-r   r  )r   r  rE   r  ro   rV   packaging.specifiersr   r6   r   r   r   r   r   r	   r
   r   r   r   EmptyProviderr   r   rR   rC   r   r   rC  rf  r  r   r   r   <module>r     s     	   
  - 
 
 
B}** B  ))77|  | ~	'( '(Tn# n#bRS RSjRH RHjn- n-r   