@@ -125,25 +125,25 @@ def is_platform_mac():
125125class build_ext (_build_ext ):
126126 def build_extensions (self ):
127127
128- if not cython :
129- raise ImportError ( 'Building pandas requires cython' )
130-
131- for pxifile in _pxifiles :
132- # build pxifiles first, template extention must be .pxi.in
133- assert pxifile .endswith ('.pxi.in' )
134- outfile = pxifile [:- 3 ]
135-
136- if (os .path .exists (outfile ) and
137- os .stat (pxifile ).st_mtime < os .stat (outfile ).st_mtime ):
138- # if .pxi.in is not updated, no need to output .pxi
139- continue
128+ # if builing from c files, don't need to
129+ # generate template output
130+ if cython :
131+ for pxifile in _pxifiles :
132+ # build pxifiles first, template extention must be .pxi.in
133+ assert pxifile .endswith ('.pxi.in' )
134+ outfile = pxifile [:- 3 ]
135+
136+ if (os .path .exists (outfile ) and
137+ os .stat (pxifile ).st_mtime < os .stat (outfile ).st_mtime ):
138+ # if .pxi.in is not updated, no need to output .pxi
139+ continue
140140
141- with open (pxifile , "r" ) as f :
142- tmpl = f .read ()
143- pyxcontent = tempita .sub (tmpl )
141+ with open (pxifile , "r" ) as f :
142+ tmpl = f .read ()
143+ pyxcontent = tempita .sub (tmpl )
144144
145- with open (outfile , "w" ) as f :
146- f .write (pyxcontent )
145+ with open (outfile , "w" ) as f :
146+ f .write (pyxcontent )
147147
148148 numpy_incl = pkg_resources .resource_filename ('numpy' , 'core/include' )
149149
0 commit comments