a Re/@sddlZddlmZddlmZmZmZddlmZddl m Z m Z ddl m Z eeddd Zeed d d Zed gdZeeeeeeedddZdS)N) namedtuple)AnyListOptional)tomli)InvalidRequirement Requirement)InstallationError)objreturncCst|totdd|DS)Ncss|]}t|tVqdS)N) isinstancestr).0itemr/builddir/build/BUILDROOT/alt-python39-pip-21.3.1-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/pip/_internal/pyproject.py z"_is_list_of_str..)r listall)r rrr_is_list_of_str sr)unpacked_source_directoryr cCstj|dS)Nzpyproject.toml)ospathjoin)rrrrmake_pyproject_pathsrBuildSystemDetails)requiresbackendcheck backend_path) use_pep517pyproject_tomlsetup_pyreq_namer c Cstj|}tj|}|s.|s.t|d|rtt|dd}t|}Wdn1s^0Y|d}nd}|r|s|dur|stdd}n<|rd|vr|dur|std |dd}n |dur|}|dusJ|sdS|durd d gd d }|dusJd} d|vr0t| j|dd|d} t | sTt| j|dd| D]@} z t | Wn,t yt| j|d| dYn0qX|d} |dg} g}| durd } d d g}t | | || S)aBLoad the pyproject.toml file. Parameters: use_pep517 - Has the user requested PEP 517 processing? None means the user hasn't explicitly specified. pyproject_toml - Location of the project's pyproject.toml file setup_py - Location of the project's setup.py file req_name - The name of the requirement we're processing (for error reporting) Returns: None if we should use the legacy code path, otherwise a tuple ( requirements from pyproject.toml, name of PEP 517 backend, requirements we should check are installed after setting up the build environment directory paths to import the backend from (backend-path), relative to the project root. ) zW does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.zutf-8)encodingNz build-systemzIDisabling PEP 517 processing is invalid: project does not have a setup.pyT build-backendzbDisabling PEP 517 processing is invalid: project specifies a build backend of {} in pyproject.tomlzsetuptools>=40.8.0wheelz setuptools.build_meta:__legacy__)rr&zO{package} has a pyproject.toml file that does not comply with PEP 518: {reason}rz]it has a 'build-system' table but not 'build-system.requires' which is mandatory in the table)packagereasonz1'build-system.requires' is not a list of strings.z='build-system.requires' contains an invalid requirement: {!r}z backend-path) rrisfiler openrloadgetformatrrrr)r!r"r#r$ has_pyproject has_setupfpp_toml build_systemerror_templater requirementrr rrrrload_pyproject_tomls  (              r6)r collectionsrtypingrrr pip._vendorrZ"pip._vendor.packaging.requirementsrrpip._internal.exceptionsr boolrr rrr6rrrrs