관리-도구
편집 파일: build_py.cpython-33.pyc
� �Re� c @ 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( i N( u build_py( u convert_path( u glob( u Mixin2to3c B s# | Ee Z d Z d d d � Z d S( u Mixin2to3c C s d S( u do nothingN( ( u selfu filesu doctests( ( u4 /tmp/pip-k8wh6o-build/setuptools/command/build_py.pyu run_2to3 s u Mixin2to3.run_2to3NT( u __name__u __module__u __qualname__u Trueu run_2to3( u __locals__( ( u4 /tmp/pip-k8wh6o-build/setuptools/command/build_py.pyu Mixin2to3 s u Mixin2to3c B s� | Ee 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(! u build_pyuX 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( Nu data_files( u _build_pyu finalize_optionsu distributionu package_datau exclude_package_datau __dict__u _build_py__updated_filesu _build_py__doctests_2to3( u self( ( u4 /tmp/pip-k8wh6o-build/setuptools/command/build_py.pyu finalize_options s u build_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( u? Build modules, packages, and copy data files to build directoryNu include_bytecodei FT( u py_modulesu packagesu build_modulesu build_packagesu build_package_datau run_2to3u _build_py__updated_filesu Falseu Trueu _build_py__doctests_2to3u byte_compileu _build_pyu get_outputs( u self( ( u4 /tmp/pip-k8wh6o-build/setuptools/command/build_py.pyu run! s u build_py.runc C s3 | d k r# | j � | _ } | St j | | � S( Nu data_files( u _get_data_filesu data_filesu _build_pyu __getattr__( u selfu attru files( ( u4 /tmp/pip-k8wh6o-build/setuptools/command/build_py.pyu __getattr__5 s u build_py.__getattr__c C sA t j | | | | � \ } } | r7 | j j | � n | | f S( N( u _build_pyu build_moduleu _build_py__updated_filesu append( u selfu moduleu module_fileu packageu outfileu copied( ( u4 /tmp/pip-k8wh6o-build/setuptools/command/build_py.pyu build_module; s u build_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( u? Generate list of '(package,src_dir,build_dir,filenames)' tuplesu .i c s g | ] } | � d � � q S( N( ( u .0u file( u plen( u4 /tmp/pip-k8wh6o-build/setuptools/command/build_py.pyu <listcomp>Q s u, build_py._get_data_files.<locals>.<listcomp>( u analyze_manifestu packagesu get_package_diru osu pathu joinu build_libu splitu lenu find_data_filesu append( u selfu datau packageu src_diru build_diru filenames( ( u plenu4 /tmp/pip-k8wh6o-build/setuptools/command/build_py.pyu _get_data_filesA s %%u build_py._get_data_filesc C s� | j j d g � | j j | g � } | j j | g � d d � } x6 | D]. } | j t t j j | t | � � � � qN W| j | | | � S( u6 Return filenames for package's data files in 'src_dir'u N( u package_datau getu manifest_filesu extendu globu osu pathu joinu convert_pathu exclude_data_files( u selfu packageu src_diru globsu filesu pattern( ( u4 /tmp/pip-k8wh6o-build/setuptools/command/build_py.pyu find_data_filesV s ,u build_py.find_data_filesc C s� x� | j D]� \ } } } } x� | D]� } t j j | | � } | j t j j | � � t j j | | � } | j | | � \ } } t j j | � } | r# | | j j k r# | j j | � q# q# Wq Wd S( u$ Copy data files into build directoryN( u data_filesu osu pathu joinu mkpathu dirnameu copy_fileu abspathu distributionu convert_2to3_doctestsu _build_py__doctests_2to3u append( u selfu packageu src_diru build_diru filenamesu filenameu targetu srcfileu outfu copied( ( u4 /tmp/pip-k8wh6o-build/setuptools/command/build_py.pyu build_package_data` s u build_py.build_package_datac C s\ i | _ } | j j s d Si } x0 | j p2 f D] } | | t | j | � � <q3 W| j d � | j d � } x� | j j D]� } t j j t | � � \ } } d } | } xU | r| | k r| | k r| } t j j | � \ } } t j j | | � } q� W| | k r | j d � r4| | k r4q n | j | | g � j | � q q Wd S( Nu egg_infou .py( u manifest_filesu distributionu include_package_datau packagesu assert_relativeu get_package_diru run_commandu get_finalized_commandu filelistu filesu osu pathu splitu Noneu joinu endswithu setdefaultu append( u selfu mfu src_dirsu packageu ei_cmdu pathu du fu prevu oldfu df( ( u4 /tmp/pip-k8wh6o-build/setuptools/command/build_py.pyu analyze_manifestl s( !u build_py.analyze_manifestc C s d S( N( ( u self( ( u4 /tmp/pip-k8wh6o-build/setuptools/command/build_py.pyu get_data_files� s u build_py.get_data_filesu 2.4i c C s$ t j | | � d d � | j D� S( uj Return complete list of files copied to the build directory This includes both '.py' files and data files, as well as '.pyc' and '.pyo' files if 'include_bytecode' is true. (This method is needed for the 'install_lib' command to do its job properly, and to generate a correct installation manifest.) c S s>