3 ”Reèã@s®ddlmZddlZddlZddlZddlmZddlmZm Z ddl m Z m Z ddl mZddlmZer€ddlmZmZmZd d „Zd d „Zed ddddgƒZdd„ZdS)é)Úabsolute_importN)Ú namedtuple)ÚsixÚtoml)ÚInvalidRequirementÚ Requirement)ÚInstallationError)ÚMYPY_CHECK_RUNNING)ÚAnyÚOptionalÚListcCst|tƒotdd„|DƒƒS)Ncss|]}t|tjƒVqdS)N)Ú isinstancerÚ string_types)Ú.0Úitem©rú†/builddir/build/BUILDROOT/alt-python36-pip-20.2.4-5.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/pyproject.pyú sz"_is_list_of_str..)r ÚlistÚall)ÚobjrrrÚ_is_list_of_strs rcCs2tjj|dƒ}tjr.t|tjƒr.|jtj ƒƒ}|S)Nzpyproject.toml) ÚosÚpathÚjoinrÚPY2r Ú text_typeÚencodeÚsysÚgetfilesystemencoding)Úunpacked_source_directoryrrrrÚmake_pyproject_pathsr!ÚBuildSystemDetailsÚrequiresÚbackendÚcheckÚ backend_pathcCs¸tjj|ƒ}tjj|ƒ}|rLtj|dd��}tj|ƒ}WdQRX|jdƒ}nd}|rv| rv|dk rp| rptdƒ‚d}n>|r¨d|kr¨|dk r¢| r¢tdj |dƒƒ‚d}n |dkr´|}|dk sÀt ‚|sÈdS|dkrÞd d gd d œ}|dk sêt ‚d } d|k�r t| j |dd�ƒ‚|d} t | ƒ�s.t| j |dd�ƒ‚xJ| D]B} y t | ƒWn.t k �rrt| j |dj | ƒd�ƒ‚YnX�q4W|jdƒ} |jdgƒ} g}| dk�rªd } 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. ) zutf-8)ÚencodingNz build-systemzIDisabling PEP 517 processing is invalid: project does not have a setup.pyTz build-backendzbDisabling PEP 517 processing is invalid: project specifies a build backend of {} in pyproject.tomlzsetuptools>=40.8.0Úwheelz setuptools.build_meta:__legacy__)r#z build-backendzO{package} has a pyproject.toml file that does not comply with PEP 518: {reason}r#z]it has a 'build-system' table but not 'build-system.requires' which is mandatory in the table)ÚpackageÚreasonz1'build-system.requires' is not a list of strings.z='build-system.requires' contains an invalid requirement: {!r}z backend-path)rrÚisfileÚioÚopenrÚloadÚgetrÚformatÚAssertionErrorrrrr")Ú use_pep517Úpyproject_tomlÚsetup_pyÚreq_nameÚ has_pyprojectÚ has_setupÚfÚpp_tomlÚ build_systemÚerror_templater#Ú requirementr$r&r%rrrÚload_pyproject_toml*sj                  r=)Ú __future__rr,rrÚ collectionsrÚ pip._vendorrrZ"pip._vendor.packaging.requirementsrrÚpip._internal.exceptionsrÚpip._internal.utils.typingr Útypingr r r rr!r"r=rrrrÚs