Let us walk on the 3-isogeny graph
Loading...
Searching...
No Matches
DistInfoDistribution Class Reference
Inheritance diagram for DistInfoDistribution:
Collaboration diagram for DistInfoDistribution:

Static Public Attributes

str PKG_INFO = 'METADATA'
 
 EQEQ = re.compile(r"([\‍(,])\s*(\d.*?)\s*([,\‍)])")
 
- Static Public Attributes inherited from Distribution
str PKG_INFO = 'PKG-INFO'
 

Protected Member Functions

 _parsed_pkg_info (self)
 
 _dep_map (self)
 
 _compute_dependencies (self)
 
- Protected Member Functions inherited from Distribution
 _reload_version (self)
 
 _forgiving_parsed_version (self)
 
 _build_dep_map (self)
 
 _get_metadata_path_for_display (self, name)
 
 _get_metadata (self, name)
 
 _get_version (self)
 

Protected Attributes

 _pkg_info
 
- Protected Attributes inherited from Distribution
 _version
 
 _provider
 
 _forgiving_parsed_version
 
 _key
 
 _parsed_version
 

Additional Inherited Members

- Public Member Functions inherited from Distribution
 __init__ (self, location=None, metadata=None, project_name=None, version=None, py_version=PY_MAJOR, platform=None, precedence=EGG_DIST)
 
 from_location (cls, location, basename, metadata=None, **kw)
 
 hashcmp (self)
 
 __hash__ (self)
 
 __lt__ (self, other)
 
 __le__ (self, other)
 
 __gt__ (self, other)
 
 __ge__ (self, other)
 
 __eq__ (self, other)
 
 __ne__ (self, other)
 
 key (self)
 
 parsed_version (self)
 
 version (self)
 
 requires (self, extras=())
 
 activate (self, path=None, replace=False)
 
 egg_name (self)
 
 __repr__ (self)
 
 __str__ (self)
 
 __getattr__ (self, attr)
 
 __dir__ (self)
 
 from_filename (cls, filename, metadata=None, **kw)
 
 as_requirement (self)
 
 load_entry_point (self, group, name)
 
 get_entry_map (self, group=None)
 
 get_entry_info (self, group, name)
 
 insert_on (self, path, loc=None, replace=False)
 
 check_version_conflict (self)
 
 has_version (self)
 
 clone (self, **kw)
 
 extras (self)
 
- Data Fields inherited from Distribution
 project_name
 
 py_version
 
 platform
 
 location
 
 precedence
 
 key
 
 hashcmp
 
 PKG_INFO
 
 version
 
 parsed_version
 
- Static Protected Member Functions inherited from Distribution
 _filter_extras (dm)
 

Detailed Description

Wrap an actual or potential sys.path entry
w/metadata, .dist-info style.

Definition at line 3087 of file __init__.py.

Member Function Documentation

◆ _compute_dependencies()

_compute_dependencies (   self)
protected
Recompute this distribution's dependencies.

Definition at line 3114 of file __init__.py.

3114 def _compute_dependencies(self):
3115 """Recompute this distribution's dependencies."""
3116 dm = self.__dep_map = {None: []}
3117
3118 reqs = []
3119 # Including any condition expressions
3120 for req in self._parsed_pkg_info.get_all('Requires-Dist') or []:
3121 reqs.extend(parse_requirements(req))
3122
3123 def reqs_for_extra(extra):
3124 for req in reqs:
3125 if not req.marker or req.marker.evaluate({'extra': extra}):
3126 yield req
3127
3129 dm[None].extend(common)
3130
3131 for extra in self._parsed_pkg_info.get_all('Provides-Extra') or []:
3132 s_extra = safe_extra(extra.strip())
3133 dm[s_extra] = [r for r in reqs_for_extra(extra) if r not in common]
3134
3135 return dm
3136
3137
for i

◆ _dep_map()

_dep_map (   self)
protected
A map of extra to its list of (direct) requirements
for this distribution, including the null extra.

Reimplemented from Distribution.

Definition at line 3107 of file __init__.py.

3107 def _dep_map(self):
3108 try:
3109 return self.__dep_map
3110 except AttributeError:
3111 self.__dep_map = self._compute_dependencies()
3112 return self.__dep_map
3113

◆ _parsed_pkg_info()

_parsed_pkg_info (   self)
protected
Parse and cache metadata

Definition at line 3097 of file __init__.py.

3097 def _parsed_pkg_info(self):
3098 """Parse and cache metadata"""
3099 try:
3100 return self._pkg_info
3101 except AttributeError:
3102 metadata = self.get_metadata(self.PKG_INFO)
3103 self._pkg_info = email.parser.Parser().parsestr(metadata)
3104 return self._pkg_info
3105

Field Documentation

◆ _pkg_info

_pkg_info
protected

Definition at line 3103 of file __init__.py.

◆ EQEQ

EQEQ = re.compile(r"([\‍(,])\s*(\d.*?)\s*([,\‍)])")
static

Definition at line 3094 of file __init__.py.

◆ PKG_INFO

str PKG_INFO = 'METADATA'
static

Definition at line 3093 of file __init__.py.


The documentation for this class was generated from the following file: