o
    Ô­jw  ã                   @   s@   d dl Z d dlmZ d dlmZ d dlmZ G dd„ deƒZdS )é    N)ÚCommand)Únew_compiler)Úget_cmdc                   @   s4   e Zd ZdZg Zdd„ Zdd„ Zdd„ Zdd	„ Zd
S )Úinstall_clibz*Command to install installable C librariesc                 C   s   d | _ g | _d S ©N)Úinstall_dirÚoutfiles©Úself© r   úa/var/www/html/CropPilot/venv/lib/python3.10/site-packages/numpy/distutils/command/install_clib.pyÚinitialize_options   s   
zinstall_clib.initialize_optionsc                 C   s   |   dd¡ d S )NÚinstall)Úinstall_libr   )Úset_undefined_optionsr	   r   r   r   Úfinalize_options   s   zinstall_clib.finalize_optionsc                 C   s    t dƒ}|js| ¡  |j}|jstd d�}| | j¡ n|j}| jjD ])}tj	 
| j|j¡}| |j¡}tj	 
||¡}|  |¡ | j |  ||¡d ¡ q$d S )NÚ
build_clib)Úcompilerr   )r   r   r   r   r   Ú	customizeÚdistributionÚinstalled_librariesÚosÚpathÚjoinr   Ú
target_dirÚlibrary_filenameÚnameÚmkpathr   ÚappendÚ	copy_file)r
   Úbuild_clib_cmdÚ	build_dirr   Úlr   r   Úsourcer   r   r   Úrun   s   

ûzinstall_clib.runc                 C   s   | j S r   )r   r	   r   r   r   Úget_outputs'   s   zinstall_clib.get_outputsN)	Ú__name__Ú
__module__Ú__qualname__ÚdescriptionÚuser_optionsr   r   r$   r%   r   r   r   r   r      s    r   )r   Údistutils.corer   Údistutils.ccompilerr   Únumpy.distutils.misc_utilr   r   r   r   r   r   Ú<module>   s
    