AlkantarClanX12

Your IP : 3.144.93.14


Current Path : /lib/python3.6/site-packages/setuptools/command/__pycache__/
Upload File :
Current File : //lib/python3.6/site-packages/setuptools/command/__pycache__/sdist.cpython-36.pyc

3

9��f7�@s~ddlmZddljjZddlZddlZddlZddl	Z	ddl
mZddlm
Z
ddlZeZddd�ZGd	d
�d
e
ej�ZdS)�)�logN)�six�)�sdist_add_defaults�ccs4x.tjd�D] }x|j�|�D]
}|VqWqWdS)z%Find all files under revision controlzsetuptools.file_findersN)�
pkg_resourcesZiter_entry_points�load)�dirnameZep�item�r�/usr/lib/python3.6/sdist.py�walk_revctrlsr
cs�eZdZdZd0d2d3gZiZdd
ddgZedd�eD��Zdd�Z	dd�Z
dd�Zdd�Ze
ejdd���Zdd�Zejd4kp�d5ejko�d6knp�d7ejko�d8knZer�eZd$d%�Z�fd&d'�Zd(d)�Zd*d+�Zd,d-�Zd.d/�Z�ZS)9�sdistz=Smart sdist that finds anything supported by revision control�formats=N�6formats for source distribution (comma-separated list)�	keep-temp�kz1keep the distribution tree around after creating zarchive file(s)�	dist-dir=�d�Fdirectory to put the source distribution archive(s) in [default: dist]rz.rstz.txtz.mdccs|]}dj|�VqdS)z	README{0}N)�format)�.0Zextrrr�	<genexpr>)szsdist.<genexpr>cCs�|jd�|jd�}|j|_|jjtjj|jd��|j�x|j	�D]}|j|�qFW|j
�t|jdg�}x*|j
D] }dd|f}||krv|j|�qvWdS)N�egg_infozSOURCES.txt�
dist_filesrr)Zrun_command�get_finalized_command�filelist�append�os�path�joinr�check_readmeZget_sub_commands�make_distribution�getattr�distributionZ
archive_files)�selfZei_cmdZcmd_namer�file�datarrr�run+s


z	sdist.runcCstjj|�|j�dS)N)�origr�initialize_options�_default_to_gztar)r%rrrr*>szsdist.initialize_optionscCstjdkrdSdg|_dS)N��r�betarZgztar)r,r-rr.r)�sys�version_infoZformats)r%rrrr+Cs
zsdist._default_to_gztarc	Cs$|j��tjj|�WdQRXdS)z%
        Workaround for #516
        N)�_remove_os_linkr)rr")r%rrrr"Is
zsdist.make_distributionccs^Gdd�d�}ttd|�}yt`Wntk
r6YnXz
dVWd||k	rXttd|�XdS)zG
        In a context, remove and restore os.link if it exists
        c@seZdZdS)z&sdist._remove_os_link.<locals>.NoValueN)�__name__�
__module__�__qualname__rrrr�NoValueWsr5�linkN)r#rr6�	Exception�setattr)r5Zorig_valrrrr1Ps
zsdist._remove_os_linkcCsLytjj|�Wn6tk
rFtj�\}}}|jjjdj	��YnXdS)N�template)
r)r�
read_templater7r/�exc_info�tb_next�tb_frame�f_locals�close)r%�_�tbrrrZ__read_template_hackeszsdist.__read_template_hack��r,rr�csb|jj�r^|jd�}|jj|j��|jjs^x0|jD]&\}�}}|jj�fdd�|D��q4WdS)zgetting python files�build_pycsg|]}tjj�|��qSr)rrr )r�filename)�src_dirrr�
<listcomp>�sz.sdist._add_defaults_python.<locals>.<listcomp>N)r$Zhas_pure_modulesrr�extendZget_source_filesZinclude_package_dataZ
data_files)r%rEr@�	filenamesr)rGr�_add_defaults_python|s

zsdist._add_defaults_pythoncsDy tjrtj|�n
t�j�Wntk
r>tjd�YnXdS)Nz&data_files contains unexpected objects)rZPY2r�_add_defaults_data_files�super�	TypeErrorr�warn)r%)�	__class__rrrL�szsdist._add_defaults_data_filescCs:x4|jD]}tjj|�rdSqW|jddj|j��dS)Nz,standard file not found: should have one of z, )�READMESrr�existsrOr )r%�frrrr!�szsdist.check_readmecCs^tjj|||�tjj|d�}ttd�rJtjj|�rJtj|�|j	d|�|j
d�j|�dS)Nz	setup.cfgr6r)r)r�make_release_treerrr �hasattrrR�unlinkZ	copy_filerZsave_version_info)r%Zbase_dir�files�destrrrrT�s
zsdist.make_release_treec	Cs@tjj|j�sdStj|jd��}|j�}WdQRX|dj�kS)NF�rbz+# file GENERATED by distutils, do NOT edit
)rr�isfile�manifest�io�open�readline�encode)r%�fpZ
first_linerrr�_manifest_is_not_generated�sz sdist._manifest_is_not_generatedcCs�tjd|j�t|jd�}xl|D]d}tjr^y|jd�}Wn$tk
r\tjd|�w YnX|j	�}|j
d�s |rxq |jj|�q W|j
�dS)z�Read the manifest file (named by 'self.manifest') and use it to
        fill in 'self.filelist', the list of files to include in the source
        distribution.
        zreading manifest file '%s'rYzUTF-8z"%r not UTF-8 decodable -- skipping�#N)r�infor[r]rZPY3�decode�UnicodeDecodeErrorrO�strip�
startswithrrr?)r%r[�linerrr�
read_manifest�s
zsdist.read_manifest)rNr�@keep the distribution tree around after creating archive file(s))rrrj)rrr)rBrCrB)r,r)r,rrD)r,rB)r,rBr)r2r3r4�__doc__Zuser_optionsZnegative_optZREADME_EXTENSIONS�tuplerQr(r*r+r"�staticmethod�
contextlib�contextmanagerr1Z_sdist__read_template_hackr/r0Zhas_leaky_handler:rKrLr!rTrari�
__classcell__rr)rPrrs:
	


r)r)Z	distutilsrZdistutils.command.sdistZcommandrr)rr/r\rnZsetuptools.externrZ
py36compatrr�listZ_default_revctrlr
rrrr�<module>s