
    sgD                     6    d dl Z ddlmZ ddlmZ d Zd Zd Zy)    N   )compile_run_strings)CompilerNotFoundErrorc                     t        t        d      s	 t        dgd      \  \  } }}|d   t        j                  k7  sd| vrPt        j
                  j                  dd      d	k(  rt        d
| d|d      dt        _        t        j                  S dt        _        t        j                  S t        j                  S # t        $ rA dt        _        t        j
                  j                  dd      d	k(  r Y t        j                  S w xY w)Nresult)zmain.f90z.program foo
print *, "hello world"
end programTcleanexit_statushello worldSYMPY_STRICT_COMPILER_CHECKS01 Failed to compile test program:

F)
hasattrhas_fortranr   osEX_OKenvironget
ValueErrorr   r   stdoutstderrinfos      \/var/www/html/venv/lib/python3.12/site-packages/sympy/utilities/_compilation/availability.pyr   r      s    ;)	*%8   &"VVd M"bhh.-v2M::>>"@#F#M$TZ\b%cdd%*"  &*"; % 	!&Kzz~~<cBcI J 	   B; ;8DDc                     t        t        d      s	 t        dgd      \  \  } }}|d   t        j                  k7  sd| vrPt        j
                  j                  dd      d	k(  rt        d
| d|d      dt        _        t        j                  S dt        _        t        j                  S t        j                  S # t        $ rA dt        _        t        j
                  j                  dd      d	k(  r Y t        j                  S w xY w)Nr   )zmain.czC#include <stdio.h>
int main(){
printf("hello world\n");
return 0;
}Tr   r
   r   r   r   r   r   r   F)
r   has_cr   r   r   r   r   r   r   r   r   s      r   r   r      s    5(#	$%8   &"VVd M"bhh.-v2M::>>"@#F#M$TZ\b%cdd$ <<  $<<5<< % 	 ELzz~~<cBcI J <<	r   c                     t        t        d      s	 t        dgd      \  \  } }}|d   t        j                  k7  sd| vrPt        j
                  j                  dd      d	k(  rt        d
| d|d      dt        _        t        j                  S dt        _        t        j                  S t        j                  S # t        $ rA dt        _        t        j
                  j                  dd      d	k(  r Y t        j                  S w xY w)Nr   )zmain.cxxzJ#include <iostream>
int main(){
std::cout << "hello world" << std::endl;
}Tr   r
   r   r   r   r   r   r   F)
r   has_cxxr   r   r   r   r   r   r   r   r   s      r   r!   r!   7   s    7H%	&%8 
  &"VVd M"bhh.-v2M::>>"@#F#M$TZ\b%cdd!& >> "&>>7>> % 	"GNzz~~<cBcI J >>	r   )r   compilationr   utilr   r   r   r!        r   <module>r&      s    	 , '04r%   