Let us walk on the 3-isogeny graph
|
Public Member Functions | |
__init__ (self, search_path=None, platform=get_supported_platform(), python=PY_MAJOR) | |
can_add (self, dist) | |
remove (self, dist) | |
scan (self, search_path=None) | |
__getitem__ (self, project_name) | |
add (self, dist) | |
best_match (self, req, working_set, installer=None, replace_conflicting=False) | |
obtain (self, requirement, installer=None) | |
__iter__ (self) | |
__iadd__ (self, other) | |
__add__ (self, other) | |
Data Fields | |
platform | |
python | |
Protected Attributes | |
_distmap | |
Searchable snapshot of distributions on a search path
Definition at line 1031 of file __init__.py.
__init__ | ( | self, | |
search_path = None , |
|||
platform = get_supported_platform() , |
|||
python = PY_MAJOR |
|||
) |
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.
Definition at line 1034 of file __init__.py.
Referenced by Protocol.__init_subclass__().
__add__ | ( | self, | |
other | |||
) |
Add an environment or distribution to an environment
Definition at line 1167 of file __init__.py.
Referenced by wait_base.__radd__().
__getitem__ | ( | self, | |
project_name | |||
) |
Return 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.
Definition at line 1091 of file __init__.py.
__iadd__ | ( | self, | |
other | |||
) |
In-place addition of a distribution or environment
Definition at line 1155 of file __init__.py.
Referenced by ParseResults.extend().
__iter__ | ( | self | ) |
Yield the unique project names of the available distributions
Definition at line 1149 of file __init__.py.
add | ( | self, | |
dist | |||
) |
Add `dist` if we ``can_add()`` it and it has not already been added
Definition at line 1102 of file __init__.py.
Referenced by UninstallPathSet.add(), Manifest.add_many(), HTTPHeaderDict.extend(), and BuildTracker.track().
best_match | ( | self, | |
req, | |||
working_set, | |||
installer = None , |
|||
replace_conflicting = False |
|||
) |
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.
Definition at line 1110 of file __init__.py.
Referenced by Terminal256Formatter._color_index().
can_add | ( | self, | |
dist | |||
) |
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.
Definition at line 1058 of file __init__.py.
obtain | ( | self, | |
requirement, | |||
installer = None |
|||
) |
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.
Definition at line 1137 of file __init__.py.
Referenced by VersionControl.unpack().
remove | ( | self, | |
dist | |||
) |
Remove `dist` from the environment
Definition at line 1072 of file __init__.py.
Referenced by Sequencer.remove_node(), and BuildTracker.track().
scan | ( | self, | |
search_path = None |
|||
) |
Scan `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.
Definition at line 1076 of file __init__.py.
Referenced by Scanner.get_char().
|
protected |
Definition at line 1053 of file __init__.py.
platform |
Definition at line 1054 of file __init__.py.
python |
Definition at line 1055 of file __init__.py.