Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
pip._internal.req.req_install.InstallRequirement Class Reference

Public Member Functions

None __init__ (self, Optional[Requirement] req, Optional[Union[str, "InstallRequirement"]] comes_from, bool editable=False, Optional[Link] link=None, Optional[Marker] markers=None, Optional[bool] use_pep517=None, bool isolated=False, *Optional[List[str]] global_options=None, Optional[Dict[str, List[str]]] hash_options=None, Optional[Dict[str, Union[str, List[str]]]] config_settings=None, bool constraint=False, Collection[str] extras=(), bool user_supplied=False, bool permit_editable_wheels=False)
 
str __str__ (self)
 
str __repr__ (self)
 
str format_debug (self)
 
Optional[str] name (self)
 
bool supports_pyproject_editable (self)
 
SpecifierSet specifier (self)
 
bool is_direct (self)
 
bool is_pinned (self)
 
bool match_markers (self, Optional[Iterable[str]] extras_requested=None)
 
bool has_hash_options (self)
 
Hashes hashes (self, bool trust_internet=True)
 
Optional[str] from_path (self)
 
str ensure_build_location (self, str build_dir, bool autodelete, bool parallel_builds)
 
None warn_on_mismatching_name (self)
 
None check_if_exists (self, bool use_user_site)
 
bool is_wheel (self)
 
bool is_wheel_from_cache (self)
 
str unpacked_source_directory (self)
 
str setup_py_path (self)
 
str setup_cfg_path (self)
 
str pyproject_toml_path (self)
 
None load_pyproject_toml (self)
 
None isolated_editable_sanity_check (self)
 
None prepare_metadata (self)
 
Any metadata (self)
 
BaseDistribution get_dist (self)
 
None assert_source_matches_version (self)
 
None ensure_has_source_dir (self, str parent_dir, bool autodelete=False, bool parallel_builds=False)
 
None needs_unpacked_archive (self, Path archive_source)
 
None ensure_pristine_source_checkout (self)
 
None update_editable (self)
 
Optional[UninstallPathSetuninstall (self, bool auto_confirm=False, bool verbose=False)
 
None archive (self, Optional[str] build_dir)
 
None install (self, Optional[Sequence[str]] global_options=None, Optional[str] root=None, Optional[str] home=None, Optional[str] prefix=None, bool warn_script_location=True, bool use_user_site=False, bool pycompile=True)
 

Public Attributes

 req
 
 comes_from
 
 constraint
 
 editable
 
 permit_editable_wheels
 
 source_dir
 
 link
 
 local_file_path
 
 extras
 
 markers
 
 should_reinstall
 
 global_options
 
 hash_options
 
 config_settings
 
 prepared
 
 user_supplied
 
 isolated
 
 use_pep517
 
 needs_more_preparation
 
 name
 
 satisfied_by
 
 unpacked_source_directory
 
 pyproject_toml_path
 
 setup_py_path
 
 requirements_to_check
 
 pyproject_requires
 
 pep517_backend
 
 setup_cfg_path
 
 metadata_directory
 
 install_succeeded
 

Protected Member Functions

None _set_requirement (self)
 
str _get_archive_name (self, str path, str parentdir, str rootdir)
 

Protected Attributes

 _temp_build_dir
 
 _metadata
 
 _archive_source
 

Detailed Description

Represents something that may be installed later on, may have information
about where to fetch the relevant requirement and also contains logic for
installing the said requirement.

Member Function Documentation

◆ _set_requirement()

None pip._internal.req.req_install.InstallRequirement._set_requirement (   self)
protected
Set requirement after generating metadata.

◆ archive()

None pip._internal.req.req_install.InstallRequirement.archive (   self,
Optional[str]  build_dir 
)
Saves archive to provided build_dir.

Used for saving downloaded VCS requirements as part of `pip download`.

◆ check_if_exists()

None pip._internal.req.req_install.InstallRequirement.check_if_exists (   self,
bool  use_user_site 
)
Find an installed distribution that satisfies or conflicts
with this requirement, and set self.satisfied_by or
self.should_reinstall appropriately.

◆ ensure_has_source_dir()

None pip._internal.req.req_install.InstallRequirement.ensure_has_source_dir (   self,
str  parent_dir,
bool   autodelete = False,
bool   parallel_builds = False 
)
Ensure that a source_dir is set.

This will create a temporary build dir if the name of the requirement
isn't known yet.

:param parent_dir: The ideal pip parent_dir for the source_dir.
    Generally src_dir for editables and build_dir for sdists.
:return: self.source_dir

◆ ensure_pristine_source_checkout()

None pip._internal.req.req_install.InstallRequirement.ensure_pristine_source_checkout (   self)
Ensure the source directory has not yet been built in.

◆ format_debug()

str pip._internal.req.req_install.InstallRequirement.format_debug (   self)
An un-tested helper for getting state, for debugging.

◆ from_path()

Optional[str] pip._internal.req.req_install.InstallRequirement.from_path (   self)
Format a nice indicator to show where this "comes from" 

◆ has_hash_options()

bool pip._internal.req.req_install.InstallRequirement.has_hash_options (   self)
Return whether any known-good hashes are specified as options.

These activate --require-hashes mode; hashes specified as part of a
URL do not.

◆ hashes()

Hashes pip._internal.req.req_install.InstallRequirement.hashes (   self,
bool   trust_internet = True 
)
Return a hash-comparer that considers my option- and URL-based
hashes to be known-good.

Hashes in URLs--ones embedded in the requirements file, not ones
downloaded from an index server--are almost peers with ones from
flags. They satisfy --require-hashes (whether it was implicitly or
explicitly activated) but do not activate it. md5 and sha224 are not
allowed in flags, which should nudge people toward good algos. We
always OR all hashes together, even ones from URLs.

:param trust_internet: Whether to trust URL-based (#md5=...) hashes
    downloaded from the internet, as by populate_link()

◆ is_direct()

bool pip._internal.req.req_install.InstallRequirement.is_direct (   self)
Whether this requirement was specified as a direct URL.

◆ is_pinned()

bool pip._internal.req.req_install.InstallRequirement.is_pinned (   self)
Return whether I am pinned to an exact version.

For example, some-package==1.2 is pinned; some-package>1.2 is not.

◆ isolated_editable_sanity_check()

None pip._internal.req.req_install.InstallRequirement.isolated_editable_sanity_check (   self)
Check that an editable requirement if valid for use with PEP 517/518.

This verifies that an editable that has a pyproject.toml either supports PEP 660
or as a setup.py or a setup.cfg

◆ load_pyproject_toml()

None pip._internal.req.req_install.InstallRequirement.load_pyproject_toml (   self)
Load the pyproject.toml file.

After calling this routine, all of the attributes related to PEP 517
processing for this requirement have been set. In particular, the
use_pep517 attribute can be used to determine whether we should
follow the PEP 517 or legacy (setup.py) code path.

◆ prepare_metadata()

None pip._internal.req.req_install.InstallRequirement.prepare_metadata (   self)
Ensure that project metadata is available.

Under PEP 517 and PEP 660, call the backend hook to prepare the metadata.
Under legacy processing, call setup.py egg-info.

◆ uninstall()

Optional[UninstallPathSet] pip._internal.req.req_install.InstallRequirement.uninstall (   self,
bool   auto_confirm = False,
bool   verbose = False 
)
Uninstall the distribution currently satisfying this requirement.

Prompts before removing or modifying files unless
``auto_confirm`` is True.

Refuses to delete or modify files outside of ``sys.prefix`` -
thus uninstallation within a virtual environment can only
modify that virtual environment, even if the virtualenv is
linked to global site-packages.

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