
    Ef                        d dl Z d dlZd dlZd dlZe j                  j                  e      Ze j                  j                  ed      Z	ej                  j                  e j                  j                  e	       de	       ej                  j                  dej                  vd      ej                  j                  ej                  j                  d      d      ej                  j!                  d	d
dg      d                             Zy)    Nzcython_ext.pyxzRequires cython test file )reasonzzmq.backend.cythonzRequires cython backendwinz#Don't try runtime Cython on Windowslanguage_level      c                 8   dd l dt        j                  vsJ j                  t	        t        j                               | t        |            d }fd}|j                  |       ddl	m
} t        |d      sJ d	}|j                  |      }||k(  sJ y )
Nr   zmq.tests.cython_ext)include_dirs)
setup_argsr   	build_dirc                  d     j                      t        j                  j                  dd        y )Nr	   )	uninstallsysmodulespop)	importers	pyximports   7/usr/lib/python3/dist-packages/zmq/tests/test_cython.pyunimportztest_cython.<locals>.unimport$   s&    	Y'.5       )
cython_extsend_recv_tests   my msg)r   r   r   installdictzmqget_includesstraddfinalizer r   hasattrr   )	r   requesttmpdirr   r   msgreceivedr   r   s	          @@r   test_cythonr&      s     !444!!S%5%5%78%f+ " I J6 " :/000 C((-Hs??r   )osr   pytestr   pathdirname__file__HEREjoinr   markskipifexistsr   platform
startswithparametrizer&    r   r   <module>r5      s    	 
  
	wwx WW\\$ 01
 
z""'
|4   +4M   LLE"+P   )Aq62 3	r   