B
%? @ sp d dl Z d dlZd dlZd dlZd dlZddlmZ dd ZeZ eej
jZG dd deZG dd d eZ
dS )
N )
get_unpatchedc C s2 d} yt | dgdj dS tk
r, Y nX dS )z0
Return True if Cython can be imported.
zCython.Distutils.build_ext build_ext)fromlistTF)
__import__r Exception)Zcython_impl r /builddir/build/BUILDROOT/alt-python37-setuptools-58.3.0-4.el9.x86_64/opt/alt/python37/lib/python3.7/site-packages/setuptools/extension.py_have_cython
s r
c @ s e Zd ZdZdd Zdd ZdS ) Extensionz7Extension that uses '.c' files in place of '.pyx' filesc O s( | dd| _tj| ||f|| d S )Npy_limited_apiF)popr
_Extension__init__)selfnamesourcesargskwr r r r ! s zExtension.__init__c C sN t r
dS | jpd}| dkr$dnd}ttjd|}tt|| j | _ dS )z
Replace sources with .pyx extensions to sources with the target
language extension. This mechanism allows language authors to supply
pre-converted sources but to prefer the .pyx sources.
N zc++z.cppz.cz.pyx$)
r
languagelower functoolspartialresublistmapr )r langZ
target_extr r r r _convert_pyx_sources_to_lang' s
z&Extension._convert_pyx_sources_to_langN)__name__
__module____qualname____doc__r r r r r r r s r c @ s e Zd ZdZdS )Libraryz=Just like a regular Extension, but built as a library insteadN)r r! r" r# r r r r r$ 6 s r$ )r r distutils.core distutilsdistutils.errorsdistutils.extensionZmonkeyr r
Z
have_pyrexcorer r r$ r r r r