o
    "ì¤gW
  ã                   @   sD   d dl Z d dlmZ ddlmZ dd„ ZG dd„ deƒZd	d
„ ZdS )é    N)ÚMSVCCompileré   )Úplatform_bitsc                 C   s"   || v r| S | s
|S d  | |g¡S )aÕ  Concatenate two environment paths avoiding repeats.

    Here `old` is the environment string before the base class initialize
    function is called and `new` is the string after the call. The new string
    will be a fixed string if it is not obtained from the current environment,
    or the same as the old string if obtained from the same environment. The aim
    here is not to append the new string if it is already contained in the old
    string so as to limit the growth of the environment string.

    Parameters
    ----------
    old : string
        Previous environment string.
    new : string
        New environment string.

    Returns
    -------
    ret : string
        Updated environment string.

    ú;)Újoin)ÚoldÚnew© r	   ú^/var/www/html/ecg_monitoring/venv/lib/python3.10/site-packages/numpy/distutils/msvccompiler.pyÚ_merge   s
   r   c                   @   s   e Zd Zddd„Zdd„ ZdS )r   r   c                 C   s   t  | |||¡ d S )N)Ú_MSVCCompilerÚ__init__)ÚselfÚverboseÚdry_runÚforcer	   r	   r
   r   (   s   zMSVCCompiler.__init__c                 C   s~   t  dd¡}t  dd¡}t | ¡ t|t jd ƒt jd< t|t jd ƒt jd< tdkr=|  jdg7  _|  jdg7  _d S d S )NÚlibÚ Úincludeé    z
/arch:SSE2)	ÚosÚgetenvr   Ú
initializer   Úenvironr   Úcompile_optionsÚcompile_options_debug)r   Úenviron_libÚenviron_includer	   r	   r
   r   +   s   
þzMSVCCompiler.initializeN)r   r   r   )Ú__name__Ú
__module__Ú__qualname__r   r   r	   r	   r	   r
   r   '   s    
r   c                 C   s2   | j jdkrg S dg}| j dg¡r| d¡ |S )zè Add flags if we are using MSVC compiler

    We can't see `build_cmd` in our scope, because we have not initialized
    the distutils build command, so use this deferred calculation to run
    when we are building the library.
    Úmsvcz/GL-z-d2VolatileMetadata-)ÚcompilerÚcompiler_typeÚcompiler_optÚcc_test_flagsÚappend)Ú	build_cmdÚflagsr	   r	   r
   Úlib_opts_if_msvc=   s   
r)   )r   Údistutils.msvccompilerr   r   Úsystem_infor   r   r)   r	   r	   r	   r
   Ú<module>   s     