,rRY d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddlZddlZddl mZ ddlmZmZ ddlmZmZ ddlmZ dadaej dk r8 ee j j j Z ee d Zd Zd Z d Z!d Z"e"g g g dfd Z#e"g g g ddfd Z$da%d Z&d Z'd Z(d Z)e"d Z* G d d Z+d Z,ej- d Z.dS )z Utility functions for - building and importing modules on test time, using a temporary location - detecting if compilers are present - determining paths to tests N)Path)asbytesasstr)temppathIS_WASM) import_modulei cygwinz**/*.dllc t e t j t n# t $ r Y nw xY w t j t n# t $ r Y nw xY wd a d S d S N)_module_dirsyspathremove ValueErrorshutilrmtreeOSError i/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib64/python3.11/site-packages/numpy/f2py/tests/util.py_cleanupr ' s HOOK(((( D M+&&&& D s $. ;;A A&%A&c t dt j a t j t t t j vr%t j dt t S Nr ) r tempfilemkdtempatexitregisterr r r insertr r r get_module_dirr 5 sO &((!!!ch&&HOOA{+++r c t dt z } t dz a| t j v rt d | S )Nz_test_ext_module_%d z%Temporary module name already in use.)r _module_numr modulesRuntimeError)names r get_temp_module_namer&