@@ -125,25 +125,25 @@ def is_platform_mac():
125
125
class build_ext (_build_ext ):
126
126
def build_extensions (self ):
127
127
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
140
140
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 )
144
144
145
- with open (outfile , "w" ) as f :
146
- f .write (pyxcontent )
145
+ with open (outfile , "w" ) as f :
146
+ f .write (pyxcontent )
147
147
148
148
numpy_incl = pkg_resources .resource_filename ('numpy' , 'core/include' )
149
149
0 commit comments