Viewing File: /opt/alt/python35/lib/python3.5/site-packages/setuptools/__pycache__/extension.cpython-35.pyc



©‘\Áã@s°ddlZddlZddlZddlZddlZddlmZddlm	Z	dd„Z
e
Ze	ejj
ƒZGdd„deƒZ
Gd	d
„d
e
ƒZdS)éN)Úmapé)Ú
get_unpatchedcCs=d}yt|ddgƒjdSWntk
r8YnXdS)z0
    Return True if Cython can be imported.
    zCython.Distutils.build_extÚfromlistÚ	build_extTF)Ú
__import__rÚ	Exception)Zcython_impl©r	ú
/extension.pyÚ_have_cythons
rc@s.eZdZdZdd„Zdd„ZdS)Ú	Extensionz7Extension that uses '.c' files in place of '.pyx' filescOs2|jddƒ|_tj|||||ŽdS)NÚpy_limited_apiF)Úpopr
Ú
_ExtensionÚ__init__)ÚselfÚnameÚsourcesÚargsÚkwr	r	r
r#szExtension.__init__cCsqtƒr
dS|jpd}|jƒdkr4dnd}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$)
rZlanguageÚlowerÚ	functoolsÚpartialÚreÚsubÚlistrr)rZlangZ
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 src@seZdZdZdS)ÚLibraryz=Just like a regular Extension, but built as a library insteadN)rrr r!r	r	r	r
r"8sr")rrZdistutils.coreZ	distutilsZdistutils.errorsZdistutils.extensionZsetuptools.extern.six.movesrZmonkeyrrZ
have_pyrexZcorerrr"r	r	r	r
Ú<module>s
Back to Directory File Manager