3 (\@@sddlmZddlZddlZddlZddlmZmZddlm Z ddl m Z e rhddl m Z mZmZmZddZd d Zd d ZdS) )absolute_importN)pytomlsix)InstallationError)MYPY_CHECK_RUNNING)AnyTupleOptionalListcCst|totdd|DS)Ncss|]}t|tjVqdS)N) isinstancer string_types).0itemrj/private/var/folders/pf/wv4htv3x0qs2c2mp0dnn0kchsvlck3/T/pip-build-k1a8l1r5/pip/pip/_internal/pyproject.py sz"_is_list_of_str..)r listall)objrrr_is_list_of_strs rcCs2tjj|d}tjr.t|tjr.|jtj }|S)Nzpyproject.toml) ospathjoinrPY2r text_typeencodesysgetfilesystemencoding) setup_py_dirrrrrmake_pyproject_pathsrc Cs\tjj|}tjj|}|rLtj|dd}tj|}WdQRX|jd}nd}|rv| rv|dk rp| rptdd}n>|rd|kr|dk r| rtdj |dd}n |dkr|}|dk st |sdS|dkrd d gd d }|dk st d } d|kr t| j |dd|d} t | s.t| j |dd|jd} g} | dkrRd } d d g} | | | fS)aLoad 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 ) 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.0wheelz setuptools.build_meta:__legacy__)requiresz 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)packagereasonz1'build-system.requires' is not a list of strings.) rrisfileioopenrloadgetrformatAssertionErrorr) Z use_pep517Zpyproject_tomlsetup_pyZreq_nameZ has_pyprojectZ has_setupfZpp_tomlZ build_systemZerror_templater"backendcheckrrrload_pyproject_toml#sV               r0) __future__rr&rr pip._vendorrrZpip._internal.exceptionsrZpip._internal.utils.typingrZtypingrrr r rrr0rrrrs