관리-도구
편집 파일: install_data.cpython-34.pyc
� i f � @ sR d Z d d l Z d d l m Z d d l m Z m Z Gd d � d e � Z d S)z�distutils.command.install_data Implements the Distutils 'install_data' command, for installing platform-independent data files.� N)�Command)�change_root�convert_pathc @ sj e Z d Z d Z d d d g Z d g Z d d � Z d d � Z d d � Z d d � Z d d � Z d S)�install_datazinstall data files�install-dir=�d�Ibase directory for installing data files (default: installation base dir)�root=N�<install everything relative to this alternate root directory�force�f�-force installation (overwrite existing files)c C s@ d | _ g | _ d | _ d | _ | j j | _ d | _ d S)Nr � )�install_dir�outfiles�rootr Zdistribution� data_files�warn_dir)�self� r �C/opt/alt/python34/lib64/python3.4/distutils/command/install_data.py�initialize_options s zinstall_data.initialize_optionsc C s | j d d d d � d S) NZinstallr r r r )zinstall_datazinstall_dir)�rootr )�forcer )Zset_undefined_options)r r r r �finalize_options# s zinstall_data.finalize_optionsc C sk | j | j � xT| j D]I} t | t � r� t | � } | j ra | j d | | j f � n | j | | j � \ } } | j j | � q t | d � } t j j | � s� t j j | j | � } n | j r� t | j | � } n | j | � | d g k r| j j | � q xF | d D]: } t | � } | j | | � \ } } | j j | � q%Wq Wd S)NzMsetup script did not provide a directory for '%s' -- installing right in '%s'r r )Zmkpathr r � isinstance�strr r �warnZ copy_filer �append�os�path�isabs�joinr r )r r �out�_�dir�datar r r �run* s* zinstall_data.runc C s | j p g S)N)r )r r r r � get_inputsK s zinstall_data.get_inputsc C s | j S)N)r )r r r r �get_outputsN s zinstall_data.get_outputs)r r r )r Nr )zforcer r )�__name__� __module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsr r r'