o
    0g                     @   s\   d dl Z d dlmZmZmZ dZ			dddZdd Zd	d
 Zdd Z	dd Z
dd ZdS )    N)ListOptionalSequencea'  import io, os, sys, setuptools, tokenize; sys.argv[0] = {0!r}; __file__={0!r};f = getattr(tokenize, 'open', open)(__file__) if os.path.exists(__file__) else io.StringIO('from setuptools import setup; setup()');code = f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))Fc                 C   sF   t jg}|r|dg7 }|dt| g7 }|r||7 }|r!|dg7 }|S )ao  
    Get setuptools command arguments with shim wrapped setup file invocation.

    :param setup_py_path: The path to setup.py to be wrapped.
    :param global_options: Additional global options.
    :param no_user_config: If True, disables personal user configuration.
    :param unbuffered_output: If True, adds the unbuffered switch to the
     argument list.
    z-uz-cz--no-user-cfg)sys
executable_SETUPTOOLS_SHIMformat)setup_py_pathglobal_optionsno_user_configunbuffered_outputargs r   k/home/www/bk.finsightngr.online/venv20/lib/python3.10/site-packages/pip/_internal/utils/setuptools_build.pymake_setuptools_shim_args   s   

r   c                 C   s(   t | |dd}|dd|g7 }||7 }|S )NTr
   r   bdist_wheelz-dr   )r	   r
   build_optionsdestination_dirr   r   r   r    make_setuptools_bdist_wheel_args0   s   r   c                 C   s   t | |dd}|ddg7 }|S )NTr   cleanz--allr   )r	   r
   r   r   r   r   make_setuptools_clean_argsC   s
   r   c                 C   sf   |r|rJ t | ||d}|ddg7 }||7 }|r|d|g7 }|d ur)|d|g7 }|r1|ddg7 }|S )N)r
   r   developz	--no-deps--prefixz--install-dir--user	--prefix=r   )r	   r
   install_optionsr   prefixhomeuse_user_siter   r   r   r   make_setuptools_develop_argsO   s   
r!   c                 C   s*   t | |d}|dg7 }|r|d|g7 }|S )N)r   egg_infoz
--egg-baser   )r	   egg_info_dirr   r   r   r   r   make_setuptools_egg_info_argsp   s
   
r$   c                 C   s   |r|rJ |r|rJ t | ||	dd}|dd|g7 }|dg7 }|d ur*|d|g7 }|d ur4|d|g7 }|d ur>|d|g7 }|rF|d	d
g7 }|
rN|dg7 }n|dg7 }|r[|d|g7 }||7 }|S )NT)r
   r   r   installz--recordz#--single-version-externally-managedz--rootr   z--homer   r   z	--compilez--no-compilez--install-headersr   )r	   r
   r   record_filenamerootr   
header_dirr   r    r   	pycompiler   r   r   r   make_setuptools_install_args   s2   

r*   )NFF)r   typingr   r   r   r   r   r   r   r!   r$   r*   r   r   r   r   <module>   s    	
!