U n a@sddlmZddlZddlZddlZddlmZddlmZm Z ddl m Z m Z ddl mZddlmZerddlmZmZmZd d Zd d Zed ddddgZddZdS))absolute_importN) namedtuple)sixtoml)InvalidRequirement Requirement)InstallationError)MYPY_CHECK_RUNNING)AnyOptionalListcCst|totdd|DS)Ncss|]}t|tjVqdS)N) isinstancer string_types).0itemrXC:\Users\vtejo\AppData\Local\Temp\pip-unpacked-wheel-6mt8ur68\pip\_internal\pyproject.py sz"_is_list_of_str..)r listall)objrrr_is_list_of_strs rcCs2tj|d}tjr.t|tjr.|t }|S)Nzpyproject.toml) ospathjoinrPY2r text_typeencodesysgetfilesystemencoding)unpacked_source_directoryrrrrmake_pyproject_pathsr!BuildSystemDetailsrequiresbackendcheck backend_pathc Cstj|}tj|}|rLtj|dd}t|}W5QRX|d}nd}|rr|sr|dk rl|sltdd}n<|rd|kr|dk r|std |dd}n |dkr|}|dk st |sdS|dkrd d gd d }|dk st d } d|krt| j |dd|d} t | s(t| j |dd| D]B} z t | Wn.t k rjt| j |d | dYnXq,|d} |dg} g}| dkrd } 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)encodingz build-systemNzIDisabling 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__)r#r(zO{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)packagereasonz1'build-system.requires' is not a list of strings.z='build-system.requires' contains an invalid requirement: {!r}z backend-path)rrisfileioopenrloadgetrformatAssertionErrorrrrr") use_pep517pyproject_tomlsetup_pyreq_name has_pyproject has_setupfpp_toml build_systemerror_templater# requirementr$r&r%rrrload_pyproject_toml*s               r>) __future__rr-rr collectionsr pip._vendorrrZ"pip._vendor.packaging.requirementsrrpip._internal.exceptionsrpip._internal.utils.typingr typingr r r rr!r"r>rrrrs&