U
    ÇZj9  ã                   @   sj   d dl Z d dlZd dlZd dlZd dlmZ d dlmZ ejd  dkrRe	Z
efZneZ
eefZdd„ ZdS )é    N)Úerrors)Úutilé   c           
   	   C   s¬  |sdS t |tƒr tj |¡}ntj d¡}tj |¡sFt d| ¡‚zt 	|| j
¡}W nB tk
rš   t ¡ d }t d¡ t d||jj|f ¡‚Y nX d}|�rD| ¡ D ]”\}}t| jd| ƒrÜt| jd| ƒ|ƒ q®t| j|ƒrøt| j||ƒ q®t| |ƒ�rt| ||ƒ q®||k�r,t| j||ƒ q®d	t|ƒ }	t |	¡ q®zt| j| ƒ ¡  W n( tk
�r€   | jjd
  | ¡ Y nX t | jjt t!f ƒ�r¨t"| jjƒ| j_dS )a=  Implements the actual pbr setup() keyword.

    When used, this should be the only keyword in your setup() aside from
    `setup_requires`.

    If given as a string, the value of pbr is assumed to be the relative path
    to the setup.cfg file to use.  Otherwise, if it evaluates to true, it
    simply assumes that pbr should be used, and the default 'setup.cfg' is
    used.

    This works by reading the setup.cfg file, parsing out the supported
    metadata and command options, and using them to rebuild the
    `DistributionMetadata` object and set the newly added command options.

    The reason for doing things this way is that a custom `Distribution` class
    will not play nicely with setup_requires; however, this implementation may
    not work well with distributions that do use a `Distribution` subclass.
    Nz	setup.cfgz%The setup.cfg file %s does not exist.é   zError parsingzError parsing %s: %s: %s)Zlong_description_content_typeZproject_urlsZprovides_extrasÚset_zUnknown distribution option: %séÿÿÿÿ)#Ú
isinstanceÚstring_typeÚosÚpathÚabspathÚexistsr   ÚDistutilsFileErrorr   Zcfg_to_argsÚscript_argsÚ	ExceptionÚsysÚexc_infoÚloggingÚ	exceptionÚDistutilsSetupErrorÚ	__class__Ú__name__ÚitemsÚhasattrÚmetadataÚgetattrÚsetattrÚreprÚwarningsÚwarnÚsuperÚfinalize_optionsÚ	TypeErrorÚ	__bases__ÚversionÚinteger_typesÚfloatÚstr)
ÚdistÚattrÚvaluer   ÚattrsÚeZ_DISTUTILS_UNSUPPORTED_METADATAÚkeyÚvalÚmsg© r0   úK/var/www/html/TRUCKING_PROJECT/venv/lib/python3.8/site-packages/pbr/core.pyÚpbr@   sH    
ÿ
ÿ

r2   )r   r
   r   r   Ú	distutilsr   r2   r   Úversion_infor'   r	   Úintr%   Ú
basestringÚlongr0   r0   r0   r1   Ú<module>.   s   