관리-도구
편집 파일: py36compat.cpython-35.pyc
�Rez � @ s� d d l Z d d l m Z d d l m Z d d l m Z d d l m Z Gd d � d � Z e e j d � r� Gd d � d � Z d S) � N)�glob)�convert_path)�sdist)�filterc @ s� e Z d Z d Z d d � Z e d d � � Z d d � Z d d � Z d d � Z d d � Z d d � Z d d � Z d d � Z d S)�sdist_add_defaultsz� Mix-in providing forward-compatibility for functionality as found in distutils on Python 3.7. Do not edit the code in this class except to update functionality as implemented in distutils. Instead, override in the subclass. c C sJ | j � | j � | j � | j � | j � | j � | j � d S)a9 Add all the default files to self.filelist: - README or README.txt - setup.py - test/test*.py - all pure Python modules mentioned in setup script - all files pointed by package_data (build_py) - all files defined in data_files. - all files defined as scripts. - all C sources listed as part of extensions or C libraries in the setup script (doesn't catch C headers!) Warns if (README or README.txt) or setup.py are missing; everything else is optional. N)�_add_defaults_standards�_add_defaults_optional�_add_defaults_python�_add_defaults_data_files�_add_defaults_ext�_add_defaults_c_libs�_add_defaults_scripts)�self� r ��/builddir/build/BUILDROOT/alt-python35-setuptools-36.3.0-4.el8.x86_64/opt/alt/python35/lib/python3.5/site-packages/setuptools/command/py36compat.py�add_defaults s zsdist_add_defaults.add_defaultsc C sS t j j | � s d St j j | � } t j j | � \ } } | t j | � k S)z� Case-sensitive path existence check >>> sdist_add_defaults._cs_path_exists(__file__) True >>> sdist_add_defaults._cs_path_exists(__file__.upper()) False F)�os�path�exists�abspath�split�listdir)�fspathr � directory�filenamer r r �_cs_path_exists( s z"sdist_add_defaults._cs_path_existsc C s� | j | j j g } x� | D]� } t | t � r� | } d } x4 | D], } | j | � rD d } | j j | � PqD W| s� | j d d j | � � q | j | � r� | j j | � q | j d | � q Wd S)NFTz,standard file not found: should have one of z, zstandard file '%s' not found) ZREADMES�distribution�script_name� isinstance�tupler �filelist�append�warn�join)r Z standards�fnZaltsZgot_itr r r r 9 s z*sdist_add_defaults._add_defaults_standardsc C sL d d g } x9 | D]1 } t t j j t | � � } | j j | � q Wd S)Nz test/test*.pyz setup.cfg)r r r �isfiler r �extend)r �optional�pattern�filesr r r r N s z)sdist_add_defaults._add_defaults_optionalc C s� | j d � } | j j � r4 | j j | j � � xM | j D]B \ } } } } x- | D]% } | j j t j j | | � � qW Wq>