3 K”ReÁã@s|ddlZddlZddlZddlZddlZddlmZddlm Z dd„Z e Z e ej j ƒZGdd„deƒZ Gd d „d e ƒZdS) éN)Úmapé)Ú get_unpatchedc Cs2d}yt|dgd�jdStk r,YnXdS)z0 Return True if Cython can be imported. zCython.Distutils.build_extÚ build_ext)ÚfromlistTF)Ú __import__rÚ Exception)Z cython_impl©r úŠ/builddir/build/BUILDROOT/alt-python36-setuptools-38.5.2-7.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/setuptools/extension.pyÚ _have_cython sr c@s eZdZdZdd„Zdd„ZdS)Ú Extensionz7Extension that uses '.c' files in place of '.pyx' filescOs(|jddƒ|_tj|||f|ž|ŽdS)NÚpy_limited_apiF)Úpopr Ú _ExtensionÚ__init__)ÚselfÚnameÚsourcesÚargsÚkwr r r r#szExtension.__init__cCsNtƒr dS|jpd}|jƒdkr$dnd}tjtjd|ƒ}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 ÚlanguageÚlowerÚ functoolsÚpartialÚreÚsubÚlistrr)rÚlangZ target_extrr r r Ú_convert_pyx_sources_to_lang)s  z&Extension._convert_pyx_sources_to_langN)Ú__name__Ú __module__Ú __qualname__Ú__doc__rrr r r r r sr c@seZdZdZdS)ÚLibraryz=Just like a regular Extension, but built as a library insteadN)r r!r"r#r r r r r$8sr$)rrÚdistutils.coreÚ distutilsÚdistutils.errorsÚdistutils.extensionZsetuptools.extern.six.movesrZmonkeyrr Z have_pyrexÚcorer rr$r r r r Ús