File: //usr/local/lib/python3.7/site-packages/setuptools/command/__pycache__/sdist.cpython-37.pyc
B
N��g_ � @ s� d dl mZ d dlm mZ d dlZd dlZd dlZd dl Z d dl
mZ ddlm
Z
ddlmZ eZd
d d
�ZG dd� dej�ZdS )� )�logN)�chain� )�metadata� )�_ORIGINAL_SUBCOMMANDS� c c s6 x0t jdd�D ] }x|�� | �D ]
}|V q W qW dS )z%Find all files under revision controlzsetuptools.file_finders)�groupN)r �entry_points�load)�dirname�ep�item� r �</tmp/pip-unpacked-wheel-yrlplx0q/setuptools/command/sdist.py�walk_revctrl s r c s� e Zd ZdZdddddgZi Zddd d
gZedd� eD ��Zd
d� Z dd� Z
dd� Zdd� Ze
ejdd� ��Z� fdd�Z� fdd�Zdd� Zdd� Zdd � Zd!d"� Z� fd#d$�Zd%d&� Zd'd(� Zd)d*� 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]r z.rstz.txtz.mdc c s | ]}d � |�V qdS )z README{0}N)�format)�.0�extr r r � <genexpr>+ s zsdist.<genexpr>c C s� | � d� | �d�}|j| _| j�tj�|jd�� | �� x| � � D ]}| � |� qFW | �
� t| jdg �}x*| j
D ] }dd|f}||krv|�|� qvW d S )N�egg_infozSOURCES.txt�
dist_filesr r )�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.runc C s t j�| � | �� d S )N)�origr �initialize_options�_default_to_gztar)r) r r r r/ @ s zsdist.initialize_optionsc C s t jdkrd S dg| _d S )N)� � r �betar �gztar)�sys�version_info�formats)r) r r r r0 E s
zsdist._default_to_gztarc C s$ | � � � tj�| � W dQ R X dS )z%
Workaround for #516
N)�_remove_os_linkr. r r&