3
A|e*                 @   sv   d dl mZ d dlZd dlZd dlZd dlZd dljjZ	d dl
Z
e	jZG dd de	jZdd e	jjD ej e_dS )    )DistutilsArgErrorNc               @   s   e Zd ZdZejjddg Zejjddg Zddd	 fd
dd	 fgZe	eZ
dd Zdd Zdd Zdd Zedd Zdd ZdS )installz7Use easy_install to install the package, w/dependenciesold-and-unmanageableNTry not to use this!!single-version-externally-managed5used by system package builders to create 'flat' eggsinstall_egg_infoc             C   s   dS )NT )selfr	   r	   ^/var/www/html/StaffProfile/staffvenv/lib/python3.6/site-packages/setuptools/command/install.py<lambda>   s    zinstall.<lambda>install_scriptsc             C   s   dS )NTr	   )r
   r	   r	   r   r      s    c             C   s*   t jdtj tjj|  d | _d | _d S )NzRsetup.py install is deprecated. Use build and pip and other standards-based tools.)	warningswarn
setuptoolsSetuptoolsDeprecationWarningorigr   initialize_optionsold_and_unmanageable!single_version_externally_managed)r
   r	   r	   r   r       s    zinstall.initialize_optionsc             C   s<   t jj|  | jrd| _n| jr8| j r8| j r8tdd S )NTzAYou must specify --record or --root when building system packages)r   r   finalize_optionsrootr   recordr   )r
   r	   r	   r   r   ,   s    zinstall.finalize_optionsc             C   s(   | j s| jrtjj| S d | _d| _d S )N )r   r   r   r   handle_extra_pathZ	path_fileZ
extra_dirs)r
   r	   r	   r   r   7   s    zinstall.handle_extra_pathc             C   s@   | j s| jrtjj| S | jtj s4tjj|  n| j  d S )N)	r   r   r   r   run_called_from_setupinspectcurrentframedo_egg_install)r
   r	   r	   r   r   A   s
    zinstall.runc             C   sz   | dkr4d}t j| tj dkr0d}t j| dS tj| d }|dd \}tj|}|jjdd	}|d
kox|j	dkS )a  
        Attempt to detect whether run() was called from setup() or by another
        command.  If called by setup(), the parent caller will be the
        'run_command' method in 'distutils.dist', and *its* caller will be
        the 'run_commands' method.  If called any other way, the
        immediate caller *might* be 'run_command', but it won't have been
        called by 'run_commands'. Return True in that case or if a call stack
        is unavailable. Return False otherwise.
        Nz4Call stack not available. bdist_* commands may fail.
IronPythonz6For best results, pass -X:Frames to enable call stack.T      __name__r   zdistutils.distrun_commands)
r   r   platformpython_implementationr   getouterframesgetframeinfo	f_globalsgetfunction)Z	run_framemsgresZcallerinfoZcaller_moduler	   r	   r   r   L   s    


zinstall._called_from_setupc             C   s   | j jd}|| j d| j| jd}|j  d|_|jjtjd | j	d | j j
djg}tjrp|jdtj ||_|jdd	 d t_d S )
Neasy_installx)argsr   r   .z*.egg	bdist_eggr   F)Zshow_deprecation)distributionget_command_classr   r   ensure_finalizedZalways_copy_fromZpackage_indexscanglobrun_commandget_command_objZ
egg_outputr   bootstrap_install_frominsertr1   r   )r
   r/   cmdr1   r	   r	   r   r   g   s    
zinstall.do_egg_install)r   Nr   )r   Nr   )r#   
__module____qualname____doc__r   r   user_optionsboolean_optionsnew_commandsdict_ncr   r   r   r   staticmethodr   r   r	   r	   r	   r   r      s     


r   c             C   s   g | ]}|d  t jkr|qS )r   )r   rE   ).0r=   r	   r	   r   
<listcomp>   s    rH   )distutils.errorsr   r   r8   r   r%   Zdistutils.command.installcommandr   r   r   _installsub_commandsrC   r	   r	   r	   r   <module>   s   s