Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Classes | Functions | Variables
pip._vendor.pkg_resources Namespace Reference

Classes

class  _ReqExtras
 
class  ContextualVersionConflict
 
class  DefaultProvider
 
class  DistInfoDistribution
 
class  Distribution
 
class  DistributionNotFound
 
class  EggInfoDistribution
 
class  EggMetadata
 
class  EggProvider
 
class  EmptyProvider
 
class  EntryPoint
 
class  Environment
 
class  ExtractionError
 
class  FileMetadata
 
class  IMetadataProvider
 
class  IResourceProvider
 
class  MemoizedZipManifests
 
class  NoDists
 
class  NullProvider
 
class  PathMetadata
 
class  PEP440Warning
 
class  PkgResourcesDeprecationWarning
 
class  Requirement
 
class  RequirementParseError
 
class  ResolutionError
 
class  ResourceManager
 
class  UnknownExtra
 
class  VersionConflict
 
class  WorkingSet
 
class  ZipManifests
 
class  ZipProvider
 

Functions

 _declare_state (vartype, **kw)
 
 __getstate__ ()
 
 __setstate__ (state)
 
 _sget_dict (val)
 
 _sset_dict (key, ob, state)
 
 _sget_object (val)
 
 _sset_object (key, ob, state)
 
 get_supported_platform ()
 
 register_loader_type (loader_type, provider_factory)
 
 get_provider (moduleOrReq)
 
 _macos_vers (_cache=[])
 
 _macos_arch (machine)
 
 get_build_platform ()
 
 compatible_platforms (provided, required)
 
 run_script (dist_spec, script_name)
 
 get_distribution (dist)
 
 load_entry_point (dist, group, name)
 
 get_entry_map (dist, group=None)
 
 get_entry_info (dist, group, name)
 
 get_default_cache ()
 
 safe_name (name)
 
 safe_version (version)
 
 _forgiving_version (version)
 
 _safe_segment (segment)
 
 safe_extra (extra)
 
 to_filename (name)
 
 invalid_marker (text)
 
 evaluate_marker (text, extra=None)
 
 _parents (path)
 
 register_finder (importer_type, distribution_finder)
 
 find_distributions (path_item, only=False)
 
 find_eggs_in_zip (importer, path_item, only=False)
 
 find_nothing (importer, path_item, only=False)
 
 find_on_path (importer, path_item, only=False)
 
 dist_factory (path_item, entry, only)
 
 safe_listdir (path)
 
 distributions_from_metadata (path)
 
 non_empty_lines (path)
 
 resolve_egg_link (path)
 
 register_namespace_handler (importer_type, namespace_handler)
 
 _handle_ns (packageName, path_item)
 
 _rebuild_mod_path (orig_path, package_name, module)
 
 declare_namespace (packageName)
 
 fixup_namespace_packages (path_item, parent=None)
 
 file_ns_handler (importer, path_item, packageName, module)
 
 null_ns_handler (importer, path_item, packageName, module)
 
 normalize_path (filename)
 
 _cygwin_patch (filename)
 
 _normalize_cached (filename, _cache={})
 
 _is_egg_path (path)
 
 _is_zip_egg (path)
 
 _is_unpacked_egg (path)
 
 _set_parent_ns (packageName)
 
 _version_from_file (lines)
 
 issue_warning (*args, **kw)
 
 parse_requirements (strs)
 
 _always_object (classes)
 
 _find_adapter (registry, ob)
 
 ensure_directory (path)
 
 _bypass_ensure_directory (path)
 
 split_sections (s)
 
 _mkstemp (*args, **kw)
 
 _call_aside (f, *args, **kwargs)
 
 _initialize (g=globals())
 
 _initialize_master_working_set ()
 

Variables

 FileExistsError = OSError
 
bool WRITE_SUPPORT = True
 
 importlib_machinery = None
 
 require = None
 
 working_set = None
 
 add_activation_listener = None
 
 resources_stream = None
 
 cleanup_resources = None
 
 resource_dir = None
 
 resource_stream = None
 
 set_extraction_path = None
 
 resource_isdir = None
 
 resource_string = None
 
 iter_entry_points = None
 
 resource_listdir = None
 
 resource_filename = None
 
 resource_exists = None
 
 _distribution_finders = None
 
 _namespace_handlers = None
 
 _namespace_packages = None
 
 stacklevel
 
 _PEP440_FALLBACK = re.compile(r"^v?(?P<safe>(?:[0-9]+!)?[0-9]+(?:\.[0-9]+)*)", re.I)
 
 parse_version = packaging.version.Version
 
dict _state_vars = {}
 
None _sget_none = lambda *args
 
dict _provider_factories = {}
 
str PY_MAJOR = '{}.{}'.format(*sys.version_info)
 
int EGG_DIST = 3
 
int BINARY_DIST = 2
 
int SOURCE_DIST = 1
 
int CHECKOUT_DIST = 0
 
int DEVELOP_DIST = -1
 
 macosVersionString = re.compile(r"macosx-(\d+)\.(\d+)-(.*)")
 
 darwinVersionString = re.compile(r"darwin-(\d+)\.(\d+)\.(\d+)-(.*)")
 
 get_platform = get_build_platform
 
 run_main = run_script
 
 AvailableDistributions = Environment
 
 empty_provider = EmptyProvider()
 
 MODULE = re.compile(r"\w+(\.\w+)*$").match
 
 EGG_NAME
 
dict _distributionImpl
 
 category
 
 PEP440Warning
 
 append
 

Detailed Description

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.

This module is deprecated. Users are directed to :mod:`importlib.resources`,
:mod:`importlib.metadata` and :pypi:`packaging` instead.

Function Documentation

◆ _always_object()

pip._vendor.pkg_resources._always_object (   classes)
protected
Ensure object appears in the mro even
for old-style classes.

◆ _bypass_ensure_directory()

pip._vendor.pkg_resources._bypass_ensure_directory (   path)
protected
Sandbox-bypassing version of ensure_directory()

◆ _cygwin_patch()

pip._vendor.pkg_resources._cygwin_patch (   filename)
protected
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...

◆ _find_adapter()

pip._vendor.pkg_resources._find_adapter (   registry,
  ob 
)
protected
Return an adapter factory for `ob` from `registry`

◆ _forgiving_version()

pip._vendor.pkg_resources._forgiving_version (   version)
protected
Fallback when ``safe_version`` is not safe enough
>>> parse_version(_forgiving_version('0.23ubuntu1'))
<Version('0.23.dev0+sanitized.ubuntu1')>
>>> parse_version(_forgiving_version('0.23-'))
<Version('0.23.dev0+sanitized')>
>>> parse_version(_forgiving_version('0.-_'))
<Version('0.dev0+sanitized')>
>>> parse_version(_forgiving_version('42.+?1'))
<Version('42.dev0+sanitized.1')>
>>> parse_version(_forgiving_version('hello world'))
<Version('0.dev0+sanitized.hello.world')>

◆ _handle_ns()

pip._vendor.pkg_resources._handle_ns (   packageName,
  path_item 
)
protected
Ensure that named package includes a subpath of path_item (if needed)

◆ _initialize_master_working_set()

pip._vendor.pkg_resources._initialize_master_working_set ( )
protected
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.

◆ _is_egg_path()

pip._vendor.pkg_resources._is_egg_path (   path)
protected
Determine if given path appears to be an egg.

◆ _is_unpacked_egg()

pip._vendor.pkg_resources._is_unpacked_egg (   path)
protected
Determine if given path appears to be an unpacked egg.

◆ _parents()

pip._vendor.pkg_resources._parents (   path)
protected
yield all parents of path including path

◆ _rebuild_mod_path()

pip._vendor.pkg_resources._rebuild_mod_path (   orig_path,
  package_name,
  module 
)
protected
Rebuild module.__path__ ensuring that all entries are ordered
corresponding to their sys.path order

◆ _safe_segment()

pip._vendor.pkg_resources._safe_segment (   segment)
protected
Convert an arbitrary string into a safe segment

◆ _version_from_file()

pip._vendor.pkg_resources._version_from_file (   lines)
protected
Given an iterable of lines from a Metadata file, return
the value of the Version field, if present, or None otherwise.

◆ compatible_platforms()

pip._vendor.pkg_resources.compatible_platforms (   provided,
  required 
)
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.

◆ declare_namespace()

pip._vendor.pkg_resources.declare_namespace (   packageName)
Declare that package 'packageName' is a namespace package

◆ dist_factory()

pip._vendor.pkg_resources.dist_factory (   path_item,
  entry,
  only 
)
Return a dist_factory for the given entry.

◆ ensure_directory()

pip._vendor.pkg_resources.ensure_directory (   path)
Ensure that the parent directory of `path` exists

◆ evaluate_marker()

pip._vendor.pkg_resources.evaluate_marker (   text,
  extra = None 
)
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.

◆ file_ns_handler()

pip._vendor.pkg_resources.file_ns_handler (   importer,
  path_item,
  packageName,
  module 
)
Compute an ns-package subpath for a filesystem or zipfile importer

◆ find_distributions()

pip._vendor.pkg_resources.find_distributions (   path_item,
  only = False 
)
Yield distributions accessible via `path_item`

◆ find_eggs_in_zip()

pip._vendor.pkg_resources.find_eggs_in_zip (   importer,
  path_item,
  only = False 
)
Find eggs in zip files; possibly multiple nested eggs.

◆ find_on_path()

pip._vendor.pkg_resources.find_on_path (   importer,
  path_item,
  only = False 
)
Yield distributions accessible on a sys.path directory

◆ fixup_namespace_packages()

pip._vendor.pkg_resources.fixup_namespace_packages (   path_item,
  parent = None 
)
Ensure that previously-declared namespace packages include path_item

◆ get_build_platform()

pip._vendor.pkg_resources.get_build_platform ( )
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.

◆ get_default_cache()

pip._vendor.pkg_resources.get_default_cache ( )
Return the ``PYTHON_EGG_CACHE`` environment variable
or a platform-relevant user cache dir for an app
named "Python-Eggs".

◆ get_distribution()

pip._vendor.pkg_resources.get_distribution (   dist)
Return a current distribution object for a Requirement or string

◆ get_entry_info()

pip._vendor.pkg_resources.get_entry_info (   dist,
  group,
  name 
)
Return the EntryPoint object for `group`+`name`, or ``None``

◆ get_entry_map()

pip._vendor.pkg_resources.get_entry_map (   dist,
  group = None 
)
Return the entry point map for `group`, or the full entry map

◆ get_provider()

pip._vendor.pkg_resources.get_provider (   moduleOrReq)
Return an IResourceProvider for the named module or requirement

◆ get_supported_platform()

pip._vendor.pkg_resources.get_supported_platform ( )
Return 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.

◆ invalid_marker()

pip._vendor.pkg_resources.invalid_marker (   text)
Validate text as a PEP 508 environment marker; return an exception
if invalid or False otherwise.

◆ load_entry_point()

pip._vendor.pkg_resources.load_entry_point (   dist,
  group,
  name 
)
Return `name` entry point of `group` for `dist` or raise ImportError

◆ non_empty_lines()

pip._vendor.pkg_resources.non_empty_lines (   path)
Yield non-empty lines from file at path

◆ normalize_path()

pip._vendor.pkg_resources.normalize_path (   filename)
Normalize a file/dir name for comparison purposes

◆ parse_requirements()

pip._vendor.pkg_resources.parse_requirements (   strs)
Yield ``Requirement`` objects for each specification in `strs`.

`strs` must be a string, or a (possibly-nested) iterable thereof.

◆ register_finder()

pip._vendor.pkg_resources.register_finder (   importer_type,
  distribution_finder 
)
Register `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.

◆ register_loader_type()

pip._vendor.pkg_resources.register_loader_type (   loader_type,
  provider_factory 
)
Register `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.

◆ register_namespace_handler()

pip._vendor.pkg_resources.register_namespace_handler (   importer_type,
  namespace_handler 
)
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``.

◆ resolve_egg_link()

pip._vendor.pkg_resources.resolve_egg_link (   path)
Given a path to an .egg-link, resolve distributions
present in the referenced path.

◆ run_script()

pip._vendor.pkg_resources.run_script (   dist_spec,
  script_name 
)
Locate distribution `dist_spec` and run its `script_name` script

◆ safe_extra()

pip._vendor.pkg_resources.safe_extra (   extra)
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.

◆ safe_listdir()

pip._vendor.pkg_resources.safe_listdir (   path)
Attempt to list contents of path, but suppress some exceptions.

◆ safe_name()

pip._vendor.pkg_resources.safe_name (   name)
Convert an arbitrary string to a standard distribution name

Any runs of non-alphanumeric/. characters are replaced with a single '-'.

◆ safe_version()

pip._vendor.pkg_resources.safe_version (   version)
Convert an arbitrary string to a standard version string

◆ split_sections()

pip._vendor.pkg_resources.split_sections (   s)
Split 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``.

◆ to_filename()

pip._vendor.pkg_resources.to_filename (   name)
Convert a project or version name to its filename-escaped form

Any '-' characters are currently replaced with '_'.

Variable Documentation

◆ _distributionImpl

dict pip._vendor.pkg_resources._distributionImpl
protected
Initial value:
1= {
2 '.egg': Distribution,
3 '.egg-info': EggInfoDistribution,
4 '.dist-info': DistInfoDistribution,
5}

◆ EGG_NAME

pip._vendor.pkg_resources.EGG_NAME
Initial value:
1= re.compile(
2 ,
3 re.VERBOSE | re.IGNORECASE,
4).match