Your IP : 18.119.117.122


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

3

K�Re7�@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_resources�iter_entry_points�load)�dirname�ep�item�r
��/builddir/build/BUILDROOT/alt-python36-setuptools-38.5.2-7.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/setuptools/command/sdist.py�walk_revctrlsrcs�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)�.0�extr
r
r�	<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)�run_command�get_finalized_command�filelist�append�os�path�joinr�check_readme�get_sub_commands�make_distribution�getattr�distributionZ
archive_files)�selfZei_cmd�cmd_namer�file�datar
r
r�run+s


z	sdist.runcCstjj|�|j�dS)N)�origr�initialize_options�_default_to_gztar)r*r
r
rr0>szsdist.initialize_optionscCstjdkrdSdg|_dS)N��r�betar�gztar)r2r3rr4r)�sys�version_info�formats)r*r
r
rr1Cs
zsdist._default_to_gztarc	Cs$|j��tjj|�WdQRXdS)z%
        Workaround for #516
        N)�_remove_os_linkr/rr')r*r
r
rr'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__r
r
r
r�NoValueWsr=�linkN)r(r"r>�	Exception�setattr)r=Zorig_valr
r
rr9Ps
zsdist._remove_os_linkcCsLytjj|�Wn6tk
rFtj�\}}}|jjjdj	��YnXdS)N�template)
r/r�
read_templater?r6�exc_info�tb_next�tb_frame�f_locals�close)r*�_�tbr
r
rZ__read_template_hackeszsdist.__read_template_hack��r2rr�csb|jj�r^|jd�}|jj|j��|jjs^x0|jD]&\}�}}|jj�fdd�|D��q4WdS)zgetting python files�build_pycsg|]}tjj�|��qSr
)r"r#r$)r�filename)�src_dirr
r�
<listcomp>�sz.sdist._add_defaults_python.<locals>.<listcomp>N)r)�has_pure_modulesrr �extendZget_source_filesZinclude_package_data�
data_files)r*rMrH�	filenamesr
)rOr�_add_defaults_python|s

zsdist._add_defaults_pythoncsDy tjrtj|�n
t�j�Wntk
r>tjd�YnXdS)Nz&data_files contains unexpected objects)r�PY2r�_add_defaults_data_files�super�	TypeErrorr�warn)r*)�	__class__r
rrW�szsdist._add_defaults_data_filescCs:x4|jD]}tjj|�rdSqW|jddj|j��dS)Nz,standard file not found: should have one of z, )�READMESr"r#�existsrZr$)r*�fr
r
rr%�szsdist.check_readmecCs^tjj|||�tjj|d�}ttd�rJtjj|�rJtj|�|j	d|�|j
d�j|�dS)Nz	setup.cfgr>r)r/r�make_release_treer"r#r$�hasattrr]�unlink�	copy_filerZsave_version_info)r*�base_dir�files�destr
r
rr_�s
zsdist.make_release_treec	Cs@tjj|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�}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'rfzUTF-8z"%r not UTF-8 decodable -- skipping�#N)r�inforhrjr�PY3�decode�UnicodeDecodeErrorrZ�strip�
startswithr r!rG)r*rh�liner
r
r�
read_manifest�s
zsdist.read_manifest)rNr�@keep the distribution tree around after creating archive file(s))rrry)rrr)rJrKrJ)r2r)r2rrL)r2rJ)r2rJr)r:r;r<�__doc__�user_options�negative_optZREADME_EXTENSIONS�tupler\r.r0r1r'�staticmethod�
contextlib�contextmanagerr9Z_sdist__read_template_hackr6r7Zhas_leaky_handlerBrUrWr%r_rorx�
__classcell__r
r
)r[rrs:
	


r)r)�	distutilsrZdistutils.command.sdist�commandrr/r"r6rirZsetuptools.externrZ
py36compatrr�listZ_default_revctrlrr
r
r
r�<module>s


?>