zmc
2023-12-22 9fdbf60165db0400c2e8e6be2dc6e88138ac719a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
U
H=®dõ¦ãG@s¢dZddlmZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl Z ddl Z ddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlmZz ddlZWnek
rddlZYnXze Wne!k
r*e"Z YnXddl#m$Z$ddl%m&Z&m'Z'm(Z(ddlm)Z)zddlm*Z*m+Z+m,Z,d    Z-Wnek
rŽd
Z-YnXdd lm.Z/dd l0m1Z1m2Z2zddl3m4Z5e5j6Wnek
rÜdZ5YnXd dl7m8Z8ddl#m9Z9ddl#m:Z:e;dƒe;dƒe;dƒe;dƒe<Z=dej>kr@dkrLnne?dƒ‚e$j@r\dZAdZBdZCdZDdZEdZFdZGdZHdZIdZJdZKdZLdZMdZNdZOdZPdZQdZRdZSGdd„deTƒZUdd„ZViZWdd„ZXdd„ZYd d!„ZZd"d#„Z[d$d%„Z\d&d'„Z]d(d)„Z^d*d+„Z_Z`d,d-„Zad.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMddNddOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrgGZbGdsdI„dIecƒZdGdtdJ„dJedƒZeGdudv„dveeƒZfGdwdK„dKedƒZgGdxdL„dLedƒZhiZidyjjej>ŽZkdzZld{Zmd ZndZod|Zpd}dm„Zqd~d0„Zrgfdd€„Zsdd‚„Ztdƒd„„Zue vd…¡Zwe vd†¡ZxeuZyd‡dR„Zzdˆd/„Z{e{Z|d‰d1„Z}dŠd2„Z~dd‹d3„ZdŒd4„Z€Gdd`„d`ƒZGdŽda„daeƒZ‚GddD„dDƒZƒGdd‘„d‘e„ƒZ…Gd’dC„dCƒZ†e†Z‡Gd“dM„dMe?ƒZˆGd”dE„dEƒZ‰d•dB„ZŠd–dO„Z‹d—dP„ZŒd˜dU„Zd™dV„ZŽdšdW„Zdd›dX„ZGdœdg„dgƒZ‘eqe’e‘ƒGddh„dhe‘ƒZ“Gdždi„die“ƒZ”e” •¡GdŸde„dee‘ƒZ–e–ƒZ—Gd d¡„d¡e„ƒZ˜Gd¢d£„d£e˜ƒZ™Gd¤dj„dje“ƒZšeqe
j›ešƒGd¥db„dbe–ƒZœGd¦dc„dce”ƒZGd§dd„ddešƒZžeXd¨id©dªdk„ZŸdd«d?„Z dd¬d­„Z¡eŸe
j›e¡ƒdd®d¯„Z¢eŸe’e¢ƒd°d±„Z£dd²d³„Z¤d´dµ„Z¥Gd¶d·„d·ƒZ¦d¸d¹„Z§dºd»„Z¨d¼d½„Z©d¾d¿„ZªeŸej«e¤ƒe¬e5dÀƒr°eŸe5j­e¤ƒeXd¨idÁeXd¨iddÃdl„Z®dÄdńZ¯dÆdDŽZ°dÈd<„Z±ddÉdn„Z²dÊd˄Z³e®ej«e³ƒe®e
j›e³ƒe¬e5dÀƒr,e®e5j­e³ƒdÌd̈́Z´e®e’e´ƒdÎdZ„ZµdÏdЄZ¶ifdÑd҄Z·dÓdԄZ¸dÕdքZ¹d×d؄ZºdÙdS„Z»e vdÚ¡j¼Z½e vdÛej¾ej¿B¡j¼ZÀGdÜdH„dHƒZÁdÝdބZÂdßdà„ZÃGdádF„dFƒZÄGdâdã„dãeăZÅGdädå„dåeăZÆeÄeÅeÆdæœZÇdçdè„ZÈGdédê„dêeɃZÊdëdN„ZËGdìdG„dGe:jÌj̓ZÍdídî„ZÎdïdð„ZÏdñdY„ZÐdòdó„ZÑdôdT„ZÒdõdö„ZÓe jÔd÷eUd    dødùdú„ZÕeÕeփfdûdü„ƒZ×eÕdýdþ„ƒZØGdÿdp„dpeكZÚdS(aZ
Package resource API
--------------------
 
A resource is a logical file contained within a package, or a logical
subdirectory thereof.  The package resource API expects resource names
to have their path parts separated with ``/``, *not* whatever the local
path separator is.  Do not use os.path operations to manipulate resource
names being passed into the API.
 
The package resource API is designed to work with normal filesystem packages,
.egg files, and unpacked .egg files.  It can also work in a limited way with
.zip files and with custom PEP 302 loaders that support the ``get_data()``
method.
é)Úabsolute_importN)Ú get_importer)Úsix)ÚurllibÚmapÚfilter)Úutime)ÚmkdirÚrenameÚunlinkTF)Úopen)ÚisdirÚsplité)Ú
py31compat)Úappdirs)Ú    packagingzpip._vendor.packaging.versionz pip._vendor.packaging.specifiersz"pip._vendor.packaging.requirementszpip._vendor.packaging.markers)ér)rézPython 3.5 or later is requiredc@seZdZdZdS)Ú PEP440Warningza
    Used when there is an issue with a version or specifier not complying with
    PEP 440.
    N©Ú__name__Ú
__module__Ú __qualname__Ú__doc__©rrúYD:\z\workplace\VsCode\pyvenv\venv\Lib\site-packages\pip/_vendor/pkg_resources/__init__.pyrxsrcCs8ztj |¡WStjjk
r2tj |¡YSXdS©N)rÚversionÚVersionÚInvalidVersionÚ LegacyVersion)ÚvrrrÚ parse_versionsr#cKs"tƒ |¡t t ||¡¡dSr)ÚglobalsÚupdateÚ _state_varsÚdictÚfromkeys)ÚvartypeÚkwrrrÚ_declare_state‰s r+cCs8i}tƒ}t ¡D] \}}|d|||ƒ||<q|S)NÚ_sget_)r$r&Úitems©ÚstateÚgÚkr"rrrÚ __getstate__Žs
r2cCs8tƒ}| ¡D]$\}}|dt|||||ƒq|S)NÚ_sset_)r$r-r&r.rrrÚ __setstate__–sr4cCs| ¡Sr)Úcopy©ÚvalrrrÚ
_sget_dictsr8cCs| ¡| |¡dSr)Úclearr%©ÚkeyÚobr/rrrÚ
_sset_dict¡sr=cCs| ¡Sr)r2r6rrrÚ _sget_object¦sr>cCs| |¡dSr)r4r:rrrÚ _sset_objectªsr?cGsdSrr©ÚargsrrrÚ<lambda>®órBcCsbtƒ}t |¡}|dk    r^tjdkr^z&dd tƒdd…¡| d¡f}Wntk
r\YnX|S)aZReturn this platform's maximum compatible version.
 
    distutils.util.get_platform() normally reports the minimum version
    of Mac OS X that would be required to *use* extensions produced by
    distutils.  But what we want when checking compatibility is to know the
    version of Mac OS X that we are *running*.  To allow usage of packages that
    explicitly require a newer version of Mac OS X, we must also know the
    current version of the OS.
 
    If this condition occurs for any other platform with a version in its
    platform strings, this function should be extended accordingly.
    NÚdarwinz macosx-%s-%sÚ.ér)    Úget_build_platformÚmacosVersionStringÚmatchÚsysÚplatformÚjoinÚ _macosx_versÚgroupÚ
ValueError)ÚplatÚmrrrÚget_supported_platform±s 
&rRÚrequireÚ
run_scriptÚ get_providerÚget_distributionÚload_entry_pointÚ get_entry_mapÚget_entry_infoÚiter_entry_pointsÚresource_stringÚresource_streamÚresource_filenameÚresource_listdirÚresource_existsÚresource_isdirÚdeclare_namespaceÚ working_setÚadd_activation_listenerÚfind_distributionsÚset_extraction_pathÚcleanup_resourcesÚget_default_cacheÚ EnvironmentÚ
WorkingSetÚResourceManagerÚ DistributionÚ RequirementÚ
EntryPointÚResolutionErrorÚVersionConflictÚDistributionNotFoundÚ UnknownExtraÚExtractionErrorÚparse_requirementsÚ    safe_nameÚ safe_versionÚ get_platformÚcompatible_platformsÚ yield_linesÚsplit_sectionsÚ
safe_extraÚ to_filenameÚinvalid_markerÚevaluate_markerÚensure_directoryÚnormalize_pathÚEGG_DISTÚ BINARY_DISTÚ SOURCE_DISTÚ CHECKOUT_DISTÚ DEVELOP_DISTÚIMetadataProviderÚIResourceProviderÚ FileMetadataÚ PathMetadataÚ EggMetadataÚ EmptyProviderÚempty_providerÚ NullProviderÚ EggProviderÚDefaultProviderÚ ZipProviderÚregister_finderÚregister_namespace_handlerÚregister_loader_typeÚfixup_namespace_packagesrÚPkgResourcesDeprecationWarningÚrun_mainÚAvailableDistributionsc@seZdZdZdd„ZdS)rnz.Abstract base for dependency resolution errorscCs|jjt|jƒSr)Ú    __class__rÚreprrA©ÚselfrrrÚ__repr__þszResolutionError.__repr__N)rrrrr›rrrrrnûsc@s<eZdZdZdZedd„ƒZedd„ƒZdd„Zd    d
„Z    d S) rozª
    An already-installed version conflicts with the requested version.
 
    Should be initialized with the installed Distribution and the requested
    Requirement.
    z3{self.dist} is installed but {self.req} is requiredcCs
|jdS©Nrr@r™rrrÚdist szVersionConflict.distcCs
|jdS©Nrr@r™rrrÚreqszVersionConflict.reqcCs|jjftƒŽSr©Ú    _templateÚformatÚlocalsr™rrrÚreportszVersionConflict.reportcCs|s|S|j|f}t|ŽS)zt
        If required_by is non-empty, return a version of self that is a
        ContextualVersionConflict.
        )rAÚContextualVersionConflict)ršÚ required_byrArrrÚ with_contexts zVersionConflict.with_contextN)
rrrrr¡ÚpropertyrrŸr¤r§rrrrros
 
c@s&eZdZdZejdZedd„ƒZdS)r¥z…
    A VersionConflict that accepts a third parameter, the set of the
    requirements that required the installed Distribution.
    z by {self.required_by}cCs
|jdS)NrFr@r™rrrr¦*sz%ContextualVersionConflict.required_byN)rrrrror¡r¨r¦rrrrr¥"s
r¥c@sHeZdZdZdZedd„ƒZedd„ƒZedd„ƒZd    d
„Z    d d „Z
d S)rpz&A requested distribution was not foundzSThe '{self.req}' distribution was not found and is required by {self.requirers_str}cCs
|jdSrœr@r™rrrrŸ5szDistributionNotFound.reqcCs
|jdSržr@r™rrrÚ    requirers9szDistributionNotFound.requirerscCs|js
dSd |j¡S)Nzthe applicationz, )r©rLr™rrrÚ requirers_str=sz"DistributionNotFound.requirers_strcCs|jjftƒŽSrr r™rrrr¤CszDistributionNotFound.reportcCs| ¡Sr)r¤r™rrrÚ__str__FszDistributionNotFound.__str__N) rrrrr¡r¨rŸr©rªr¤r«rrrrrp/s
 
 
c@seZdZdZdS)rqz>Distribution doesn't have an "extra feature" of the given nameNrrrrrrqJsz{}.{}rrFéÿÿÿÿcCs |t|<dS)aRegister `provider_factory` to make providers for `loader_type`
 
    `loader_type` is the type or class of a PEP 302 ``module.__loader__``,
    and `provider_factory` is a function that, passed a *module* object,
    returns an ``IResourceProvider`` for that module.
    N)Ú_provider_factories)Ú loader_typeÚprovider_factoryrrrr’XscCstt|tƒr$t |¡p"tt|ƒƒdSztj|}Wn&tk
rXt    |ƒtj|}YnXt
|ddƒ}t t |ƒ|ƒS)z?Return an IResourceProvider for the named module or requirementrÚ
__loader__N) Ú
isinstancerlrbÚfindrSÚstrrJÚmodulesÚKeyErrorÚ
__import__ÚgetattrÚ _find_adapterr­)Ú moduleOrReqÚmoduleÚloaderrrrrUbs
 cCsd|s\t ¡d}|dkrLd}tj |¡rLttdƒrLt |¡}d|krL|d}| |     d¡¡|dS)NrÚz0/System/Library/CoreServices/SystemVersion.plistÚ    readPlistÚProductVersionrE)
rKÚmac_verÚosÚpathÚexistsÚhasattrÚplistlibr½Úappendr)Ú_cacherÚplistÚ plist_contentrrrrMos  
 
rMcCsdddœ ||¡S)NÚppc)ÚPowerPCÚPower_Macintosh)Úget)ÚmachinerrrÚ _macosx_archsrÎcCs~ddlm}|ƒ}tjdkrz| d¡szz>tƒ}t ¡d dd¡}dt    |dƒt    |d    ƒt
|ƒfWSt k
rxYnX|S)
zÄReturn this platform's string for platform-specific distributions
 
    XXX Currently this is the same as ``distutils.util.get_platform()``, but it
    needs some hacks for Linux and Mac OS X.
    r)rvrDzmacosx-éú Ú_zmacosx-%d.%d-%sr) Ú    sysconfigrvrJrKÚ
startswithrMrÀÚunameÚreplaceÚintrÎrO)rvrPrrÍrrrrGƒs 
 
þrGzmacosx-(\d+)\.(\d+)-(.*)zdarwin-(\d+)\.(\d+)\.(\d+)-(.*)cCsè|dks|dks||krdSt |¡}|rät |¡}|s”t |¡}|rt| d¡ƒ}d| d¡| d¡f}|dkr||dksŒ|dkr|d    krdSd
S| d¡| d¡ks¼| d ¡| d ¡krÀd
St| d¡ƒt| d¡ƒkràd
SdSd
S) zÛCan code for the `provided` platform run on the `required` platform?
 
    Returns true if either platform is ``None``, or the platforms are equal.
 
    XXX Needs compatibility checks for Linux and other unixy OSes.
    NTrz%s.%srFéz10.3éz10.4Fr)rHrIÚdarwinVersionStringrÖrN)ÚprovidedÚrequiredÚreqMacÚprovMacÚ
provDarwinÚdversionÚ macosversionrrrrw¡s2
 
 
ÿÿÿcCs<t d¡j}|d}| ¡||d<t|ƒd ||¡dS)z@Locate distribution `dist_spec` and run its `script_name` scriptrrrN©rJÚ    _getframeÚ    f_globalsr9rSrT)Z    dist_specÚ script_nameÚnsÚnamerrrrTÏs
 cCs@t|tjƒrt |¡}t|tƒr(t|ƒ}t|tƒs<td|ƒ‚|S)z@Return a current distribution object for a Requirement or stringz-Expected string, Requirement, or Distribution)r±rÚ string_typesrlÚparserUrkÚ    TypeError©rrrrrVÜs 
 
 
 
cCst|ƒ ||¡S)zDReturn `name` entry point of `group` for `dist` or raise ImportError)rVrW©rrNrærrrrWçscCst|ƒ |¡S)ú=Return the entry point map for `group`, or the full entry map)rVrX)rrNrrrrXìscCst|ƒ ||¡S©z<Return the EntryPoint object for `group`+`name`, or ``None``)rVrYrërrrrYñsc@s<eZdZdd„Zdd„Zdd„Zdd„Zd    d
„Zd d „Zd S)r…cCsdS)z;Does the package's distribution contain the named metadata?Nr©rærrrÚ has_metadata÷szIMetadataProvider.has_metadatacCsdS)z'The named metadata resource as a stringNrrîrrrÚ get_metadataúszIMetadataProvider.get_metadatacCsdS)zÒYield named metadata resource as list of non-blank non-comment lines
 
       Leading and trailing whitespace is stripped from each line, and lines
       with ``#`` as the first non-blank character are omitted.NrrîrrrÚget_metadata_linesýsz$IMetadataProvider.get_metadata_linescCsdS)z>Is the named metadata a directory?  (like ``os.path.isdir()``)NrrîrrrÚmetadata_isdirsz IMetadataProvider.metadata_isdircCsdS)z?List of metadata names in the directory (like ``os.listdir()``)NrrîrrrÚmetadata_listdirsz"IMetadataProvider.metadata_listdircCsdS)z=Execute the named script in the supplied namespace dictionaryNr)räÚ    namespacerrrrT    szIMetadataProvider.run_scriptN)    rrrrïrðrñròrórTrrrrr…ös c@s@eZdZdZdd„Zdd„Zdd„Zdd    „Zd
d „Zd d „Z    dS)r†z3An object that provides access to package resourcescCsdS)zdReturn a true filesystem path for `resource_name`
 
        `manager` must be an ``IResourceManager``Nr©ÚmanagerÚ resource_namerrrÚget_resource_filenamesz'IResourceProvider.get_resource_filenamecCsdS)ziReturn a readable file-like object for `resource_name`
 
        `manager` must be an ``IResourceManager``NrrõrrrÚget_resource_streamsz%IResourceProvider.get_resource_streamcCsdS)zmReturn a string containing the contents of `resource_name`
 
        `manager` must be an ``IResourceManager``NrrõrrrÚget_resource_stringsz%IResourceProvider.get_resource_stringcCsdS)z,Does the package contain the named resource?Nr©r÷rrrÚ has_resourceszIResourceProvider.has_resourcecCsdS)z>Is the named resource a directory?  (like ``os.path.isdir()``)Nrrûrrrr`"sz IResourceProvider.resource_isdircCsdS)z?List of resource names in the directory (like ``os.listdir()``)Nrrûrrrr^%sz"IResourceProvider.resource_listdirN)
rrrrrørùrúrür`r^rrrrr† sc@s¬eZdZdZd'dd„Zedd„ƒZedd„ƒZd    d
„Zd d „Z    d d„Z
d(dd„Z dd„Z dd„Z d)dd„Zd*dd„Zd+dd„Zdd„Zd,dd „Zd!d"„Zd#d$„Zd%d&„ZdS)-rizDA collection of active distributions on sys.path (or a similar list)NcCs>g|_i|_i|_g|_|dkr&tj}|D]}| |¡q*dS)z?Create working set from list of path entries (default=sys.path)N)ÚentriesÚ
entry_keysÚby_keyÚ    callbacksrJrÁÚ    add_entry)ršrýÚentryrrrÚ__init__,szWorkingSet.__init__cCsb|ƒ}zddlm}Wntk
r.|YSXz| |¡Wntk
r\| |¡YSX|S)z1
        Prepare the master working set.
        r)Ú __requires__)Ú__main__rÚ ImportErrorrSroÚ_build_from_requirements)ÚclsÚwsrrrrÚ _build_master9s
zWorkingSet._build_mastercCsf|gƒ}t|ƒ}| |tƒ¡}|D]}| |¡q"tjD]}||jkr8| |¡q8|jtjdd…<|S)zQ
        Build a working set from a requirement spec. Rewrites sys.path.
        N)rsÚresolverhÚaddrJrÁrýr)rÚreq_specr    ÚreqsÚdistsrrrrrrMs 
 
 z#WorkingSet._build_from_requirementscCs<|j |g¡|j |¡t|dƒD]}| ||d¡q$dS)aÝAdd a path item to ``.entries``, finding any distributions on it
 
        ``find_distributions(entry, True)`` is used to find distributions
        corresponding to the path entry, and they are added.  `entry` is
        always appended to ``.entries``, even if it is already present.
        (This is because ``sys.path`` can contain the same value more than
        once, and the ``.entries`` of the ``sys.path`` WorkingSet should always
        equal ``sys.path``.)
        TFN)rþÚ
setdefaultrýrÅrdr )ršrrrrrrcs
 zWorkingSet.add_entrycCs|j |j¡|kS)z9True if `dist` is the active distribution for its project)rÿrÌr;©ršrrrrÚ __contains__rszWorkingSet.__contains__cCs,|j |j¡}|dk    r(||kr(t||ƒ‚|S)aÐFind a distribution matching requirement `req`
 
        If there is an active distribution for the requested project, this
        returns it as long as it meets the version requirement specified by
        `req`.  But, if there is an active distribution for the project and it
        does *not* meet the `req` requirement, ``VersionConflict`` is raised.
        If there is no active distribution for the requested project, ``None``
        is returned.
        N)rÿrÌr;ro)ršrŸrrrrr²vs
 
zWorkingSet.findcs‡‡fdd„|DƒS)aYield entry point objects from `group` matching `name`
 
        If `name` is None, yields all entry points in `group` from all
        distributions in the working set, otherwise only ones matching
        both `group` and `name` are yielded (in distribution order).
        c3s8|]0}| ˆ¡ ¡D]}ˆdks*ˆ|jkr|VqqdSr)rXÚvaluesræ)Ú.0rr©rNrærrÚ    <genexpr>s 
ýz/WorkingSet.iter_entry_points.<locals>.<genexpr>r©ršrNrærrrrZ†s þzWorkingSet.iter_entry_pointscCs>t d¡j}|d}| ¡||d<| |¡d ||¡dS)z?Locate distribution for `requires` and run `script_name` scriptrrrNrá)ršÚrequiresrärårærrrrT”s
 zWorkingSet.run_scriptccsLi}|jD]<}||jkrq
|j|D] }||kr$d||<|j|Vq$q
dS)z¸Yield distributions for non-duplicate projects in the working set
 
        The yield order is the order in which the items' path entries were
        added to the working set.
        rN)rýrþrÿ)ršÚseenÚitemr;rrrÚ__iter__œs
 
zWorkingSet.__iter__TFcCsœ|r|j|j||d|dkr$|j}|j |g¡}|j |jg¡}|sV|j|jkrVdS||j|j<|j|krx| |j¡|j|krŽ| |j¡| |¡dS)aAdd `dist` to working set, associated with `entry`
 
        If `entry` is unspecified, it defaults to the ``.location`` of `dist`.
        On exit from this routine, `entry` is added to the end of the working
        set's ``.entries`` (if it wasn't already present).
 
        `dist` is only added to the working set if it's for a project that
        doesn't already have a distribution in the set, unless `replace=True`.
        If it's added, any callbacks registered with the ``subscribe()`` method
        will be called.
        ©rÕN)    Ú    insert_onrýÚlocationrþrr;rÿrÅÚ
_added_new)ršrrÚinsertrÕÚkeysÚkeys2rrrr ­s  
 
 zWorkingSet.addcCsxt|ƒddd…}i}i}g}tƒ}    t t¡}
|rt| d¡} | |krHq.|     | |¡sVq.| | j¡} | dkr|j     | j¡} | dksŽ| | krø|rø|} |dkr¾| dkr®t
|j ƒ}nt
gƒ}t gƒ} |j | | ||d} || j<| dkrø|
 | d¡}t| |ƒ‚| | ¡| | kr$|
| }t| | ƒ |¡‚|  | j¡ddd…}| |¡|D] }|
| | j¡| j|    |<qHd|| <q.|S)aÎList all distributions needed to (recursively) meet `requirements`
 
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
 
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
 
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        Nr¬r)Úreplace_conflictingT)ÚlistÚ
_ReqExtrasÚ collectionsÚ defaultdictÚsetÚpopÚ markers_passrÌr;rÿrhrýriÚ
best_matchrprÅror§rÚextrasÚextendr Ú project_name)ršÚ requirementsÚenvÚ    installerr#r,Ú    processedÚbestÚ to_activateÚ
req_extrasr¦rŸrr    r©Ú dependent_reqÚnew_requirementsÚnew_requirementrrrr ËsT
 
 
 þ 
 
 
 
 
zWorkingSet.resolvec Cs
t|ƒ}| ¡i}i}|dkr4t|jƒ}||7}n||}| g¡}    tt|    j|ƒƒ|D]–}
||
D]ˆ} |  ¡g} z|     | ||¡} WnBt    k
rÈ}z$||| <|r®WY¢qfn
WY¢qZW5d}~XYqfXtt|    j| ƒƒ| 
t   | ¡¡qZqfqZt|ƒ}| ¡||fS)asFind all activatable distributions in `plugin_env`
 
        Example usage::
 
            distributions, errors = working_set.find_plugins(
                Environment(plugin_dirlist)
            )
            # add plugins+libs to sys.path
            map(working_set.add, distributions)
            # display errors
            print('Could not load', errors)
 
        The `plugin_env` should be an ``Environment`` instance that contains
        only distributions that are in the project's "plugin directory" or
        directories. The `full_env`, if supplied, should be an ``Environment``
        contains all currently-available distributions.  If `full_env` is not
        supplied, one is created automatically from the ``WorkingSet`` this
        method is called on, which will typically mean that every directory on
        ``sys.path`` will be scanned for distributions.
 
        `installer` is a standard installer callback as used by the
        ``resolve()`` method. The `fallback` flag indicates whether we should
        attempt to resolve older versions of a plugin if the newest version
        cannot be resolved.
 
        This method returns a 2-tuple: (`distributions`, `error_info`), where
        `distributions` is a list of the distributions found in `plugin_env`
        that were loadable, along with any other distributions that are needed
        to resolve their dependencies.  `error_info` is a dictionary mapping
        unloadable plugin distributions to an exception instance describing the
        error that occurred. Usually this will be a ``DistributionNotFound`` or
        ``VersionConflict`` instance.
        N) r$Úsortrhrýr—rr Úas_requirementr rnr%r'r()ršÚ
plugin_envÚfull_envr1ÚfallbackÚplugin_projectsÚ
error_infoÚ distributionsr0Ú
shadow_setr.rrŸÚ    resolveesr"rrrÚ find_plugins's4$
 
 
 
 
zWorkingSet.find_pluginscGs&| t|ƒ¡}|D]}| |¡q|S)a¾Ensure that distributions matching `requirements` are activated
 
        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        )r rsr )ršr/ÚneededrrrrrS{s     zWorkingSet.requirecCs8||jkrdS|j |¡|s"dS|D] }||ƒq&dS)zƒInvoke `callback` for all distributions
 
        If `existing=True` (default),
        call on all existing ones, as well.
        N)rrÅ)ršÚcallbackÚexistingrrrrÚ    subscribe‹s
 zWorkingSet.subscribecCs|jD] }||ƒqdSr)r)ršrrErrrr™s
zWorkingSet._added_newcCs,|jdd…|j ¡|j ¡|jdd…fSr)rýrþr5rÿrr™rrrr2s
  þzWorkingSet.__getstate__cCs@|\}}}}|dd…|_| ¡|_| ¡|_|dd…|_dSr)rýr5rþrÿr)ršÚe_k_b_crýr!rÿrrrrr4£s
 
 
zWorkingSet.__setstate__)N)N)NTF)NNFN)NNT)T)rrrrrÚ classmethodr
rrrr²rZrTrr r rCrSrGrr2r4rrrrri)s4
 
 
 
 
ÿ
]ÿ
T
c@seZdZdZddd„ZdS)r%z>
    Map each requirement to the extras that demanded it.
    Ncs2‡fdd„| ˆd¡|pdDƒ}ˆj p0t|ƒS)z»
        Evaluate markers for req against each extra that
        demanded it.
 
        Return False if the req has a marker and fails
        evaluation. Otherwise, return True.
        c3s|]}ˆj d|i¡VqdS)ÚextraN©ÚmarkerÚevaluate)rrJ©rŸrrr¸sÿz*_ReqExtras.markers_pass.<locals>.<genexpr>rr)rÌrLÚany)ršrŸr,Ú extra_evalsrrNrr*°s
þz_ReqExtras.markers_pass)N)rrrrr*rrrrr%«sr%c@sxeZdZdZdeƒefdd„Zdd„Zdd„Zdd    d
„Z    d d „Z
d d„Z ddd„Z ddd„Z dd„Zdd„Zdd„ZdS)rhz5Searchable snapshot of distributions on a search pathNcCs i|_||_||_| |¡dS)a!Snapshot distributions available on a search path
 
        Any distributions found on `search_path` are added to the environment.
        `search_path` should be a sequence of ``sys.path`` items.  If not
        supplied, ``sys.path`` is used.
 
        `platform` is an optional string specifying the name of the platform
        that platform-specific distributions must be compatible with.  If
        unspecified, it defaults to the current platform.  `python` is an
        optional string naming the desired version of Python (e.g. ``'3.6'``);
        it defaults to the current version.
 
        You may explicitly set `platform` (and/or `python`) to ``None`` if you
        wish to map *all* distributions, not just those compatible with the
        running platform or Python version.
        N)Ú_distmaprKÚpythonÚscan)ršÚ search_pathrKrRrrrrÂszEnvironment.__init__cCs2|jdkp|jdkp|j|jk}|o0t|j|jƒS)zåIs distribution `dist` acceptable for this environment?
 
        The distribution must match the platform and python version
        requirements specified when this environment was created, or False
        is returned.
        N)rRÚ
py_versionrwrK)ršrÚ    py_compatrrrÚcan_addÚs 
ÿ
ýzEnvironment.can_addcCs|j|j |¡dS)z"Remove `dist` from the environmentN)rQr;ÚremoverrrrrXèszEnvironment.removecCs4|dkrtj}|D]}t|ƒD]}| |¡qqdS)adScan `search_path` for distributions usable in this environment
 
        Any distributions found are added to the environment.
        `search_path` should be a sequence of ``sys.path`` items.  If not
        supplied, ``sys.path`` is used.  Only distributions conforming to
        the platform/python version defined at initialization are added.
        N)rJrÁrdr )ršrTrrrrrrSìs
 zEnvironment.scancCs| ¡}|j |g¡S)aReturn a newest-to-oldest list of distributions for `project_name`
 
        Uses case-insensitive `project_name` comparison, assuming all the
        project's distributions use their project's name converted to all
        lowercase as their key.
 
        )ÚlowerrQrÌ)ršr.Údistribution_keyrrrÚ __getitem__ûszEnvironment.__getitem__cCsL| |¡rH| ¡rH|j |jg¡}||krH| |¡|jt d¡dddS)zLAdd `dist` if we ``can_add()`` it and it has not already been added
        ÚhashcmpT©r;ÚreverseN)    rWÚ has_versionrQrr;rÅr9ÚoperatorÚ
attrgetter)ršrrrrrr s
 
zEnvironment.addFcCsfz| |¡}Wntk
r,|s$‚d}YnX|dk    r:|S||jD]}||krD|SqD| ||¡S)a¸Find distribution best matching `req` and usable on `working_set`
 
        This calls the ``find(req)`` method of the `working_set` to see if a
        suitable distribution is already active.  (This may raise
        ``VersionConflict`` if an unsuitable version of the project is already
        active in the specified `working_set`.)  If a suitable distribution
        isn't active, this method returns the newest distribution in the
        environment that meets the ``Requirement`` in `req`.  If no suitable
        distribution is found, and `installer` is supplied, then the result of
        calling the environment's ``obtain(req, installer)`` method will be
        returned.
        N)r²ror;Úobtain)ršrŸrbr1r#rrrrr+s
 
zEnvironment.best_matchcCs|dk    r||ƒSdS)aÞObtain a distribution matching `requirement` (e.g. via download)
 
        Obtain a distro that matches requirement (e.g. via download).  In the
        base ``Environment`` class, this routine just returns
        ``installer(requirement)``, unless `installer` is None, in which case
        None is returned instead.  This method is a hook that allows subclasses
        to attempt other ways of obtaining a distribution before falling back
        to the `installer` argument.Nr)ršÚ requirementr1rrrrb+s    zEnvironment.obtainccs"|j ¡D]}||r
|Vq
dS)z=Yield the unique project names of the available distributionsN)rQr!©ršr;rrrr7szEnvironment.__iter__cCsVt|tƒr| |¡n<t|tƒrD|D]}||D]}| |¡q0q$ntd|fƒ‚|S)z2In-place addition of a distribution or environmentzCan't add %r to environment)r±rkr rhré)ršÚotherÚprojectrrrrÚ__iadd__=s
 
 zEnvironment.__iadd__cCs*|jgddd}||fD] }||7}q|S)z4Add an environment or distribution to an environmentN)rKrR©r—)ršreÚnewr0rrrÚ__add__Is 
zEnvironment.__add__)N)NF)N)rrrrrRÚPY_MAJORrrWrXrSr[r r+rbrrgrjrrrrrh¿s"þ
 
 
ÿ
 
 c@seZdZdZdS)rraTAn error occurred extracting a resource
 
    The following attributes are available from instances of this exception:
 
    manager
        The resource manager that raised this exception
 
    cache_path
        The base directory for resource extraction
 
    original_error
        The exception instance that caused extraction to fail
    NrrrrrrrUsc@s„eZdZdZdZdd„Zdd„Zdd„Zd    d
„Zd d „Z    d d„Z
dd„Z dd„Z ddd„Z edd„ƒZdd„Zdd„Zd dd„ZdS)!rjz'Manage resource extraction and packagesNcCs
i|_dSr)Ú cached_filesr™rrrriszResourceManager.__init__cCst|ƒ |¡S)zDoes the named resource exist?)rUrü©ršÚpackage_or_requirementr÷rrrr_lszResourceManager.resource_existscCst|ƒ |¡S)z,Is the named resource an existing directory?)rUr`rmrrrr`psÿzResourceManager.resource_isdircCst|ƒ ||¡S)z4Return a true filesystem path for specified resource)rUrørmrrrr]vsÿz!ResourceManager.resource_filenamecCst|ƒ ||¡S)z9Return a readable file-like object for specified resource)rUrùrmrrrr\|sÿzResourceManager.resource_streamcCst|ƒ ||¡S)z%Return specified resource as a string)rUrúrmrrrr[‚sÿzResourceManager.resource_stringcCst|ƒ |¡S)z1List the contents of the named resource directory)rUr^rmrrrr^ˆsÿz ResourceManager.resource_listdircCsRt ¡d}|jptƒ}t d¡ ¡}t|jft    ƒŽƒ}||_
||_ ||_ |‚dS)z5Give an error message for problems extracting file(s)ra
            Can't extract file(s) to egg cache
 
            The following error occurred while trying to extract file(s)
            to the Python egg cache:
 
              {old_exc}
 
            The Python egg cache directory is currently set to:
 
              {cache_path}
 
            Perhaps your account does not have write access to this directory?
            You can change the cache directory by setting the PYTHON_EGG_CACHE
            environment variable to point to an accessible directory.
            N) rJÚexc_infoÚextraction_pathrgÚtextwrapÚdedentÚlstriprrr¢r£röÚ
cache_pathÚoriginal_error)ršÚold_excrtÚtmplÚerrrrrÚextraction_errorŽs  z ResourceManager.extraction_errorrcCsf|jp
tƒ}tjj||df|žŽ}z t|ƒWntk
rL| ¡YnX| |¡d|j    |<|S)a®Return absolute location in cache for `archive_name` and `names`
 
        The parent directory of the resulting path will be created if it does
        not already exist.  `archive_name` should be the base filename of the
        enclosing egg (which may not be the name of the enclosing zipfile!),
        including its ".egg" extension.  `names`, if provided, should be a
        sequence of path name parts "under" the egg's extraction location.
 
        This method should only be called by resource providers that need to
        obtain an extraction location, and only for names they intend to
        extract, as it tracks the generated names for possible cleanup later.
        z-tmpr)
rprgrÀrÁrLÚ_bypass_ensure_directoryÚ    ExceptionryÚ_warn_unsafe_extraction_pathrl)ršÚ archive_nameÚnamesÚ extract_pathÚ target_pathrrrÚget_cache_pathªs  
 
zResourceManager.get_cache_pathcCsVtjdkr| tjd¡sdSt |¡j}|tj@s>|tj@rRd|}t     |t
¡dS)aN
        If the default extraction path is overridden and set to an insecure
        location, such as /tmp, it opens up an opportunity for an attacker to
        replace an extracted file with an unauthorized payload. Warn the user
        if a known insecure location is used.
 
        See Distribute #375 for more details.
        ÚntÚwindirNzË%s is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).) rÀrærÓÚenvironÚstatÚst_modeÚS_IWOTHÚS_IWGRPÚwarningsÚwarnÚ UserWarning)rÁÚmodeÚmsgrrrr|Ãs
 üÿz,ResourceManager._warn_unsafe_extraction_pathcCs.tjdkr*t |¡jdBd@}t ||¡dS)a4Perform any platform-specific postprocessing of `tempname`
 
        This is where Mac header rewrites should be done; other platforms don't
        have anything special they should do.
 
        Resource providers should call this method ONLY after successfully
        extracting a compressed resource.  They must NOT call it on resources
        that are already in the filesystem.
 
        `tempname` is the current (temporary) name of the file, and `filename`
        is the name it will be renamed to by the caller after this routine
        returns.
        ÚposiximiÿN)rÀrær…r†Úchmod)ršÚtempnameÚfilenamerŒrrrÚ postprocessÝs
zResourceManager.postprocesscCs|jrtdƒ‚||_dS)aÒSet the base path where resources will be extracted to, if needed.
 
        If you do not call this routine before any extractions take place, the
        path defaults to the return value of ``get_default_cache()``.  (Which
        is based on the ``PYTHON_EGG_CACHE`` environment variable, with various
        platform-specific fallbacks.  See that routine's documentation for more
        details.)
 
        Resources are extracted to subdirectories of this path based upon
        information given by the ``IResourceProvider``.  You may set this to a
        temporary directory, but then you must call ``cleanup_resources()`` to
        delete the extracted files when done.  There is no guarantee that
        ``cleanup_resources()`` will be able to remove all extracted files.
 
        (Note: you may not change the extraction path for a given resource
        manager once resources have been extracted, unless you first call
        ``cleanup_resources()``.)
        z5Can't change extraction path, files already extractedN)rlrOrp©ršrÁrrrreñs
ÿz#ResourceManager.set_extraction_pathFcCsdS)aB
        Delete all extracted resource files and directories, returning a list
        of the file and directory names that could not be successfully removed.
        This function does not have any concurrency protection, so it should
        generally only be called when the extraction path is a temporary
        directory exclusive to a single process.  This method is not
        automatically called; you must call it explicitly or register it as an
        ``atexit`` function if you wish to ensure cleanup of a temporary
        directory used for extractions.
        Nr)ršÚforcerrrrf sz!ResourceManager.cleanup_resources)r)F)rrrrrprr_r`r]r\r[r^ryrÚ staticmethodr|r’rerfrrrrrjes 
 
cCstj d¡ptjddS)zŒ
    Return the ``PYTHON_EGG_CACHE`` environment variable
    or a platform-relevant user cache dir for an app
    named "Python-Eggs".
    ÚPYTHON_EGG_CACHEz Python-Eggs)Úappname)rÀr„rÌrÚuser_cache_dirrrrrrgs 
þcCst dd|¡S)zConvert an arbitrary string to a standard distribution name
 
    Any runs of non-alphanumeric/. characters are replaced with a single '-'.
    ú[^A-Za-z0-9.]+ú-)ÚreÚsubrîrrrrt%scCsJzttj |¡ƒWStjjk
rD| dd¡}t dd|¡YSXdS)zB
    Convert an arbitrary string to a standard version string
    rÐrEr™ršN)r³rrrr rÕr›rœ)rrrrru-s
 cCst dd|¡ ¡S)z±Convert an arbitrary string to a standard 'extra' name
 
    Any runs of non-alphanumeric characters are replaced with a single '_',
    and the result is always lowercased.
    z[^A-Za-z0-9.-]+rÑ)r›rœrY)rJrrrrz9scCs | dd¡S)z|Convert a project or version name to its filename-escaped form
 
    Any '-' characters are currently replaced with '_'.
    ršrÑrrîrrrr{Bsc
CsHz t|ƒWn6tk
rB}zd|_d|_|WY¢Sd}~XYnXdS)zo
    Validate text as a PEP 508 environment marker; return an exception
    if invalid or False otherwise.
    NF)r}Ú SyntaxErrorr‘Úlineno)ÚtextÚerrrr|Js c
CsJztj |¡}| ¡WStjjk
rD}z t|ƒ‚W5d}~XYnXdS)zÙ
    Evaluate a PEP 508 environment marker.
    Return a boolean indicating the marker result in this environment.
    Raise SyntaxError if marker is invalid.
 
    This implementation uses the 'pyparsing' module.
    N)rÚmarkersÚMarkerrMÚ InvalidMarkerr)rŸrJrLr rrrr}Xs
 
c@sÀeZdZdZdZdZdZdd„Zdd„Zdd„Z    d    d
„Z
d d „Z d d„Z dd„Z dd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd „Zd!d"„Zd#d$„Zd%d&„Zed'd(„ƒZd)d*„ZdS)+rŒzETry to implement resources and metadata for arbitrary PEP 302 loadersNcCs(t|ddƒ|_tj t|ddƒ¡|_dS)Nr°Ú__file__r¼)r·r»rÀrÁÚdirnameÚ module_path©ršrºrrrrnszNullProvider.__init__cCs| |j|¡Sr)Ú_fnr¦©ršrör÷rrrrørsz"NullProvider.get_resource_filenamecCst | ||¡¡Sr)ÚioÚBytesIOrúr©rrrrùusz NullProvider.get_resource_streamcCs| | |j|¡¡Sr)Ú_getr¨r¦r©rrrrúxsz NullProvider.get_resource_stringcCs| | |j|¡¡Sr)Ú_hasr¨r¦©ršr÷rrrrü{szNullProvider.has_resourcecCs| |j|¡Sr)r¨Úegg_info©ršrærrrÚ_get_metadata_path~szNullProvider._get_metadata_pathcCs |js |jS| |¡}| |¡Sr)r¯r±r­©ršrærÁrrrrïs
zNullProvider.has_metadatac
Cst|js
dS| |¡}| |¡}tjr(|Sz | d¡WStk
rn}z|jd ||¡7_‚W5d}~XYnXdS)Nr¼úutf-8z in {} file at path: {})    r¯r±r¬rÚPY2ÚdecodeÚUnicodeDecodeErrorÚreasonr¢)ršrærÁÚvalueÚexcrrrrðˆs
 
 zNullProvider.get_metadatacCst| |¡ƒSr©rxrðr°rrrrñ—szNullProvider.get_metadata_linescCs| | |j|¡¡Sr)Ú_isdirr¨r¦r®rrrr`šszNullProvider.resource_isdircCs|jo| | |j|¡¡Sr)r¯r»r¨r°rrrròszNullProvider.metadata_isdircCs| | |j|¡¡Sr)Ú_listdirr¨r¦r®rrrr^ szNullProvider.resource_listdircCs|jr| | |j|¡¡SgSr)r¯r¼r¨r°rrrró£szNullProvider.metadata_listdirc
CsÌd|}| |¡s$tdjftƒŽƒ‚| |¡ dd¡}| dd¡}| |j|¡}||d<tj     
|¡rŠt |ƒ  ¡}t ||dƒ}t|||ƒn>dd    lm}t|ƒd| d¡|f||<t ||dƒ}    t|    ||ƒdS)
Nzscripts/z<Script {script!r} not found in metadata at {self.egg_info!r}z
Ú
ú r¤Úexecr)Úcache)rïrnr¢r£rðrÕr¨r¯rÀrÁrÂr ÚreadÚcompiler¿Ú    linecacherÀÚlenr)
ršrärôÚscriptÚ script_textÚscript_filenameÚsourceÚcoderÀÚ script_coderrrrT¨s.
ÿÿ     ÿ zNullProvider.run_scriptcCs tdƒ‚dS©Nz9Can't perform this operation for unregistered loader type©ÚNotImplementedErrorr“rrrr­¿sÿzNullProvider._hascCs tdƒ‚dSrËrÌr“rrrr»ÄsÿzNullProvider._isdircCs tdƒ‚dSrËrÌr“rrrr¼ÉsÿzNullProvider._listdircCs*| |¡|r&tjj|f| d¡žŽS|S)Nú/)Ú_validate_resource_pathrÀrÁrLr)ršÚbaser÷rrrr¨Îs
zNullProvider._fncCsptjj| tj¡kp&t |¡p&t |¡}|s0dSd}t |¡rPt |¡sPt|ƒ‚t    j
|dd…dt dddS)aO
        Validate the resource paths according to the docs.
        https://setuptools.readthedocs.io/en/latest/pkg_resources.html#basic-resource-access
 
        >>> warned = getfixture('recwarn')
        >>> warnings.simplefilter('always')
        >>> vrp = NullProvider._validate_resource_path
        >>> vrp('foo/bar.txt')
        >>> bool(warned)
        False
        >>> vrp('../foo/bar.txt')
        >>> bool(warned)
        True
        >>> warned.clear()
        >>> vrp('/foo/bar.txt')
        >>> bool(warned)
        True
        >>> vrp('foo/../../bar.txt')
        >>> bool(warned)
        True
        >>> warned.clear()
        >>> vrp('foo/f../bar.txt')
        >>> bool(warned)
        False
 
        Windows path separators are straight-up disallowed.
        >>> vrp(r'\foo/bar.txt')
        Traceback (most recent call last):
        ...
        ValueError: Use of .. or absolute path in a resource path is not allowed.
 
        >>> vrp(r'C:\foo/bar.txt')
        Traceback (most recent call last):
        ...
        ValueError: Use of .. or absolute path in a resource path is not allowed.
 
        Blank values are allowed
 
        >>> vrp('')
        >>> bool(warned)
        False
 
        Non-string values are not.
 
        >>> vrp(None)
        Traceback (most recent call last):
        ...
        AttributeError: ...
        Nz=Use of .. or absolute path in a resource path is not allowed.r¬z/ and will raise exceptions in a future release.rÏ©Ú
stacklevel) rÀrÁÚpardirrÚ    posixpathÚsepÚisabsÚntpathrOr‰rŠÚDeprecationWarning)rÁÚinvalidrrrrrÏÔs6ÿýýz$NullProvider._validate_resource_pathcCs$t|jdƒr|j |¡Stdƒ‚dS)NÚget_dataz=Can't perform this operation for loaders without 'get_data()')rÃr»rÚrÍr“rrrr¬s
  ÿzNullProvider._get)rrrrÚegg_namer¯r»rrørùrúrür±rïrðrñr`ròr^rórTr­r»r¼r¨r•rÏr¬rrrrrŒgs2
Jc@s eZdZdZdd„Zdd„ZdS)rz&Provider based on a virtual filesystemcCst ||¡| ¡dSr)rŒrÚ _setup_prefixr§rrrr-s zEggProvider.__init__cCsZ|j}d}||krVt|ƒr@tj |¡|_tj |d¡|_||_qV|}tj     |¡\}}q
dS)NúEGG-INFO)
r¦Ú _is_egg_pathrÀrÁÚbasenamerÛrLr¯Úegg_rootr)ršrÁÚoldrÐrrrrÜ1szEggProvider._setup_prefixN)rrrrrrÜrrrrr*sc@sDeZdZdZdd„Zdd„Zdd„Zdd    „Zd
d „Ze    d d „ƒZ
dS)rŽz6Provides access to package resources in the filesystemcCs tj |¡Sr)rÀrÁrÂr“rrrr­CszDefaultProvider._hascCs tj |¡Sr)rÀrÁr r“rrrr»FszDefaultProvider._isdircCs
t |¡Sr)rÀÚlistdirr“rrrr¼IszDefaultProvider._listdircCst| |j|¡dƒS©NÚrb)r r¨r¦r©rrrrùLsz#DefaultProvider.get_resource_streamc
Cs*t|dƒ}| ¡W5QR£SQRXdSrã)r rÁ)ršrÁÚstreamrrrr¬Os zDefaultProvider._getcCs,d}|D]}tt|tdƒƒ}t||ƒqdS)N)ÚSourceFileLoaderÚSourcelessFileLoader)r·Úimportlib_machineryÚtyper’)rÚ loader_namesræÚ
loader_clsrrrÚ    _registerSszDefaultProvider._registerN) rrrrr­r»r¼rùr¬rIrìrrrrrŽ@sc@s8eZdZdZdZdd„ZZdd„Zdd„Zd    d
„Z    dS) rŠz.Provider that returns nothing for all requestsNcCsdS©NFrr“rrrrBcrCzEmptyProvider.<lambda>cCsdS©Nr¼rr“rrrr¬eszEmptyProvider._getcCsgSrrr“rrrr¼hszEmptyProvider._listdircCsdSrrr™rrrrkszEmptyProvider.__init__)
rrrrr¦r»r­r¬r¼rrrrrrŠ^s  c@s eZdZdZedd„ƒZeZdS)Ú ZipManifestsz
    zip manifest builder
    c
s@t |¡,‰‡fdd„ˆ ¡Dƒ}t|ƒW5QR£SQRXdS)a
        Build a dictionary similar to the zipimport directory
        caches, except instead of tuples, store ZipInfo objects.
 
        Use a platform-specific path separator (os.sep) for the path keys
        for compatibility with pypy on Windows.
        c3s&|]}| dtj¡ˆ |¡fVqdS)rÎN)rÕrÀrÕÚgetinfo©rræ©Úzfilerrrsý þz%ZipManifests.build.<locals>.<genexpr>N)ÚzipfileÚZipFileÚnamelistr')rrÁr-rròrÚbuildws
     
ûzZipManifests.buildN)rrrrrIr÷Úloadrrrrrïrs
rïc@s$eZdZdZe dd¡Zdd„ZdS)ÚMemoizedZipManifestsz%
    Memoized zipfile manifests.
    Ú manifest_modzmanifest mtimecCsRtj |¡}t |¡j}||ks.||j|krH| |¡}| ||¡||<||jS)zW
        Load a manifest at path or return a suitable manifest already loaded.
        )    rÀrÁÚnormpathr…Úst_mtimeÚmtimer÷rúÚmanifest)ršrÁrýrþrrrrø“s   
zMemoizedZipManifests.loadN)rrrrr&Ú
namedtuplerúrørrrrrùs rùc@sšeZdZdZdZeƒZdd„Zdd„Zdd„Z    e
d    d
„ƒZ d d „Z e d d„ƒZdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd „ZdS)!rz"Resource support for zips and eggsNcCs t ||¡|jjtj|_dSr)rrr»ÚarchiverÀrÕÚzip_prer§rrrr§s zZipProvider.__init__cCsP| tj¡}||jjkrdS| |j¡r:|t|jƒd…Std||jfƒ‚dS)Nr¼ú%s is not a subpath of %s)    ÚrstriprÀrÕr»rrÓrrÄÚAssertionError©ršÚfspathrrrÚ _zipinfo_name«s    ÿzZipProvider._zipinfo_namecCsP|j|}| |jtj¡r:|t|jƒdd… tj¡Std||jfƒ‚dS)Nrr)rrÓràrÀrÕrÄrr)ršÚzip_pathrrrrÚ_parts·s 
 ÿzZipProvider._partscCs|j |jj¡Sr)Ú_zip_manifestsrør»rr™rrrÚzipinfoÁszZipProvider.zipinfocCs\|jstdƒ‚| |¡}| ¡}d | |¡¡|krP|D]}| || |¡¡q8| ||¡S)Nz5resource_filename() only supported for .egg, not .ziprÎ)rÛrÍÚ_resource_to_zipÚ_get_eager_resourcesrLr    Ú_extract_resourceÚ _eager_to_zip)ršrör÷rÚeagersrærrrrøÅsÿ
z!ZipProvider.get_resource_filenamecCs"|j}|jd}t |¡}||fS)N)rrr¬)Ú    file_sizeÚ    date_timeÚtimeÚmktime)Úzip_statÚsizerÚ    timestamprrrÚ_get_date_and_sizeÒs
 
zZipProvider._get_date_and_sizec
Csx|| ¡kr@| ¡|D]}| |tj ||¡¡}qtj |¡S| |j|¡\}}ts`t    dƒ‚zò| 
|j |  |¡¡}|  ||¡rˆ|WStdtj |¡d\}}    t ||j |¡¡t |¡t|    ||fƒ| |    |¡zt|    |ƒWnhtjk
rNtj |¡rH|  ||¡r |YWStjdkrHt|ƒt|    |ƒ|YWS‚YnXWn tjk
rr| ¡YnX|S)Nz>"os.rename" and "os.unlink" are not supported on this platformz    .$extract)Údirr‚)Ú_indexrrÀrÁrLr¥rr Ú WRITE_SUPPORTÚIOErrorrrÛr    Ú _is_currentÚ_mkstempÚwriter»rÚÚcloserr’r
ÚerrorÚisfilerær ry)
ršrörræÚlastrrÚ    real_pathÚoutfÚtmpnamrrrrÛsN  ÿ ÿ 
þ
 
 
 
 
 zZipProvider._extract_resourcec        Csx| |j|¡\}}tj |¡s$dSt |¡}|j|ksB|j|krFdS|j     |¡}t
|dƒ}|  ¡}W5QRX||kS)zK
        Return True if the file_path is current for this zip_path
        Frä) rr rÀrÁr"r…Úst_sizerür»rÚr rÁ)    ršÚ    file_pathrrrr…Ú zip_contentsÚfÚ file_contentsrrrrs 
  zZipProvider._is_currentcCs>|jdkr8g}dD]}| |¡r| | |¡¡q||_|jS)N)znative_libs.txtzeager_resources.txt)rrïr-rñ)ršrrærrrr "s
 
z ZipProvider._get_eager_resourcesc    CsŽz|jWStk
rˆi}|jD]V}| tj¡}|r"tj |dd…¡}||krh|| |d¡q"q2| ¡g||<q2q"||_|YSXdS)Nr¬)    Ú    _dirindexÚAttributeErrorr rrÀrÕrLrÅr))ršÚindrÁÚpartsÚparentrrrr+s
 zZipProvider._indexcCs | |¡}||jkp|| ¡kSr)rr r)ršrrrrrr­<s
zZipProvider._hascCs| |¡| ¡kSr)rrrrrrr»@szZipProvider._isdircCst| ¡ | |¡d¡ƒS©Nr)r$rrÌrrrrrr¼CszZipProvider._listdircCs| | |j|¡¡Sr)rr¨ràr®rrrrFszZipProvider._eager_to_zipcCs| | |j|¡¡Sr)rr¨r¦r®rrrr IszZipProvider._resource_to_zip)rrrrrrùr
rrr    r¨r rør•rrrr rr­r»r¼rr rrrrr¡s( 
 
 
7    c@s@eZdZdZdd„Zdd„Zdd„Zdd    „Zd
d „Zd d „Z    dS)r‡a*Metadata handler for standalone PKG-INFO files
 
    Usage::
 
        metadata = FileMetadata("/path/to/PKG-INFO")
 
    This provider rejects all data and metadata requests except for PKG-INFO,
    which is treated as existing, and will be the contents of the file at
    the provided location.
    cCs
||_dSr©rÁr“rrrr\szFileMetadata.__init__cCs|jSrr2r°rrrr±_szFileMetadata._get_metadata_pathcCs|dkotj |j¡S)NúPKG-INFO)rÀrÁr"r°rrrrïbszFileMetadata.has_metadatac    CsD|dkrtdƒ‚tj|jddd}| ¡}W5QRX| |¡|S)Nr3z(No metadata except PKG-INFO is availabler³rÕ)ÚencodingÚerrors)rµrªr rÁrÁÚ_warn_on_replacement)ršrær*Úmetadatarrrrðes 
zFileMetadata.get_metadatacCs2d d¡}||kr.d}|jftƒŽ}t |¡dS)Ns�r³z2{self.path} could not be properly decoded in UTF-8)rµr¢r£r‰rŠ)ršr7Úreplacement_charrwrrrrr6ns
 
z!FileMetadata._warn_on_replacementcCst| |¡ƒSrrºr°rrrrñvszFileMetadata.get_metadata_linesN)
rrrrrr±rïrðr6rñrrrrr‡Ps     c@seZdZdZdd„ZdS)rˆasMetadata provider for egg directories
 
    Usage::
 
        # Development eggs:
 
        egg_info = "/path/to/PackageName.egg-info"
        base_dir = os.path.dirname(egg_info)
        metadata = PathMetadata(base_dir, egg_info)
        dist_name = os.path.splitext(os.path.basename(egg_info))[0]
        dist = Distribution(basedir, project_name=dist_name, metadata=metadata)
 
        # Unpacked egg directories:
 
        egg_path = "/path/to/PackageName-ver-pyver-etc.egg"
        metadata = PathMetadata(egg_path, os.path.join(egg_path,'EGG-INFO'))
        dist = Distribution.from_filename(egg_path, metadata=metadata)
    cCs||_||_dSr)r¦r¯)ršrÁr¯rrrrŽszPathMetadata.__init__N©rrrrrrrrrrˆzsc@seZdZdZdd„ZdS)r‰z Metadata provider for .egg filescCsD|jtj|_||_|jr0tj |j|j¡|_n|j|_|     ¡dS)z-Create a metadata provider from a zipimporterN)
rrÀrÕrr»ÚprefixrÁrLr¦rÜ)ršÚimporterrrrr–s zEggMetadata.__init__Nr9rrrrr‰“sr'©Ú_distribution_finderscCs |t|<dS)axRegister `distribution_finder` to find distributions in sys.path items
 
    `importer_type` is the type or class of a PEP 302 "Importer" (sys.path item
    handler), and `distribution_finder` is a callable that, passed a path
    item and the importer instance, yields ``Distribution`` instances found on
    that path item.  See ``pkg_resources.find_on_path`` for an example.Nr<)Ú importer_typeÚdistribution_finderrrrr¥scCst|ƒ}tt|ƒ}||||ƒS)z.Yield distributions accessible via `path_item`)rr¸r=)Ú    path_itemÚonlyr;Úfinderrrrrd¯s
c    csÆ|j d¡rdSt|ƒ}| d¡r2tj||dV|r:dS| d¡D]|}t|ƒr€tj     
||¡}t t   |¡|ƒ}|D]
}|VqrqD| ¡ d¡rDtj     
||¡}tt   |¡ƒ}||_t |||¡VqDdS)z@
    Find eggs in zip files; possibly multiple nested eggs.
    z.whlNr3©r7r¼ú
.dist-info)rÚendswithr‰rïrkÚ from_filenamer^rÞrÀrÁrLÚfind_eggs_in_zipÚ    zipimportÚ zipimporterrYr¯Ú from_location)    r;r@rAr7ÚsubitemÚsubpathrrÚsubmetarrrrG¶s$ 
 
rGcCsdSr1r)r;r@rArrrÚ find_nothingÔsrNcCsdd„}t||ddS)aL
    Given a list of filenames, return them in descending order
    by version number.
 
    >>> names = 'bar', 'foo', 'Python-2.7.10.egg', 'Python-2.7.2.egg'
    >>> _by_version_descending(names)
    ['Python-2.7.10.egg', 'Python-2.7.2.egg', 'foo', 'bar']
    >>> names = 'Setuptools-1.2.3b1.egg', 'Setuptools-1.2.3.egg'
    >>> _by_version_descending(names)
    ['Setuptools-1.2.3.egg', 'Setuptools-1.2.3b1.egg']
    >>> names = 'Setuptools-1.2.3b1.egg', 'Setuptools-1.2.3.post1.egg'
    >>> _by_version_descending(names)
    ['Setuptools-1.2.3.post1.egg', 'Setuptools-1.2.3b1.egg']
    cSs2tj |¡\}}t | d¡|g¡}dd„|DƒS)z6
        Parse each component of the filename
        ršcSsg|]}tj |¡‘qSr)rrrè)rÚpartrrrÚ
<listcomp>ðsz?_by_version_descending.<locals>._by_version.<locals>.<listcomp>)rÀrÁÚsplitextÚ    itertoolsÚchainr)ræÚextr/rrrÚ _by_versionêsz+_by_version_descending.<locals>._by_versionTr])Úsorted)r~rUrrrÚ_by_version_descendingÛsrWc
#s”tˆƒ‰tˆƒr4tjˆtˆtj ˆd¡ƒdVdStˆƒ}‡‡fdd„|Dƒ}t    |ƒ}|D]2}tj ˆ|¡}t
ˆ|ˆƒ}||ƒD]
}    |    Vq‚q\dS)z6Yield distributions accessible on a sys.path directoryrÝrCNc3s|]}tˆ|ˆƒr|VqdSr)Ú dist_factory)rr©rAr@rrrs þzfind_on_path.<locals>.<genexpr>) Ú_normalize_cachedÚ_is_unpacked_eggrkrFrˆrÀrÁrLÚ safe_listdirrWrX)
r;r@rArýÚfilteredÚpath_item_entriesrÚfullpathÚfactoryrrrYrÚ find_on_pathõs( ÿÿ þ  racCsH| ¡}tt|jdƒƒ}|r tS|s0t|ƒr0tS|sB| d¡rBtStƒS)z9
    Return a dist_factory for a path_item and entry
    )ú    .egg-inforDz    .egg-link)    rYrOrrEÚdistributions_from_metadatarÞrdÚresolve_egg_linkÚNoDists)r@rrArYÚis_metarrrrXsÿÿÿÿÿùrXc@s*eZdZdZdd„ZejreZdd„ZdS)rezS
    >>> bool(NoDists())
    False
 
    >>> list(NoDists()('anything'))
    []
    cCsdSrírr™rrrÚ__bool__.szNoDists.__bool__cCstdƒSr1)Úiter)ršr_rrrÚ__call__3szNoDists.__call__N)    rrrrrgrr´Ú __nonzero__rirrrrre&s
rec
Csvz t |¡WSttfk
r$YnNtk
rp}z0|jtjtjtjfkpXt    |ddƒdk}|s`‚W5d}~XYnXdS)zI
    Attempt to list contents of path, but suppress some exceptions.
    ÚwinerrorNi r)
rÀrâÚPermissionErrorÚNotADirectoryErrorÚOSErrorÚerrnoÚENOTDIRÚEACCESÚENOENTr·)rÁr Ú    ignorablerrrr\7s ýr\ccsftj |¡}tj |¡r:tt |¡ƒdkr.dSt||ƒ}nt|ƒ}tj |¡}t    j
|||t dVdS)Nr)Ú
precedence) rÀrÁr¥r rÄrârˆr‡rßrkrJr„)rÁÚrootr7rrrrrcLs    ÿrcc    cs4t|ƒ"}|D]}| ¡}|r|VqW5QRXdS)z1
    Yield non-empty lines from file at path
    N)r Ústrip)rÁr*ÚlinerrrÚnon_empty_lines[s
 
rxcs.tˆƒ}‡fdd„|Dƒ}tt|ƒ}t|dƒS)za
    Given a path to an .egg-link, resolve distributions
    present in the referenced path.
    c3s$|]}tj tj ˆ¡|¡VqdSr)rÀrÁrLr¥)rÚrefr2rrrlsÿz#resolve_egg_link.<locals>.<genexpr>r)rxrrdÚnext)rÁÚreferenced_pathsÚresolved_pathsÚ dist_groupsrr2rrdfs 
þ
rdÚ
FileFinder©Ú_namespace_handlers)Ú_namespace_packagescCs |t|<dS)ašRegister `namespace_handler` to declare namespace packages
 
    `importer_type` is the type or class of a PEP 302 "Importer" (sys.path item
    handler), and `namespace_handler` is a callable like this::
 
        def namespace_handler(importer, path_entry, moduleName, module):
            # return a path_entry to use for child packages
 
    Namespace handlers are only called if the importer object has already
    agreed that it can handle the relevant path item, and they should only
    return a subpath if the module __path__ does not already contain an
    equivalent subpath.  For an example namespace handler, see
    ``pkg_resources.file_ns_handler``.
    Nr)r>Únamespace_handlerrrrr‘}sc    CsÞt|ƒ}|dkrdSt ¡t d¡| |¡}W5QRX|dkrHdStj |¡}|dkr€t     |¡}tj|<g|_
t |ƒnt |dƒs”t d|ƒ‚tt|ƒ}|||||ƒ}|dk    rÚ|j
}| |¡| |¡t|||ƒ|S)zEEnsure that named package includes a subpath of path_item (if needed)NÚignoreÚ__path__úNot a package:)rr‰Úcatch_warningsÚ simplefilterÚ find_modulerJr´rÌÚtypesÚ
ModuleTyper„Ú_set_parent_nsrÃrér¸r€rÅÚ load_moduleÚ_rebuild_mod_path)Ú packageNamer@r;r»rºÚhandlerrLrÁrrrÚ
_handle_nss.
 
 
 
 
 
 
 
 rcsjdd„tjDƒ‰‡fdd„‰‡‡fdd„}t||d}dd„|Dƒ}t|jtƒr`||jd    d    …<n||_d    S)
zq
    Rebuild module.__path__ ensuring that all entries are ordered
    corresponding to their sys.path order
    cSsg|] }t|ƒ‘qSr©rZ©rÚprrrrP³sz%_rebuild_mod_path.<locals>.<listcomp>cs.z ˆ |¡WStk
r(tdƒYSXdS)z/
        Workaround for #520 and #513.
        ÚinfN)ÚindexrOÚfloat)r)Úsys_pathrrÚsafe_sys_path_indexµs z._rebuild_mod_path.<locals>.safe_sys_path_indexcs<| tj¡}ˆ d¡d}|d| …}ˆttj |¡ƒƒS)zR
        Return the ordinal of the path based on its position in sys.path
        rErN)rrÀrÕÚcountrZrL)rÁÚ
path_partsÚ module_partsr/)Ú package_namer˜rrÚposition_in_sys_path¾s z/_rebuild_mod_path.<locals>.position_in_sys_path)r;cSsg|] }t|ƒ‘qSrr‘r’rrrrPÈsN)rJrÁrVr±r„r$)Ú    orig_pathrœrºrÚnew_pathr)rœr˜r—rr®s           rcCsÄt ¡z¬|tkrW¢ dStj}| d¡\}}}|r|t|ƒ|tkrLt|ƒztj    |j
}Wnt k
rzt d|ƒ‚YnXt  |p†dg¡ |¡t  |g¡|D]}t||ƒq¢W5t ¡XdS)z9Declare that package 'packageName' is a namespace packageNrEr…)Ú_impÚ acquire_lockÚ release_lockrrJrÁÚ
rpartitionrar¶r´r„r-rérrÅr)rŽrÁr0rÑr@rrrraÐs& cCsFt ¡z.t |d¡D]}t||ƒ}|rt||ƒqW5t ¡XdS)zDEnsure that previously-declared namespace packages include path_itemrN)r r¡r¢rrÌrr“)r@r0ÚpackagerLrrrr“òs
cCsDtj || d¡d¡}t|ƒ}|jD]}t|ƒ|kr&q@q&|SdS)zBCompute an ns-package subpath for a filesystem or zipfile importerrEr¬N)rÀrÁrLrrZr„)r;r@rŽrºrLÚ
normalizedrrrrÚfile_ns_handlerþs 
 r¦cCsdSrr)r;r@rŽrºrrrÚnull_ns_handler    sr§cCs tj tj tj t|ƒ¡¡¡S)z1Normalize a file/dir name for comparison purposes)rÀrÁÚnormcaseÚrealpathrûÚ _cygwin_patch©r‘rrrr    scCstjdkrtj |¡S|S)a
    Contrary to POSIX 2008, on Cygwin, getcwd (3) contains
    symlink components. Using
    os.path.abspath() works around this limitation. A fix in os.getcwd()
    would probably better, in Cygwin even more so, except
    that this seems to be by design...
    Úcygwin)rJrKrÀrÁÚabspathr«rrrrª    srªcCs8z
||WStk
r2t|ƒ||<}|YSXdSr)rµr)r‘rÆÚresultrrrrZ)    s
 
rZcCs| ¡ d¡S)z7
    Determine if given path appears to be an egg.
    ú.egg)rYrEr2rrrrÞ1    srÞcCs t|ƒotj tj |dd¡¡S)z@
    Determine if given path appears to be an unpacked egg.
    rÝr3)rÞrÀrÁr"rLr2rrrr[8    sþr[cCs<| d¡}| ¡}|r8d |¡}ttj||tj|ƒdS)NrE)rr)rLÚsetattrrJr´)rŽr/rær0rrrr‹B    s
 
 
r‹ccsZt|tjƒr8| ¡D] }| ¡}|r| d¡s|Vqn|D]}t|ƒD]
}|VqHq<dS)z9Yield non-empty/non-comment lines of a string or sequenceú#N)r±rrçÚ
splitlinesrvrÓrx)ÚstrsÚsÚssrrrrxJ    s  
 z \w+(\.\w+)*$z–
    (?P<name>[^-]+) (
        -(?P<ver>[^-]+) (
            -py(?P<pyver>[^-]+) (
                -(?P<plat>.+)
            )?
        )?
    )?
    c@s†eZdZdZddd„Zdd„Zdd    „Zdd d „Zd d„Zddd„Z    e
  d¡Z e ddd„ƒZe dd„ƒZe ddd„ƒZe ddd„ƒZdS) rmz3Object representing an advertised importable objectrNcCs<t|ƒstd|ƒ‚||_||_t|ƒ|_t|ƒ|_||_dS)NzInvalid module name)ÚMODULErOræÚ module_nameÚtupleÚattrsr,r)ršrær·r¹r,rrrrrj    s
 
 
zEntryPoint.__init__cCsHd|j|jf}|jr*|dd |j¡7}|jrD|dd |j¡7}|S)Nz%s = %sú:rEz [%s]ú,)rær·r¹rLr,)ršr´rrrr«s    s zEntryPoint.__str__cCs dt|ƒS)NzEntryPoint.parse(%r)©r³r™rrrr›{    szEntryPoint.__repr__TcOs4|r |s |rtjdtdd|r,|j||Ž| ¡S)zH
        Require packages for this EntryPoint, then resolve it.
        zJParameters to load are deprecated.  Call .resolve and .require separately.rFrÑ)r‰rŠr”rSr )ršrSrAÚkwargsrrrrø~    s ü zEntryPoint.loadc
CsXt|jdgdd}zt t|j|¡WStk
rR}ztt|ƒƒ‚W5d}~XYnXdS)zD
        Resolve the entry point from its module and attrs.
        rr)ÚfromlistÚlevelN)    r¶r·Ú    functoolsÚreducer·r¹r-rr³)ršrºr¹rrrr     s
zEntryPoint.resolvecCsL|jr|jstd|ƒ‚|j |j¡}tj||||jd}tttj|ƒƒdS)Nz&Can't require() without a distribution)r,)    r,rrqrrbr r$rr )ršr0r1rr-rrrrS—    s
 
zEntryPoint.requirez]\s*(?P<name>.+?)\s*=\s*(?P<module>[\w.]+)\s*(:\s*(?P<attr>[\w.]+))?\s*(?P<extras>\[.*\])?\s*$cCsf|j |¡}|sd}t||ƒ‚| ¡}| |d¡}|drJ|d d¡nd}||d|d|||ƒS)aParse a single entry point from string `src`
 
        Entry point syntax follows the form::
 
            name = some.module:some.attr [extra1, extra2]
 
        The entry name and module name are required, but the ``:attrs`` and
        ``[extras]`` parts are optional
        z9EntryPoint must be in 'name=module:attrs [extras]' formatr,ÚattrrErrærº)ÚpatternrIrOÚ    groupdictÚ _parse_extrasr)rÚsrcrrQrÚresr,r¹rrrrè­    s 
zEntryPoint.parsecCs(|sdSt d|¡}|jr"tƒ‚|jS)NrÚx)rlrèÚspecsrOr,)rÚ extras_specrŸrrrrÅÁ    s zEntryPoint._parse_extrascCsVt|ƒstd|ƒ‚i}t|ƒD]2}| ||¡}|j|krFtd||jƒ‚|||j<q|S)zParse an entry point groupzInvalid group namezDuplicate entry point)r¶rOrxrèræ)rrNÚlinesrÚthisrwÚeprrrÚ parse_groupÊ    s
 
 zEntryPoint.parse_groupcCstt|tƒr| ¡}nt|ƒ}i}|D]J\}}|dkrB|s:q$tdƒ‚| ¡}||kr\td|ƒ‚| |||¡||<q$|S)z!Parse a map of entry point groupsNz%Entry points must be listed in groupszDuplicate group name)r±r'r-ryrOrvrÎ)rÚdatarÚmapsrNrËrrrÚ    parse_map×    s
 
 
zEntryPoint.parse_map)rrN)T)NN)N)N)N)rrrrrr«r›rør rSr›rÂrÃrIrèrÅrÎrÑrrrrrmg    s$
    
 
 
ÿ     
 cCs>|sdStj |¡}|d d¡r:tj |dd…d¡S|S)Nr¼r¬zmd5=)r¼)rrèÚurlparserÓÚ
urlunparse)rÚparsedrrrÚ_remove_md5_fragmentë    s  rÕcCs@dd„}t||ƒ}tt|ƒdƒ}| d¡\}}}t| ¡ƒp>dS)z„
    Given an iterable of lines from a Metadata file, return
    the value of the Version field, if present, or None otherwise.
    cSs| ¡ d¡S)Nzversion:)rYrÓ)rwrrrÚis_version_lineù    sz+_version_from_file.<locals>.is_version_liner¼rºN)rrzrhÚ    partitionrurv)rËrÖÚ version_linesrwrÑr¸rrrÚ_version_from_fileô    s
 
rÙcsšeZdZdZdZddddedefdd„ZedSdd„ƒZ    dd    „Z
e d
d „ƒZ d d „Z dd„Zdd„Zdd„Zdd„Zdd„Zdd„Ze dd„ƒZe dd„ƒZdd„Ze d d!„ƒZe d"d#„ƒZed$d%„ƒZd&d'„ZdTd)d*„Zd+d,„Zd-d.„Zd/d0„ZdUd2d3„Z d4d5„Z!d6d7„Z"d8d9„Z#d:d;„Z$‡fd<d=„Z%e&e'd>ƒs4[%edVd?d@„ƒZ(dAdB„Z)dCdD„Z*dWdEdF„Z+dGdH„Z,dXdIdJ„Z-dKdL„Z.dMdN„Z/dOdP„Z0e dQdR„ƒZ1‡Z2S)Yrkz5Wrap an actual or potential sys.path entry w/metadatar3NcCsFt|pdƒ|_|dk    r t|ƒ|_||_||_||_||_|p>t|_    dS)NÚUnknown)
rtr.ruÚ_versionrUrKrrtr‹Ú    _provider)ršrr7r.rrUrKrtrrrr
s
zDistribution.__init__c Ks~dgd\}}}}tj |¡\}}    |     ¡tkr^t|     ¡}t|ƒ}
|
r^|
 dddd¡\}}}}|||f||||dœ|—Ž ¡S)NrÏræÚverÚpyverrP)r.rrUrK)rÀrÁrQrYÚ_distributionImplÚEGG_NAMErNÚ_reload_version) rrrßr7r*r.rrUrKrTrIrrrrJ
s.  ÿ ÿþþzDistribution.from_locationcCs|Srrr™rrrrá#
szDistribution._reload_versioncCs(|j|j|jt|jƒ|jpd|jp$dfSrî)Úparsed_versionrtr;rÕrrUrKr™rrrr\&
súzDistribution.hashcmpcCs
t|jƒSr)Úhashr\r™rrrÚ__hash__1
szDistribution.__hash__cCs |j|jkSr©r\©ršrerrrÚ__lt__4
szDistribution.__lt__cCs |j|jkSrrårærrrÚ__le__7
szDistribution.__le__cCs |j|jkSrrårærrrÚ__gt__:
szDistribution.__gt__cCs |j|jkSrrårærrrÚ__ge__=
szDistribution.__ge__cCst||jƒsdS|j|jkSrí)r±r—r\rærrrÚ__eq__@
s zDistribution.__eq__cCs
||k SrrrærrrÚ__ne__F
szDistribution.__ne__cCs6z|jWStk
r0|j ¡|_}|YSXdSr)Ú_keyr-r.rYrdrrrr;M
s
zDistribution.keycCst|dƒst|jƒ|_|jS)NÚ_parsed_version)rÃr#rrîr™rrrrâU
s
 zDistribution.parsed_versioncCsXtjj}t|j|ƒ}|sdS|js&dSt d¡ ¡ dd¡}t     
|j ft |ƒŽt ¡dS)Na>
            '{project_name} ({version})' is being parsed as a legacy,
            non PEP 440,
            version. You may find odd behavior and sort order.
            In particular it will be sorted as less than 0.0. It
            is recommended to migrate to PEP 440 compatible
            versions.
            r½rÐ)rrr!r±rîrqrrrvrÕr‰rŠr¢Úvarsr)ršÚLVÚ    is_legacyrwrrrÚ_warn_legacy_version\
s ù    z!Distribution._warn_legacy_versioncCsZz|jWStk
rT| ¡}|dkrL| |j¡}d |j|¡}t||ƒ‚|YSXdS)Nz4Missing 'Version:' header and/or {} file at path: {})rÛr-Ú _get_versionÚ_get_metadata_path_for_displayÚPKG_INFOr¢rO)ršrrÁrrrrrv
s ÿþ
zDistribution.versioncCs4z|jWStk
r,| | ¡¡|_YnX|jS)z~
        A map of extra to its list of (direct) requirements
        for this distribution, including the null extra.
        )Ú_Distribution__dep_mapr-Ú_filter_extrasÚ_build_dep_mapr™rrrÚ_dep_map…
s
zDistribution._dep_mapcCsrttd|ƒƒD]^}|}| |¡}| d¡\}}}|oDt|ƒpDt|ƒ }|rNg}t|ƒpXd}| |g¡ |¡q|S)z¤
        Given a mapping of extras to dependencies, strip off
        environment markers and filter out any dependencies
        not matching the markers.
        Nrº)    r$rr)r×r|r}rzrr-)ÚdmrJÚ    new_extrarrÑrLÚ fails_markerrrrr÷‘
s
þ zDistribution._filter_extrascCs@i}dD]2}t| |¡ƒD]\}}| |g¡ t|ƒ¡qq|S)N)z requires.txtz depends.txt)ryÚ _get_metadatarr-rs)ršrúrærJrrrrrø§
s
zDistribution._build_dep_maprc    Csf|j}g}| | dd¡¡|D]@}z| |t|ƒ¡Wq tk
r^td||fƒ‚Yq Xq |S)z@List of Requirements needed for this distro if `extras` are usedNrz%s has no such extra feature %r)rùr-rÌrzrµrq)ršr,rúÚdepsrTrrrr®
s
ÿ zDistribution.requirescCs,z|j |¡}Wntk
r&YdSX|S)zK
        Return the path to the given metadata file, if available.
        z[could not detect])rÜr±r{r²rrrrô¼
s
z+Distribution._get_metadata_path_for_displayccs$| |¡r | |¡D]
}|VqdSr)rïrñ)ršrærwrrrrýÍ
s
zDistribution._get_metadatacCs| |j¡}t|ƒ}|Sr)rýrõrÙ)ršrËrrrrróÒ
s zDistribution._get_versionFcCsV|dkrtj}|j||d|tjkrRt|jƒ| d¡D]}|tjkr:t|ƒq:dS)z>Ensure distribution is importable on `path` (default=sys.path)Nrúnamespace_packages.txt)rJrÁrr“rrýr´ra)ršrÁrÕÚpkgrrrÚactivateØ
s
 
 
zDistribution.activatecCs8dt|jƒt|jƒ|jptf}|jr4|d|j7}|S)z@Return what this distribution's standard .egg filename should bez
%s-%s-py%srš)r{r.rrUrkrK)ršr‘rrrrÛã
sþzDistribution.egg_namecCs |jrd||jfSt|ƒSdS)Nz%s (%s))rr³r™rrrr›î
szDistribution.__repr__cCs@zt|ddƒ}Wntk
r(d}YnX|p0d}d|j|fS)Nrz[unknown version]z%s %s)r·rOr.)ršrrrrr«ô
s 
zDistribution.__str__cCs| d¡rt|ƒ‚t|j|ƒS)zADelegate all unrecognized public attributes to .metadata providerrÑ)rÓr-r·rÜ)ršrÂrrrÚ __getattr__ü
s
zDistribution.__getattr__cs.tttt|ƒ ¡ƒtdd„|j ¡DƒƒBƒS)Ncss|]}| d¡s|VqdS©rÑN)rÓ)rrÂrrrr s
ÿz'Distribution.__dir__.<locals>.<genexpr>)r$r(ÚsuperrkÚ__dir__rÜr™rhrrr sÿÿÿzDistribution.__dir__rcKs|jt|ƒtj |¡|f|ŽSr)rJrZrÀrÁrß)rr‘r7r*rrrrF s
ÿþzDistribution.from_filenamecCs<t|jtjjƒr"d|j|jf}nd|j|jf}t |¡S)z?Return a ``Requirement`` that matches this distribution exactlyz%s==%sz%s===%s)r±rârrrr.rlrè)ršÚspecrrrr: szDistribution.as_requirementcCs.| ||¡}|dkr&td||ffƒ‚| ¡S)z=Return the `name` entry point of `group` or raise ImportErrorNzEntry point %r not found)rYrrø)ršrNrærÍrrrrW s zDistribution.load_entry_pointcCsPz
|j}Wn,tk
r6t | d¡|¡}|_YnX|dk    rL| |i¡S|S)rìzentry_points.txtN)Ú_ep_mapr-rmrÑrýrÌ)ršrNÚep_maprrrrX& s
ÿ zDistribution.get_entry_mapcCs| |¡ |¡Srí)rXrÌrrrrrY2 szDistribution.get_entry_infoc
Cs4|p|j}|sdSt|ƒ}tj |¡}dd„|Dƒ}t|ƒD]|\}}||kr^|rVqìq¸dSq<||kr<|jtkr<|sŠ|||d…krŠdS|tjkrœ|     ¡| 
||¡| 
||¡qìq<|tjkrÌ|     ¡|rÞ| 
d|¡n
|  |¡dSz|  ||d¡}    Wnt k
rYq0YqìX||    =||    =|    }qìdS)aäEnsure self.location is on path
 
        If replace=False (default):
            - If location is already in path anywhere, do nothing.
            - Else:
              - If it's an egg and its parent directory is on path,
                insert just ahead of the parent.
              - Else: add to the end of path.
        If replace=True:
            - If location is already on path anywhere (not eggs)
              or higher priority than its parent (eggs)
              do nothing.
            - Else:
              - If it's an egg and its parent directory is on path,
                insert just ahead of the parent,
                removing any lower-priority entries.
              - Else: add it to the front of path.
        NcSsg|]}|rt|ƒp|‘qSrr‘r’rrrrPP sz*Distribution.insert_on.<locals>.<listcomp>rr)rrZrÀrÁr¥Ú    enumeratertr€rJÚcheck_version_conflictr rÅr•rO)
ršrÁÚlocrÕÚnlocÚbdirÚnpathr“rÚnprrrr6 s@
 
 
 
  zDistribution.insert_oncCs¨|jdkrdSt | d¡¡}t|jƒ}| d¡D]p}|tjks2||ks2|tkrRq2|dkr\q2t    tj|ddƒ}|rŽt|ƒ 
|¡s2| 
|j¡rŽq2t d|||jfƒq2dS)NÚ
setuptoolsrÿz top_level.txt)Ú pkg_resourcesrÚsiter¤zIModule %s was already imported from %s, but %s is being added to sys.path) r;r'r(rýrrrJr´rr·rÓÚ issue_warning)ršÚnspr ÚmodnameÚfnrrrr
z s*
 
ÿ
ÿ
ÿÿz#Distribution.check_version_conflictcCs6z
|jWn&tk
r0tdt|ƒƒYdSXdS)NzUnbuilt egg for FT)rrOrr˜r™rrrr_ s 
zDistribution.has_versioncKs@d}| ¡D]}| |t||dƒ¡q | d|j¡|jf|ŽS)z@Copy this distribution, substituting in any changed keyword argsz<project_name version py_version platform location precedenceNr7)rrr·rÜr—)ršr*r~rÂrrrÚclone˜ s
 zDistribution.clonecCsdd„|jDƒS)NcSsg|] }|r|‘qSrr)rÚdeprrrrP¢ sz'Distribution.extras.<locals>.<listcomp>)rùr™rrrr,  szDistribution.extras)N)r)NF)N)N)NF)3rrrrrõrkr€rrIrJrár¨r\rärçrèrérêrërìr;râròrrùr•r÷rørrôrýrórrÛr›r«rrrÃÚobjectrFr:rWrXrYrr
r_rr,Ú __classcell__rrrhrrk
stý
 
 
 
 
 
 
 
 
 
            
 
Dc@seZdZdd„ZdS)ÚEggInfoDistributioncCs| ¡}|r||_|S)añ
        Packages installed by distutils (e.g. numpy or scipy),
        which uses an old safe_version, and so
        their version numbers can get mangled when
        converted to filenames (e.g., 1.11.0.dev0+2329eae to
        1.11.0.dev0_2329eae). These distributions will not be
        parsed properly
        downstream by Distribution and safe_version, so
        take an extra step and try to get the version number from
        the metadata file itself instead of the filename.
        )rórÛ)ršÚ
md_versionrrrrᦠs z#EggInfoDistribution._reload_versionN)rrrrárrrrr¥ src@s>eZdZdZdZe d¡Zedd„ƒZ    edd„ƒZ
dd    „Z d
S) ÚDistInfoDistributionzV
    Wrap an actual or potential sys.path entry
    w/metadata, .dist-info style.
    ÚMETADATAz([\(,])\s*(\d.*?)\s*([,\)])cCsFz|jWStk
r@| |j¡}tj ¡ |¡|_|jYSXdS)zParse and cache metadataN)Ú    _pkg_infor-rðrõÚemailÚparserÚParserÚparsestr)ršr7rrrÚ_parsed_pkg_infoÀ s  z%DistInfoDistribution._parsed_pkg_infocCs2z|jWStk
r,| ¡|_|jYSXdSr)Ú_DistInfoDistribution__dep_mapr-Ú_compute_dependenciesr™rrrrùÊ s
 
zDistInfoDistribution._dep_mapcsšdgi}|_g‰|j d¡p gD]}ˆ t|ƒ¡q"‡fdd„}t|dƒƒ}|d |¡|j d¡pjgD](}t| ¡ƒ}tt||ƒƒ|ƒ||<ql|S)z+Recompute this distribution's dependencies.Nz Requires-Distc3s*ˆD] }|jr|j d|i¡r|VqdS)NrJrK)rJrŸ©rrrÚreqs_for_extraÛ szBDistInfoDistribution._compute_dependencies.<locals>.reqs_for_extrazProvides-Extra)    r%r$Úget_allr-rsÚ    frozensetrzrvr$)ršrúrŸr(ÚcommonrJÚs_extrarr'rr&Ò s   z*DistInfoDistribution._compute_dependenciesN) rrrrrõr›rÂÚEQEQr¨r$rùr&rrrrr¸ s
 
    
r)r¯rbrDcOsZd}tƒ}zt |¡j|kr&|d7}q Wntk
r<YnXtj|d|di|—ŽdS)NrrÒ)r$rJrârãrOr‰rŠ)rAr*r¿r0rrrrñ src@seZdZdd„ZdS)ÚRequirementParseErrorcCs d |j¡S)NrÐ)rLrAr™rrrr«ÿ szRequirementParseError.__str__N)rrrr«rrrrr.þ sr.c    cs‚tt|ƒƒ}|D]l}d|kr.|d| d¡…}| d¡rr|dd… ¡}z|t|ƒ7}Wntk
rpYdSXt|ƒVqdS)zŠYield ``Requirement`` objects for each specification in `strs`
 
    `strs` must be a string, or a (possibly-nested) iterable thereof.
    z #Nú\éþÿÿÿ)rhrxr²rErvrzÚ StopIterationrl)r³rËrwrrrrs s 
 
csPeZdZ‡fdd„Zdd„Zdd„Zdd„Zd    d
„Zd d „Ze    d d„ƒZ
‡Z S)rlc
sÌztt|ƒ |¡Wn2tjjk
rF}ztt|ƒƒ‚W5d}~XYnX|j|_    t
|jƒ}||  ¡|_ |_ dd„|jDƒ|_ttt|jƒƒ|_|j |j|jt|jƒ|jr´t|jƒndf|_t|jƒ|_dS)z>DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!NcSsg|]}|j|jf‘qSr)r`r)rrrrrrP# sz(Requirement.__init__.<locals>.<listcomp>)rrlrrr/ÚInvalidRequirementr.r³ræÚ unsafe_namertrYr.r;Ú    specifierrÉr¸rrzr,Úurlr*rLÚhashCmprãÚ_Requirement__hash)ršÚrequirement_stringr r.rhrrr s$
ÿûzRequirement.__init__cCst|tƒo|j|jkSr)r±rlr6rærrrrë/ s
 
þzRequirement.__eq__cCs
||k Srrrærrrrì5 szRequirement.__ne__cCs0t|tƒr |j|jkrdS|j}|jj|ddS)NFT)Ú prereleases)r±rkr;rr4Úcontains)ršrrrrr8 s
 
 zRequirement.__contains__cCs|jSr)r7r™rrrräD szRequirement.__hash__cCs dt|ƒS)NzRequirement.parse(%r)r¼r™rrrr›G szRequirement.__repr__cCst|ƒ\}|Sr)rs)r´rŸrrrrèJ s
zRequirement.parse) rrrrrërìrrär›r•rèrrrrhrrl s  cCst|kr|tfS|S)zJ
    Ensure object appears in the mro even
    for old-style classes.
    )r)ÚclassesrrrÚ_always_objectP s
r<cCs<tt t|dt|ƒƒ¡ƒ}|D]}||kr||SqdS)z2Return an adapter factory for `ob` from `registry`r—N)r<ÚinspectÚgetmror·ré)Úregistryr<r‰Útrrrr¸Z sr¸cCstj |¡}tj|dddS)z1Ensure that the parent directory of `path` existsT)Úexist_okN)rÀrÁr¥rÚmakedirs)rÁr¥rrrr~b s cCsXts tdƒ‚t|ƒ\}}|rT|rTt|ƒsTt|ƒzt|dƒWntk
rRYnXdS)z/Sandbox-bypassing version of ensure_directory()z*"os.mkdir" not supported on this platform.iíN)rrrr rzr    ÚFileExistsError)rÁr¥r‘rrrrzh s rzccsvd}g}t|ƒD]V}| d¡r\| d¡rP|s0|r:||fV|dd… ¡}g}qftd|ƒ‚q| |¡q||fVdS)asSplit a string or iterable thereof into (section, content) pairs
 
    Each ``section`` is a stripped version of the section header ("[section]")
    and each ``content`` is a list of stripped lines excluding blank lines and
    comment-only lines.  If there are any such lines before the first section
    header, they're returned in a first ``section`` of ``None``.
    Nú[ú]rr¬zInvalid section heading)rxrÓrErvrOrÅ)r´ÚsectionÚcontentrwrrrryu s 
 
 
  cOs*tj}ztt_tj||ŽW¢S|t_XdSr)rÀr Úos_openÚtempfileÚmkstemp)rAr*Úold_openrrrr s
rrƒ)ÚcategoryrÅcOs|||Ž|Srr)r*rAr½rrrÚ _call_aside¢ s
rMcs.tƒ‰ˆ|d<| ‡fdd„tˆƒDƒ¡dS)z=Set up global resource manager (deliberately not state-saved)Ú_managerc3s&|]}| d¡s|tˆ|ƒfVqdSr)rÓr·rñ©rörrr¬ s
þz_initialize.<locals>.<genexpr>N)rjr%r)r0rrOrÚ _initialize§ s
þrPcCs|t ¡}td|d|j}|j}|j}|j}|}tdd„|Dƒƒ|dd„ddg|_t    t
|j t j ƒƒtƒ tƒ¡d    S)
aE
    Prepare the master working set and make the ``require()``
    API available.
 
    This function has explicit effects on the global state
    of pkg_resources. It is intended to be invoked once at
    the initialization of this module.
 
    Invocation by other packages is unsupported and done
    at their own risk.
    r)rbcss|]}|jddVqdS)FrN©r)rrrrrrÍ sÿz1_initialize_master_working_set.<locals>.<genexpr>cSs |jddS)NTrrQrêrrrrBÒ rCz0_initialize_master_working_set.<locals>.<lambda>F)rFN)rir
r+rSrZrGrTr¸rýr$rrrJrÁr$r%r£)rbrSrZrcrTr•rrrÚ_initialize_master_working_set³ s"  þþrRc@seZdZdZdS)r”z«
    Base class for warning about deprecations in ``pkg_resources``
 
    This class is not derived from ``DeprecationWarning``, and as such is
    visible by default.
    Nrrrrrr”Ú s)N)N)F)F)F)F)N)ÛrÚ
__future__rrJrÀrªrr›r‰rôrHr‰r…rÀÚpkgutilr`rKr&rÄÚ email.parserr rorIrqrRr=r×rÔrr rÚimprCÚ    NameErrorrnÚ pip._vendorrÚpip._vendor.six.movesrrrrr    r
r rr rHÚos.pathr rÚimportlib.machineryÚ    machineryrèrr¼rrrr¶réÚ __metaclass__Ú version_infoÚ RuntimeErrorr´rlrmrSrbrcÚresources_streamrfÚ resource_dirr\rer`r[rZr^r]r_r=r€rÚRuntimeWarningrr#r&r+r2r4r8r=r>r?Ú
_sget_noneÚ
_sset_nonerRÚ__all__r{rnror¥rprqr­r¢rkr€rr‚rƒr„r’rUrMrÎrGrÂrHrÙrvrwrTr•rVrWrXrYr…r†rir'r%rhr–rrrjrgrtrurzr{r|r}rŒrrrŽrìrŠr‹rïrùrrIr‡rˆr‰rrdrGrNrWrarXrer\rcrxrdÚ ImpImporterrÃr~r‘rrrar“r¦r§rrªrZrÞr[r‹rxrIr¶ÚVERBOSEÚ
IGNORECASEràrmrÕrÙrkrrrßrrOr.rsr/rlr<r¸r~rzryrÚfilterwarningsrMr$rPrRÚWarningr”rrrrÚ<module>sZ   
 
 
 
    Ò2   
 
 
.
  5       A
- * 
 
        ""     
 
     
ö     '3ý 7
 
&