L3{O h d Z ddlZddlZddlZddlZddlZddlmZ ddlm Z m Z ddlmZ ddl mZmZ ddlmZ ddlmZmZmZmZmZ dd lmZ dd lmZ d Z G d dej Z ej d ej j! Z" ej dej j! Z# ej dej j! Z$ ej dej j% Z& ej dej j% Z'd Z(d Z)d Z* ej dej j! Z+ ej dej j! Z,d Z-dS )z Build swig and f2py sources. N) build_ext)newer_groupnewer)get_platform)DistutilsErrorDistutilsSetupError)log)fortran_ext_match appendpath is_stringis_sequenceget_cmd)process_filec t j d }t |d 5 }t | d 5 }|D ]}| | }|rY| | d| d z || d r| | ddd n# 1 swxY w Y ddd dS # 1 swxY w Y dS )zPSubstitute any occurrence of @foo@ by d['foo'] from source file into target.z@([a-zA-Z_]+)@rwz@%s@ N)recompileopensearchwritereplacegroup)targetsourcedvarfsftlms u/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib64/python3.11/site-packages/numpy/distutils/command/build_src.py subst_varsr$ sc *% & &C fc b " JJqMM HHQYYv ':AaggajjMJJKKKKHHQKKKK s5 C&BCC&C C&C C&&C*-C*c e Zd ZdZg dZg dZg Zd Zd Zd Z d Z d Zd Zd Z d Zd Zd Zd Zd Zd Zg fdZd Zd Zd Zd Zd ZdS ) build_srcz1build sources from SWIG, F2PY files or a function) )z build-src=r zdirectory to "build" sources to)z f2py-opts=Nz!list of f2py command line options)zswig=Nzpath to the SWIG executable)z swig-opts=Nz!list of SWIG command line options)zswig-cppNzAmake SWIG create C++ files (default is autodetected from sources))z f2pyflags=Nz3additional flags to f2py (use --f2py-opts= instead))z swigflags=Nz3additional flags to swig (use --swig-opts= instead))forcefz2forcibly build everything (ignore file timestamps))inplaceiziignore build-lib and put compiled extensions into the source directory alongside your pure Python modules)verbose-cfgNzJchange logging level from WARN to INFO which will show all compiler output)r' r) r+ c d | _ d | _ d | _ d | _ d | _ d | _ d | _ d | _ d | _ d | _ d | _ d | _ d | _ d | _ d | _ d | _ d | _ d S N) extensionspackage py_modulespy_modules_dictr&