File: //lib/python3/dist-packages/numpy/distutils/command/__pycache__/build_src.cpython-310.pyc
o
6��a�y � @ sR d Z ddlZddlZddlZddlZddlZddlmZ ddlm Z m
Z
ddlmZ ddl
mZmZ ddlmZ ddlmZmZmZmZmZ dd lmZ dd lmZ d
d� ZG dd
� d
ej�Ze�dej �j!Z"e�dej �j!Z#e�dej �j!Z$e�dej �j%Z&e�dej �j%Z'dd� Z(dd� Z)dd� Z*e�dej �j!Z+e�dej �j!Z,dd� Z-dS )z Build swig and f2py sources.
� N)� build_ext)�newer_group�newer)�get_platform)�DistutilsError�DistutilsSetupError)�log)�fortran_ext_match�
appendpath� is_string�is_sequence�get_cmd)�process_filec C s� t �d�}t|d��K}t| d��-}|D ]"}|�|�}|r0|�|�d|�d� ||�d� �� q|�|� qW d � n1 s@w Y W d � dS W d � dS 1 sXw Y dS )zPSubstitute any occurrence of @foo@ by d['foo'] from source file into
target.z@([a-zA-Z_]+)@�r�wz@%s@� N)�re�compile�open�search�write�replace�group)�target�source�d�var�fs�ft�l�m� r! �C/usr/lib/python3/dist-packages/numpy/distutils/command/build_src.py�
subst_vars s
(���"�r# c @ s� e Zd ZdZg d�Zg d�Zg Zdd� Zdd� Zdd � Z d
d� Z
dd
� Zdd� Zdd� Z
dd� Zdd� Zdd� Zdd� Zdd� Zdd� Zg fdd�Zd d!� Zd"d#� Zd$d%� Zd&d'� Zd(d)� Zd*S )+� 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))�force�fz2forcibly build everything (ignore file timestamps))�inplace�iziignore 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'