7i ddlZddlZddlmZddlmZmZmZddl m Z ddl m Z m Z ddlmZmZmZdedefd Zd edefd Zed gd Zdeededededeef dZy)N) namedtuple)AnyListOptional)tomli)InvalidRequirement Requirement)InstallationErrorInvalidPyProjectBuildRequiresMissingPyProjectBuildRequiresobjreturncJt|txrtd|DS)Nc3<K|]}t|tyw)N) isinstancestr).0items `/mnt/ssd/data/python-lab/ChefSystem/venv/lib/python3.12/site-packages/pip/_internal/pyproject.py z"_is_list_of_str..s(O4D#)>(Os)rlistall)r s r_is_list_of_strrs c4 OS(O3(O%OOunpacked_source_directorycBtjj|dS)Nzpyproject.toml)ospathjoin)rs rmake_pyproject_pathr s 77<<13C DDrBuildSystemDetails)requiresbackendcheck backend_path use_pep517pyproject_tomlsetup_pyreq_namectjj|}tjj|}|s|st|d|rKt |d5}t j |j}dddjd}nd}|r|s| |s tdd}nr|r(d|vr$||std j|dd}nH|F|xsBtjjd  xs tjjd  }|J|sy|d gd d}|Jd|vr t||d} t| s t|d| D]} t!| |jd} |jdg} g}| d } d g}t%| | || S#1swY3xYw#t"$r} t|d| | d} ~ wwxYw)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.toml setuptoolswheelzsetuptools>=40.8.0z setuptools.build_meta:__legacy__)r"r,r")packagezIt is not a list of strings.)r/reasonz$It contains an invalid requirement: z backend-path)rrisfiler openrloadsreadgetformat importlibutil find_specr rr r rr!)r&r'r(r) has_pyproject has_setupfpp_toml build_systemr" requirementerrorr#r%r$s rload_pyproject_tomlrAsR0GGNN>2Mx(I j= >   .7 3 ,qkk!&&(+G ,{{>2  Y  !*#3  /\9  !*#$$*F<+H$I       5>>++L99 5>>++G44   !! ! ..?   ## # %+H==J'H 8 $+1       $/G##NB7LE5%& h EEi , ,x" / =k_M  s$ $F5. G5F? G! GG!)importlib.utilr7r collectionsrtypingrrr pip._vendorr"pip._vendor.packaging.requirementsrr pip._internal.exceptionsr r r boolrrr r!rArrrJs "&&NPPPE3E3E J VFVF03VF?BVFNQVF  !VFr