CasperSecurity

Current Path : /lib/python3/dist-packages/setuptools/command/__pycache__/
Upload File :
Current File : //lib/python3/dist-packages/setuptools/command/__pycache__/sdist.cpython-310.pyc

o

�_�a
�@sxddlmZddlmmZddlZddlZddlZddl	Z	ddl
mZddlZe
Zd
dd�ZGdd	�d	eej�ZdS)�)�logN�)�sdist_add_defaults�ccs.�t�d�D]}|��|�D]}|VqqdS)z%Find all files under revision controlzsetuptools.file_findersN)�
pkg_resources�iter_entry_points�load)�dirname�ep�item�r�:/usr/lib/python3/dist-packages/setuptools/command/sdist.py�walk_revctrls���rcs�eZdZdZgd�ZiZgd�Zedd�eD��Zdd�Z	dd	�Z
d
d�Zdd
�Ze
ejdd���Z�fdd�Zdd�Zdd�Zdd�Z�fdd�Zdd�Zdd�Zdd�Zd d!�Z�ZS)"�sdistz=Smart sdist that finds anything supported by revision control))zformats=Nz6formats for source distribution (comma-separated list))z	keep-temp�kz@keep the distribution tree around after creating archive file(s))z	dist-dir=�dzFdirectory to put the source distribution archive(s) in [default: dist])zowner=�uz@Owner name used when creating a tar file [default: current user])zgroup=�gzAGroup name used when creating a tar file [default: current group])rz.rstz.txtz.mdccs�|]}d�|�VqdS)z	README{0}N)�format)�.0�extrrr
�	<genexpr>+s�zsdist.<genexpr>cCs�|�d�|�d�}|j|_|j�tj�|jd��|��|�	�D]}|�|�q"|�
�t|jdg�}|j
D]}dd|f}||vrH|�|�q8dS)N�egg_infozSOURCES.txt�
dist_filesrr)�run_command�get_finalized_command�filelist�append�os�path�joinr�check_readme�get_sub_commands�make_distribution�getattr�distribution�
archive_files)�self�ei_cmd�cmd_namer�file�datarrr
�run-s




��z	sdist.runcCstj�|�|��dS�N)�origr�initialize_options�_default_to_gztar�r'rrr
r/@szsdist.initialize_optionscCstjdkrdSdg|_dS)N)��r�betar�gztar)�sys�version_info�formatsr1rrr
r0Es
zsdist._default_to_gztarcCs:|���tj�|�Wd�dS1swYdS)z%
        Workaround for #516
        N)�_remove_os_linkr.rr#r1rrr
r#Ks
"�zsdist.make_distributionc
csv�Gdd�d�}ttd|�}zt`Wn	tyYnwzdVW||ur-ttd|�dSdS||ur:ttd|�ww)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
�NoValueYsr=�linkN)r$rr>�	Exception�setattr)r=�orig_valrrr
r9Rs����zsdist._remove_os_linkcs*t���tj�d�r|j�d�dSdS)Nzpyproject.toml)�super�_add_defaults_optionalrr�isfilerrr1��	__class__rr
rCgs
�zsdist._add_defaults_optionalcCs<|j��r|�d�}|j�|���|�|�|��dSdS)zgetting python files�build_pyN)r%�has_pure_modulesrr�extend�get_source_files�_add_data_files�_safe_data_files�r'rGrrr
�_add_defaults_pythonls


�zsdist._add_defaults_pythoncCs|jS)a�
        Since the ``sdist`` class is also used to compute the MANIFEST
        (via :obj:`setuptools.command.egg_info.manifest_maker`),
        there might be recursion problems when trying to obtain the list of
        data_files and ``include_package_data=True`` (which in turn depends on
        the files included in the MANIFEST).

        To avoid that, ``manifest_maker`` should be able to overwrite this
        method and avoid recursive attempts to build/analyze the MANIFEST.
        )�
data_filesrMrrr
rLsszsdist._safe_data_filescCs|j�dd�|D��dS)zA
        Add data files as found in build_py.data_files.
        css0�|]\}}}}|D]
}tj�||�Vq
qdSr-)rrr )r�_�src_dir�	filenames�namerrr
r�s�
���z(sdist._add_data_files.<locals>.<genexpr>N)rrI)r'rOrrr
rK�s�zsdist._add_data_filescs0zt���WdStyt�d�YdSw)Nz&data_files contains unexpected objects)rB�_add_defaults_data_files�	TypeErrorr�warnr1rErr
rT�s
�zsdist._add_defaults_data_filescCs8|jD]}tj�|�rdSq|�dd�|j��dS)Nz,standard file not found: should have one of z, )�READMESrr�existsrVr )r'�frrr
r!�s
�
��zsdist.check_readmecCs^tj�|||�tj�|d�}ttd�r%tj�|�r%t�|�|�	d|�|�
d��|�dS)Nz	setup.cfgr>r)r.r�make_release_treerrr �hasattrrX�unlink�	copy_filer�save_version_info)r'�base_dir�files�destrrr
rZ�s
zsdist.make_release_treecCsTtj�|j�s	dSt�|jd��}|��}Wd�n1swY|d��kS)NF�rbz+# file GENERATED by distutils, do NOT edit
)rrrD�manifest�io�open�readline�encode)r'�fp�
first_linerrr
�_manifest_is_not_generated�s
��z sdist._manifest_is_not_generatedc	Cs�t�d|j�t|jd�}|D],}z|�d�}Wnty(t�d|�Yqw|��}|�d�s4|s5q|j	�
|�q|��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'rbzUTF-8z"%r not UTF-8 decodable -- skipping�#N)r�inforcre�decode�UnicodeDecodeErrorrV�strip�
startswithrr�close)r'rc�linerrr
�
read_manifest�s�zsdist.read_manifest)r:r;r<�__doc__�user_options�negative_opt�README_EXTENSIONS�tuplerWr,r/r0r#�staticmethod�
contextlib�contextmanagerr9rCrNrLrKrTr!rZrjrs�
__classcell__rrrEr
rs,




r)r)�	distutilsr�distutils.command.sdist�commandrr.rr6rdrz�
py36compatrr�list�_default_revctrlrrrrr
�<module>s

Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY