Your IP : 18.117.254.177


Current Path : /opt/alt/python35/lib/python3.5/site-packages/setuptools/command/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib/python3.5/site-packages/setuptools/command/__pycache__/sdist.cpython-35.pyc



�Re��@s�ddlmZddljjZddlZddlZddlZddl	Z	ddl
mZddlm
Z
ddlZeZddd�ZGd	d
�d
e
ej�ZdS)�)�logN)�six�)�sdist_add_defaults�ccs@x9tjd�D](}x|j�|�D]}|Vq)WqWdS)z%Find all files under revision controlzsetuptools.file_findersN)�
pkg_resources�iter_entry_points�load)�dirname�ep�item�r
��/builddir/build/BUILDROOT/alt-python35-setuptools-36.3.0-4.el8.x86_64/opt/alt/python35/lib/python3.5/site-packages/setuptools/command/sdist.py�walk_revctrlsrcs<eZdZdZd-ddddfd.gZiZd/Zdd�Zdd�Zdd�Z	dd�Z
eej
dd���Zdd�Zejd0kp�d1ejko�d2knp�d3ejko�d4knZer�eZd!d"�Z�fd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Z�S)5�sdistz=Smart sdist that finds anything supported by revision control�formats=N�6formats for source distribution (comma-separated list)z	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]�README�
README.rst�
README.txtcCs�|jd�|jd�}|j|_|jjtjj|jd��|j�x!|j	�D]}|j|�qaWddl
}d|jjkr�|j
�|j�t|jdg�}x9|jD].}dd|f}||kr�|j|�q�WdS)N�egg_infozSOURCES.txtr�check�
dist_filesrr)�run_command�get_finalized_command�filelist�append�os�path�joinr�check_readme�get_sub_commands�distutils.command�command�__all__Zcheck_metadata�make_distribution�getattr�distributionZ
archive_files)�selfZei_cmd�cmd_name�	distutilsr�file�datar
r
r�run*s 
"


z	sdist.runcCstjj|�|j�dS)N)�origr�initialize_options�_default_to_gztar)r,r
r
rr3Dszsdist.initialize_optionscCs#tjdkrdSdg|_dS)N��r�betar�gztar)r5r6rr7r)�sys�version_info�formats)r,r
r
rr4Iszsdist._default_to_gztarc	Cs(|j��tjj|�WdQRXdS)z%
        Workaround for #516
        N)�_remove_os_linkr2rr))r,r
r
rr)Os
zsdist.make_distributionccsqGdd�d�}ttd|�}y
t`Wntk
rCYnXz	dVWd||k	rlttd|�XdS)zG
        In a context, remove and restore os.link if it exists
        c@seZdZdS)z&sdist._remove_os_link.<locals>.NoValueN)�__name__�
__module__�__qualname__r
r
r
r�NoValue]sr@�linkN)r*r!rA�	Exception�setattr)r@Zorig_valr
r
rr<Vs

	zsdist._remove_os_linkcCs\ytjj|�WnAtk
rWtj�\}}}|jjjdj	��YnXdS)N�template)
r2r�
read_templaterBr9�exc_info�tb_next�tb_frame�f_locals�close)r,�_�tbr
r
rZ__read_template_hackks
zsdist.__read_template_hack��r5rr�cs�|jj�r�|jd�}|jj|j��|jjs�x@|jD]5\}�}}|jj�fdd�|D��qJWdS)zgetting python files�build_pycs%g|]}tjj�|��qSr
)r!r"r#)�.0�filename)�src_dirr
r�
<listcomp>�s	z.sdist._add_defaults_python.<locals>.<listcomp>N)r+�has_pure_modulesrr�extendZget_source_filesZinclude_package_data�
data_files)r,rPrK�	filenamesr
)rSr�_add_defaults_python�szsdist._add_defaults_pythoncsPy*tjrtj|�n
t�j�Wntk
rKtjd�YnXdS)Nz&data_files contains unexpected objects)r�PY2r�_add_defaults_data_files�super�	TypeErrorr�warn)r,)�	__class__r
rr[�s	
zsdist._add_defaults_data_filescCsKxD|jD]}tjj|�r
dSq
W|jddj|j��dS)Nz,standard file not found: should have one of z, )�READMESr!r"�existsr^r#)r,�fr
r
rr$�szsdist.check_readmecCs�tjj|||�tjj|d�}ttd�ritjj|�ritj|�|j	d|�|j
d�j|�dS)Nz	setup.cfgrAr)r2r�make_release_treer!r"r#�hasattrra�unlink�	copy_filerZsave_version_info)r,�base_dir�files�destr
r
rrc�s!
zsdist.make_release_treec	CsTtjj|j�sdStj|jd��}|j�}WdQRX|dj�kS)NF�rbz+# file GENERATED by distutils, do NOT edit
)r!r"�isfile�manifest�io�open�readline�encode)r,�fp�
first_liner
r
r�_manifest_is_not_generated�sz sdist._manifest_is_not_generatedcCs�tjd|j�t|jd�}x�|D]�}tjrwy|jd�}Wn&tk
rvtjd|�w,YnX|j	�}|j
d�s,|r�q,|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'rjzUTF-8z"%r not UTF-8 decodable -- skipping�#N)r�inforlrnr�PY3�decode�UnicodeDecodeErrorr^�strip�
startswithrr rJ)r,rl�liner
r
r�
read_manifest�s
	
zsdist.read_manifest)rNr)rrr)rrr)rMrNrM)r5r)r5rrO)r5rM)r5rMr)r=r>r?�__doc__�user_options�negative_optr`r1r3r4r)�staticmethod�
contextlib�contextmanagerr<Z_sdist__read_template_hackr9r:Zhas_leaky_handlerErYr[r$rcrsr|r
r
)r_rrs8		


r)r.rZdistutils.command.sdistr'rr2r!r9rmr�Zsetuptools.externrZ
py36compatrr�listZ_default_revctrlrr
r
r
r�<module>s

?>