관리-도구
편집 파일: build_py.cpython-34.pyc
� M�Re� � @ s� d d l Z d d l Z d d l Z d d l Z d d l m Z d d l m Z d d l m Z y d d l m Z Wn% e k r� Gd d � d � Z Yn XGd d � d e e � Z d d � Z d S)� N)�build_py)�convert_path)�glob)� Mixin2to3c @ s e Z d Z d d d � Z d S)r Tc C s d S)z do nothingN� )�self�filesZdoctestsr r �6/tmp/pip-l4uy7dan-build/setuptools/command/build_py.py�run_2to3 s zMixin2to3.run_2to3N)�__name__� __module__�__qualname__r r r r r r s r c @ s� e Z d Z d Z 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 d � Z e j d k r� d d d � Z n d d � Z d d � Z d d � Z d d � Z d S)!r aX Enhanced 'build_py' command that includes data files with packages The data files are specified via a 'package_data' argument to 'setup()'. See 'setuptools.dist.Distribution' for more details. Also, this version of the 'build_py' command allows you to specify both 'py_modules' and 'packages' in the same setup operation. c C sc t j | � | j j | _ | j j p+ i | _ d | j k rM | j d =n g | _ g | _ d S)N� data_files)� _build_py�finalize_options�distribution�package_data�exclude_package_data�__dict__�_build_py__updated_files�_build_py__doctests_2to3)r r r r r s zbuild_py.finalize_optionsc C s� | j r | j r d S| j r. | j � n | j rN | j � | j � n | j | j d � | j | j d � | j | j d � | j t j | d d �� d S)z?Build modules, packages, and copy data files to build directoryNFT�include_bytecoder )� py_modules�packagesZ build_modulesZbuild_packages�build_package_datar r r �byte_compiler �get_outputs)r r r r �run! s zbuild_py.runc C s3 | d k r# | j � | _ } | St j | | � S)Nr )�_get_data_filesr r �__getattr__)r �attrr r r r r 5 s zbuild_py.__getattr__c C sA t j | | | | � \ } } | r7 | j j | � n | | f S)N)r �build_moduler �append)r �moduleZmodule_file�package�outfile�copiedr r r r! ; s zbuild_py.build_modulec s� | j � g } x� | j p f D]� } | j | � } t j j | j g | j d � � } t | � d � � f d d � | j | | � D� } | j | | | | f � q W| S)z?Generate list of '(package,src_dir,build_dir,filenames)' tuples�.� c s g | ] } | � d � � q S)Nr )�.0�file)�plenr r � <listcomp>Q s z,build_py._get_data_files.<locals>.<listcomp>)�analyze_manifestr �get_package_dir�os�path�join� build_lib�split�len�find_data_filesr"