ó
{Udc           @@  sï   d  d l  m Z d  d l Z d  d l Z d  d l Z d  d l m Z d  d l m Z m	 Z	 d  d l
 m Z m Z d  d l m Z d  d l m Z e rµ d  d l m Z m Z m Z n  d	 „  Z d
 „  Z e d d d d d g ƒ Z d „  Z d S(   i    (   t   absolute_importN(   t
   namedtuple(   t   sixt   toml(   t   InvalidRequirementt   Requirement(   t   InstallationError(   t   MYPY_CHECK_RUNNING(   t   Anyt   Listt   Optionalc         C@  s#   t  |  t ƒ o" t d „  |  Dƒ ƒ S(   Nc         s@  s!   |  ] } t  | t j ƒ Vq d  S(   N(   t
   isinstanceR   t   string_types(   t   .0t   item(    (    se   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/pip/_internal/pyproject.pys	   <genexpr>   s    (   R   t   listt   all(   t   obj(    (    se   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/pip/_internal/pyproject.pyt   _is_list_of_str   s    c         C@  sL   t  j j |  d ƒ } t j rH t | t j ƒ rH | j t j	 ƒ  ƒ } n  | S(   Ns   pyproject.toml(
   t   ost   patht   joinR   t   PY2R   t	   text_typet   encodet   syst   getfilesystemencoding(   t   unpacked_source_directoryR   (    (    se   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/pip/_internal/pyproject.pyt   make_pyproject_path   s    t   BuildSystemDetailst   requirest   backendt   checkt   backend_pathc      	   C@  s|  t  j j | ƒ } t  j j | ƒ } | ri t j | d d ƒ } t j | ƒ } Wd QX| j d ƒ } n d } | r§ | r§ |  d k	 rž |  rž t	 d ƒ ‚ n  t
 }  n_ | rñ d | k rñ |  d k	 rè |  rè t	 d j | d ƒ ƒ ‚ n  t
 }  n |  d k r| }  n  |  d k	 st ‚ |  s"d S| d k rKi d d	 g d
 6d d 6} n  | d k	 s]t ‚ d }	 d
 | k rt	 |	 j d | d d ƒ ƒ ‚ n  | d
 }
 t |
 ƒ sÇt	 |	 j d | d d ƒ ƒ ‚ n  xW |
 D]O } y t | ƒ WqÎt k
 rt	 |	 j d | d d j | ƒ ƒ ƒ ‚ qÎXqÎW| j d ƒ } | j d g  ƒ } g  } | d k rid } d d	 g } n  t |
 | | | ƒ S(   sB  Load 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.
        )
    t   encodings   utf-8Ns   build-systemsI   Disabling PEP 517 processing is invalid: project does not have a setup.pys   build-backendsb   Disabling PEP 517 processing is invalid: project specifies a build backend of {} in pyproject.tomls   setuptools>=40.8.0t   wheelR   s    setuptools.build_meta:__legacy__sO   {package} has a pyproject.toml file that does not comply with PEP 518: {reason}t   packaget   reasons]   it has a 'build-system' table but not 'build-system.requires' which is mandatory in the tables1   'build-system.requires' is not a list of strings.s=   'build-system.requires' contains an invalid requirement: {!r}s   backend-path(   R   R   t   isfilet   iot   openR   t   loadt   gett   NoneR   t   Truet   formatt   AssertionErrorR   R   R   R   (   t
   use_pep517t   pyproject_tomlt   setup_pyt   req_namet   has_pyprojectt	   has_setupt   ft   pp_tomlt   build_systemt   error_templateR   t   requirementR   R!   R    (    (    se   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/pip/_internal/pyproject.pyt   load_pyproject_toml*   sl    				
	(   t
   __future__R    R'   R   R   t   collectionsR   t   pip._vendorR   R   t"   pip._vendor.packaging.requirementsR   R   t   pip._internal.exceptionsR   t   pip._internal.utils.typingR   t   typingR   R	   R
   R   R   R   R:   (    (    (    se   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/pip/_internal/pyproject.pyt   <module>   s   		