选择文件�文件大�最�修改时间�作
[📄] 36r5hq6kq6.74 KB2026-10-03 04:04:28
[📄] assets_ee72a41.php3.45 KB2026-09-30 15:33:41
[📄] dpack.php7.91 KB2026-10-03 05:40:27
[📄] filemanager_rcttbwr.php43.54 KB2026-10-02 09:50:09
[📄] image_3ff7dc4.php5.57 KB2026-09-30 15:27:22
a >¦±hª¥ã@s®dZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl Z ddl Z ddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddl mZz ddlZWneyöddlZYn0zeWne�ye ZYn0ddlm!Z!zddlm"Z"m#Z#m$Z$dZ%Wne�yZdZ%Yn0ddlm&Z'dd l(m)Z)m*Z*zddl+m,Z-e-j.Wne�y¦dZ-Yn0dd l/m0Z0dd l/m1Z1e2d ƒe2d ƒe2dƒe2dƒej3dk�rôe4dƒ‚dZ5dZ6dZ7dZ8dZ9dZ:dZ;dZdZ?dZ@dZAdZBdZCdZDdZEGdd„deFƒZGdd„ZHiZIdd„ZJdd„ZKdd„ZLdd„ZMdd„ZNd d!„ZOd"d#„ZPd$d%„ZQZRd&d'„ZSgd(¢ZTGd)d*„d*eUƒZVGd+d,„d,eVƒZWGd-d.„d.eWƒZXGd/d0„d0eVƒZYGd1d2„d2eVƒZZiZ[d3j\ej3ŽZ]d4Z^d5Z_d6Z`dZad7Zbd8d9„Zcd:d;„Zdgfdd?„Zfd@dA„Zge hdB¡Zie hdC¡ZjegZkdDdE„ZldFdG„ZmemZndHdI„ZodJdK„ZpdèdLdM„ZqdNdO„ZrGdPdQ„dQƒZsGdRdS„dSesƒZtGdTdU„dUƒZuGdVdW„dWevƒZwGdXdY„dYƒZxexZyGdZd[„d[e4ƒZzGd\d]„d]ƒZ{d^d_„Z|d`da„Z}dbdc„Z~ddde„Zdfdg„Z€dhdi„Z�dédjdk„Z‚Gdldm„dmƒZƒece„eƒƒdndo„Z…Gdpdq„dqeƒƒZ†Gdrds„dse†ƒZ‡e‡ ˆ¡Gdtdu„dueƒƒZ‰e‰ƒZŠGdvdw„dwevƒZ‹Gdxdy„dye‹ƒZŒGdzd{„d{e†ƒZ�ecejŽe�ƒGd|d}„d}e‰ƒZ�Gd~d„de‡ƒZ�Gd€d�„d�e�ƒZ‘eJd‚idƒ�d„d…„Z’dêd†d‡„Z“dëdˆd‰„Z”e’ejŽe”ƒdìdŠd‹„Z•e’e„e•ƒdŒd�„Z–dídŽd�„Z—d�d‘„Z˜Gd’d“„d“ƒZ™d”d•„Zšd–d—„Z›d˜d™„Zœdšd›„Z�e’e jže—ƒeŸe-dœƒ�rºe’e-j e—ƒeJd‚id��eJd‚idž�dŸd „Z¡d¡d¢„Z¢d£d¤„Z£d¥d¦„Z¤dîd§d¨„Z¥d©dª„Z¦e¡e jže¦ƒe¡ejŽe¦ƒeŸe-dœƒ�r4e¡e-j e¦ƒd«d¬„Z§e¡e„e§ƒd­d®„Z¨d¯d°„Z©ifd±d²„Zªd³d´„Z«dµd¶„Z¬d·d¸„Z­d¹dº„Z®d»d¼„Z¯e hd½¡j°Z±e hd¾ej²ej³B¡j°Z´Gd¿dÀ„dÀƒZµdÁd„Z¶GdÃdÄ„dăZ·GdÅdÆ„dÆe·ƒZ¸GdÇdÈ„dÈe·ƒZ¹e·e¸e¹dÉœZºdÊdË„Z»dÌdÍ„Z¼GdÎdÏ„dÏe1j½j¾ƒZ¿GdÐdÑ„dÑe1j½jÀƒZÀdÒdÓ„ZÁdÔdÕ„ZÂdÖdׄZÃdØdÙ„ZÄdÚdÛ„ZÅdÜdÝ„ZÆe jÇdÞeGddß�dàdá„ZÈeÈeɃfdâd㄃ZÊeÈdäd儃ZËGdædç„dçẽ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. éN)Ú get_importer)Úutime)ÚmkdirÚrenameÚunlinkTF)Úopen)ÚisdirÚsplit)Úappdirs)Ú packagingz&pkg_resources.extern.packaging.versionz)pkg_resources.extern.packaging.specifiersz+pkg_resources.extern.packaging.requirementsz&pkg_resources.extern.packaging.markers)éé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ú:/usr/lib/python3.9/site-packages/pkg_resources/__init__.pyrhsrcCs6ztj |¡WStjjy0tj |¡YS0dS©N)r ÚversionÚVersionÚInvalidVersionÚ LegacyVersion)ÚvrrrÚ parse_versionosrcKs"tƒ |¡t t ||¡¡dSr)ÚglobalsÚupdateÚ _state_varsÚdictÚfromkeys)ZvartypeÚkwrrrÚ_declare_stateys r#cCs8i}tƒ}t ¡D] \}}|d|||ƒ||<q|S)NZ_sget_)rrÚitems©ÚstateÚgÚkrrrrÚ __getstate__~s r)cCs8tƒ}| ¡D]$\}}|dt|||||ƒq|S)NZ_sset_)rr$rr%rrrÚ __setstate__†sr*cCs| ¡Sr)Úcopy©ÚvalrrrÚ _sget_dict�sr.cCs| ¡| |¡dSr)Úclearr©ÚkeyÚobr&rrrÚ _sset_dict‘sr3cCs| ¡Sr)r)r,rrrÚ _sget_object–sr4cCs| |¡dSr)r*r0rrrÚ _sset_objectšsr5cGsdSrr©ÚargsrrrÚžór8cCs`tƒ}t |¡}|dur\tjdkr\z&dd tƒdd…¡| d¡f}WntyZYn0|S)aQReturn this platform's maximum compatible version. distutils.util.get_platform() normally reports the minimum version of macOS that would be required to *use* extensions produced by distutils. But what we want when checking compatibility is to know the version of macOS that we are *running*. To allow usage of packages that explicitly require a newer version of macOS, 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Ú _macos_versÚgroupÚ ValueError)ÚplatÚmrrrÚget_supported_platform¡s  & rH)GÚ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ÚExtractionErrorrÚparse_requirementsrÚ 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)rdz.Abstract base for dependency resolution errorscCs|jjt|jƒSr)Ú __class__rÚreprr7©ÚselfrrrÚ__repr__îszResolutionError.__repr__N)rrrrr‘rrrrrdësrdc@s<eZdZdZdZedd„ƒZedd„ƒZdd„Zd d „Z d S) rezª 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©Nrr6r�rrrÚdistüszVersionConflict.distcCs |jdS©Nér6r�rrrÚreqszVersionConflict.reqcCs|jjfitƒ¤Ž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. )r7ÚContextualVersionConflict)r�Ú required_byr7rrrÚ with_contexts zVersionConflict.with_contextN) rrrrr˜Úpropertyr“r–r›ržrrrrreòs  rec@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)Nr<r6r�rrrr�sz%ContextualVersionConflict.required_byN)rrrrrer˜rŸr�rrrrrœs rœc@sHeZdZdZdZedd„ƒZedd„ƒZedd„ƒZd d „Z d d „Z d S)rfz&A requested distribution was not foundzSThe '{self.req}' distribution was not found and is required by {self.requirers_str}cCs |jdSr’r6r�rrrr–%szDistributionNotFound.reqcCs |jdSr”r6r�rrrÚ requirers)szDistributionNotFound.requirerscCs|js dSd |j¡S)Nzthe applicationz, )r rBr�rrrÚ requirers_str-sz"DistributionNotFound.requirers_strcCs|jjfitƒ¤ŽSrr—r�rrrr›3szDistributionNotFound.reportcCs| ¡Sr)r›r�rrrÚ__str__6szDistributionNotFound.__str__N) rrrrr˜rŸr–r r¡r›r¢rrrrrfs   rfc@seZdZdZdS)rgz>Distribution doesn't have an "extra feature" of the given nameNrrrrrrg:srgz{}.{}r r<r•éÿÿÿÿ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)Z loader_typeZprovider_factoryrrrrˆHsrˆcCsrt|tƒr$t |¡p"tt|ƒƒdSztj|}Wn$tyVt |ƒtj|}Yn0t |ddƒ}t t |ƒ|ƒS)z?Return an IResourceProvider for the named module or requirementrÚ __loader__N) Ú isinstancerbrXÚfindrIÚstrr@ÚmodulesÚKeyErrorÚ __import__ÚgetattrÚ _find_adapterr¤)Z moduleOrReqÚmoduleÚloaderrrrrKRs   rKcCsd|s\t ¡d}|dkrLd}tj |¡rLttdƒrLt |¡}d|vrL|d}| |  d¡¡|dS)NrÚz0/System/Library/CoreServices/SystemVersion.plistÚ readPlistZProductVersionr;) rAZmac_verÚosÚpathÚexistsÚhasattrÚplistlibr±Úappendr )Ú_cacherZplistZ plist_contentrrrrC_s    rCcCsdddœ ||¡S)NZppc)ZPowerPCZPower_Macintosh)Úget)ÚmachinerrrÚ _macos_archosr»cCs|ddlm}|ƒ}tjdkrx| d¡sxz>tƒ}t ¡d dd¡}dt |dƒt |d ƒt |ƒfWSt yvYn0|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 macOS. r)rlr:zmacosx-éú Ú_zmacosx-%d.%d-%sr•) Z sysconfigrlr@rAÚ startswithrCr²ÚunameÚreplaceÚintr»rE)rlrFrrºrrrr=ss þ r=zmacosx-(\d+)\.(\d+)-(.*)zdarwin-(\d+)\.(\d+)\.(\d+)-(.*)cCsè|dus|dus||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. NTr•z%s.%sr<éz10.3éz10.4Fr )r>r?ÚdarwinVersionStringrÂrD)ZprovidedZrequiredZreqMacZprovMacZ provDarwinZdversionZ macosversionrrrrm‘s2   ÿÿÿrmcCs<t d¡j}|d}| ¡||d<t|ƒd ||¡dS)z@Locate distribution `dist_spec` and run its `script_name` scriptr•rrN©r@Ú _getframeÚ f_globalsr/rIrJ)Z dist_specÚ script_nameÚnsÚnamerrrrJ¿s  rJcCs>t|tƒ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¨rbÚparserKraÚ TypeError©r“rrrrLÌs     rLcCst|ƒ ||¡S)zDReturn `name` entry point of `group` for `dist` or raise ImportError)rLrM©r“rDrËrrrrM×srMcCst|ƒ |¡S)ú=Return the entry point map for `group`, or the full entry map)rLrN)r“rDrrrrNÜsrNcCst|ƒ ||¡S©zIs the named metadata a directory? (like ``os.path.isdir()``)NrrÒrrrÚmetadata_isdirósz IMetadataProvider.metadata_isdircCsdS)z?List of metadata names in the directory (like ``os.listdir()``)NrrÒrrrÚmetadata_listdirösz"IMetadataProvider.metadata_listdircCsdS)z=Execute the named script in the supplied namespace dictionaryNr)rÉÚ namespacerrrrJùszIMetadataProvider.run_scriptN) rrrrÓrÔrÕrÖr×rJrrrrr{æs r{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_string sz%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ßrrrrVsz IResourceProvider.resource_isdircCsdS)z?List of resource names in the directory (like ``os.listdir()``)NrrßrrrrTsz"IResourceProvider.resource_listdirN) rrrrrÜrÝrÞràrVrTrrrrr|ýsr|c@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)-r_zDA collection of active distributions on sys.path (or a similar list)NcCs>g|_i|_i|_g|_|dur&tj}|D]}| |¡q*dS)z?Create working set from list of path entries (default=sys.path)N)ÚentriesÚ entry_keysÚby_keyÚ callbacksr@r³Ú add_entry)r�ráÚentryrrrÚ__init__szWorkingSet.__init__cCs^|ƒ}zddlm}Wnty,|YS0z| |¡WntyX| |¡YS0|S)z1 Prepare the master working set. r)Ú __requires__)Ú__main__rèÚ ImportErrorrIreÚ_build_from_requirements)ÚclsÚwsrèrrrÚ _build_master)s   zWorkingSet._build_mastercCsf|gƒ}t|ƒ}| |tƒ¡}|D]}| |¡q"tjD]}||jvr8| |¡q8|jtjdd…<|S)zQ Build a working set from a requirement spec. Rewrites sys.path. N)riÚresolver^Úaddr@r³rárå)rìZreq_specríÚreqsÚdistsr“rærrrrë=s    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·rZrð)r�rær“rrrråSs  zWorkingSet.add_entrycCs|j |j¡|kS)z9True if `dist` is the active distribution for its project)rãr¹r1©r�r“rrrÚ __contains__bszWorkingSet.__contains__cCs,|j |j¡}|dur(||vr(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¹r1re)r�r–r“rrrr§fs  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]}ˆdus*ˆ|jkr|VqqdSr)rNÚvaluesrË)Ú.0r“ræ©rDrËrrÚ }sýz/WorkingSet.iter_entry_points..r©r�rDrËrrørrPvs þzWorkingSet.iter_entry_pointscCs>t d¡j}|d}| ¡||d<| |¡d ||¡dS)z?Locate distribution for `requires` and run `script_name` scriptr•rrNrÆ)r�ÚrequiresrÉrÊrËrrrrJ„s  zWorkingSet.run_scriptccsLi}|jD]<}||jvrq |j|D] }||vr$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. r•N)rárârã)r�ÚseenÚitemr1rrrÚ__iter__Œs  zWorkingSet.__iter__TFcCsœ|r|j|j||d�|dur$|j}|j |g¡}|j |jg¡}|sV|j|jvrVdS||j|j<|j|vrx| |j¡|j|vrŽ| |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ârór1rãr·Ú _added_new)r�r“ræÚinsertrÁÚkeysZkeys2rrrrð�s      zWorkingSet.addcCsxt|ƒddd…}i}i}g}tƒ} t t¡} |�rt| d¡} | |vrHq.|  | |¡sVq.| | j¡} | du�r|j  | j¡} | dusŽ| | vrø|rø|} |dur¾| dur®t |j ƒ}nt gƒ}t gƒ} |j | | ||d�} || j<| durø|  | d¡}t| |ƒ‚| | ¡| | v�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¹r1rãr^rár_Ú best_matchrfr·reržrûÚextrasÚextendrðÚ project_name)r�Ú requirementsÚenvÚ installerrrZ processedZbestZ to_activateZ req_extrasr�r–r“rír Z dependent_reqZnew_requirementsZnew_requirementrrrrï»sP      þ      zWorkingSet.resolvec Cst|ƒ}| ¡i}i}|dur4t|jƒ}||7}n||}| g¡} tt| j|ƒƒ|D] } || D]’} |  ¡g} z|  | ||¡} WnLt yÒ}z4||| <|r°WYd}~qfnWYd}~qZWYd}~qfd}~00tt| 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Úsortr^rár�ÚmaprðÚas_requirementrïrdrr r!)r�Z plugin_envZfull_envrZfallbackZplugin_projectsZ error_infoZ distributionsrZ shadow_setrr“r–Z resolveesrrrrÚ find_pluginss4$     $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ïrirð)r�rZneededr“rrrrIks  zWorkingSet.requirecCs8||jvrdS|j |¡|s"dS|D] }||ƒq&dS)zƒInvoke `callback` for all distributions If `existing=True` (default), call on all existing ones, as well. N)rär·)r�ÚcallbackÚexistingr“rrrÚ subscribe{s  zWorkingSet.subscribecCs|jD] }||ƒqdSr)rä)r�r“rrrrr‰s zWorkingSet._added_newcCs,|jdd…|j ¡|j ¡|jdd…fSr)rárâr+rãrär�rrrr)�s þzWorkingSet.__getstate__cCs@|\}}}}|dd…|_| ¡|_| ¡|_|dd…|_dSr)rár+rârãrä)r�Ze_k_b_crárrãrärrrr*“s    zWorkingSet.__setstate__)N)N)NTF)NNFN)NNT)T)rrrrrçÚ classmethodrîrërårõr§rPrJrþrðrïrrIrrr)r*rrrrr_s.     ÿ ]ÿ T r_c@seZdZdZddd„ZdS)rz> 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)r÷r©r–rrrù¨sÿz*_ReqExtras.markers_pass..rr)r¹rÚany)r�r–rZ extra_evalsrr rr  s þz_ReqExtras.markers_pass)N)rrrrr rrrrr›src@sxeZdZdZdeƒefdd„Zdd„Zdd„Zdd d „Z d d „Z d d„Z ddd„Z ddd„Z dd„Zdd„Zdd„ZdS)r^z5Searchable 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)Ú_distmaprAÚpythonÚscan)r�Ú search_pathrAr#rrrrç²szEnvironment.__init__cCs2|jdup|jdup|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)r#Ú py_versionrmrA)r�r“Z py_compatrrrÚcan_addÊs  ÿ ýzEnvironment.can_addcCs|j|j |¡dS)z"Remove `dist` from the environmentN)r"r1Úremoverôrrrr(ØszEnvironment.removecCs4|durtj}|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)r@r³rZrð)r�r%rýr“rrrr$Ü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. )Úlowerr"r¹)r�rZdistribution_keyrrrÚ __getitem__ëszEnvironment.__getitem__cCsL| |¡rH| ¡rH|j |jg¡}||vrH| |¡|jt d¡dd�dS)zLAdd `dist` if we ``can_add()`` it and it has not already been added ÚhashcmpT©r1ÚreverseN) r'Ú has_versionr"rór1r·rÚoperatorÚ attrgetter)r�r“ròrrrrðös  zEnvironment.addFcCsdz| |¡}Wnty*|s"‚d}Yn0|dur8|S||jD]}||vrB|SqB| ||¡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§rer1Úobtain)r�r–rXrrr“rrrr ÿs   zEnvironment.best_matchcCs|dur||ƒ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�Z requirementrrrrr1s zEnvironment.obtainccs"|j ¡D]}||r |Vq dS)z=Yield the unique project names of the available distributionsN)r"r©r�r1rrrrþ'szEnvironment.__iter__cCsVt|tƒr| |¡n|tj@r\djfit ƒ¤Ž}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. ÚntZwindirNzáExtraction path is writable by group/others and vulnerable to attack when used with get_resource_filename ({path}). 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_IWGRPr™ršÚwarningsÚwarnÚ UserWarning)r³ÚmodeÚmsgrrrrG³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ËrLrMÚchmod)r�ZtempnameÚfilenamerSrrrÚ 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)r9rEr<©r�r³rrrr[â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�Úforcerrrr\üsz!ResourceManager.cleanup_resources)r)F)rrrrr<rçrUrVrSrRrQrTrDrIÚ staticmethodrGrXr[r\rrrrr`Us   r`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". ZPYTHON_EGG_CACHEz Python-Eggs)Zappname)r²rKr¹r Zuser_cache_dirrrrrr] s  þr]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ÒrrrrjsrjcCsHzttj |¡ƒWStjjyB| dd¡}t dd|¡YS0dS)zB Convert an arbitrary string to a standard version string r½r;r\r]N)r¨r rrrrÁr^r_)rrrrrks  rkcCst 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_r))rrrrrp*srpcCs | dd¡S)z|Convert a project or version name to its filename-escaped form Any '-' characters are currently replaced with '_'. r]r¾rÿrÒrrrrq3srqc CsFz t|ƒWn4ty@}zd|_d|_|WYd}~Sd}~00dS)zo Validate text as a PEP 508 environment marker; return an exception if invalid or False otherwise. NF)rsÚ SyntaxErrorrWÚlineno)ÚtextÚerrrrr;s rrc CsNztj |¡}| ¡WStjjyH}zt|ƒ|‚WYd}~n d}~00dS)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 ZmarkersZMarkerrZ InvalidMarkerr`)rbrrrcrrrrsIs   rsc@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®rrrrç_szNullProvider.__init__cCs| |j|¡Sr)Ú_fnrf©r�rÚrÛrrrrÜcsz"NullProvider.get_resource_filenamecCst | ||¡¡Sr)ÚioÚBytesIOrÞrirrrrÝfsz NullProvider.get_resource_streamcCs| | |j|¡¡Sr)Ú_getrhrfrirrrrÞisz NullProvider.get_resource_stringcCs| | |j|¡¡Sr)Ú_hasrhrf©r�rÛrrrràlszNullProvider.has_resourcecCs| |j|¡Sr)rhÚegg_info©r�rËrrrÚ_get_metadata_pathoszNullProvider._get_metadata_pathcCs |js |jS| |¡}| |¡Sr)rorqrm©r�rËr³rrrrÓrs zNullProvider.has_metadatac Csl|js dS| |¡}| |¡}z | d¡WStyf}z$|jd ||¡7_‚WYd}~n d}~00dS)Nr°úutf-8z in {} file at path: {})rorqrlÚdecodeÚUnicodeDecodeErrorÚreasonr™)r�rËr³ÚvalueÚexcrrrrÔys   zNullProvider.get_metadatacCst| |¡ƒSr©rnrÔrprrrrÕ†szNullProvider.get_metadata_linescCs| | |j|¡¡Sr)Ú_isdirrhrfrnrrrrV‰szNullProvider.resource_isdircCs|jo| | |j|¡¡Sr)rorzrhrprrrrÖŒszNullProvider.metadata_isdircCs| | |j|¡¡Sr)Ú_listdirrhrfrnrrrrT�szNullProvider.resource_listdircCs|jr| | |j|¡¡SgSr)ror{rhrprrrr×’szNullProvider.metadata_listdirc Csôd|}| |¡s(tdjfitƒ¤Žƒ‚| |¡ dd¡}| dd¡}| |j|¡}||d<tj   |¡r²t |ƒ�}|  ¡}Wdƒn1sŽ0Yt ||dƒ}t|||ƒn>dd lm} t|ƒd| d¡|f| |<t ||dƒ} t| ||ƒdS) Nzscripts/z