Let us walk on the 3-isogeny graph
Loading...
Searching...
No Matches
pip._internal.req.req_install Namespace Reference

Data Structures

class  InstallRequirement
 

Functions

str check_invalid_constraint_type (InstallRequirement req)
 
bool _has_option (Values options, List[InstallRequirement] reqs, str option)
 
None check_legacy_setup_py_options (Values options, List[InstallRequirement] reqs)
 

Variables

 logger = logging.getLogger(__name__)
 

Function Documentation

◆ _has_option()

bool _has_option ( Values  options,
List[InstallRequirement reqs,
str  option 
)
protected

Definition at line 848 of file req_install.py.

848def _has_option(options: Values, reqs: List[InstallRequirement], option: str) -> bool:
849 if getattr(options, option, None):
850 return True
851 for req in reqs:
852 if getattr(req, option, None):
853 return True
854 return False
855
856
for i

References i.

Referenced by pip._internal.req.req_install.check_legacy_setup_py_options().

Here is the caller graph for this function:

◆ check_invalid_constraint_type()

str check_invalid_constraint_type ( InstallRequirement  req)

Definition at line 820 of file req_install.py.

820def check_invalid_constraint_type(req: InstallRequirement) -> str:
821 # Check for unsupported forms
822 problem = ""
823 if not req.name:
824 problem = "Unnamed requirements are not allowed as constraints"
825 elif req.editable:
826 problem = "Editable requirements are not allowed as constraints"
827 elif req.extras:
828 problem = "Constraints cannot have extras"
829
830 if problem:
831 deprecated(
832 reason=(
833 "Constraints are only allowed to take the form of a package "
834 "name and a version specifier. Other forms were originally "
835 "permitted as an accident of the implementation, but were "
836 "undocumented. The new implementation of the resolver no "
837 "longer supports these forms."
838 ),
839 replacement="replacing the constraint with a requirement",
840 # No plan yet for when the new resolver becomes default
841 gone_in=None,
842 issue=8210,
843 )
844
845 return problem
846
847

References i.

◆ check_legacy_setup_py_options()

None check_legacy_setup_py_options ( Values  options,
List[InstallRequirement reqs 
)

Definition at line 857 of file req_install.py.

860) -> None:
861 has_build_options = _has_option(options, reqs, "build_options")
862 has_global_options = _has_option(options, reqs, "global_options")
863 if has_build_options or has_global_options:
864 deprecated(
865 reason="--build-option and --global-option are deprecated.",
866 issue=11859,
867 replacement="to use --config-settings",
868 gone_in="23.3",
869 )
871 "Implying --no-binary=:all: due to the presence of "
872 "--build-option / --global-option. "
873 )

References pip._internal.req.req_install._has_option(), and i.

Here is the call graph for this function:

Variable Documentation

◆ logger

logger = logging.getLogger(__name__)

Definition at line 61 of file req_install.py.