o gB @sddlZddlmZddlmZmZmZddlmZddl m Z m Z ddl m Z mZmZdedefd d Zd edefd d ZedgdZdeededededeef ddZdS)N) namedtuple)AnyListOptional)tomli)InvalidRequirement Requirement)InstallationErrorInvalidPyProjectBuildRequiresMissingPyProjectBuildRequiresobjreturncCst|to tdd|DS)Ncss|]}t|tVqdS)N) isinstancestr).0itemr9/usr/lib/python3/dist-packages/pip/_internal/pyproject.py sz"_is_list_of_str..)rlistall)r rrr_is_list_of_strsrunpacked_source_directorycCstj|dS)Nzpyproject.toml)ospathjoin)rrrrmake_pyproject_pathsrBuildSystemDetails)requiresbackendcheck backend_path use_pep517pyproject_tomlsetup_pyreq_namec Cstj|}tj|}|s|st|d|r=40.8.0wheelz setuptools.build_meta:__legacy__)rr'r)packagezIt is not a list of strings.)r)reasonz$It contains an invalid requirement: z backend-path)rrisfiler openrloadsreadgetformatr rr rrr)r"r#r$r% has_pyproject has_setupfpp_toml build_systemr requirementerrorrr!r rrrload_pyproject_tomls|               r8)r collectionsrtypingrrr pip._vendorr"pip._vendor.packaging.requirementsrrpip._internal.exceptionsr r r boolrrrrr8rrrrs,