@@ -191,13 +191,15 @@ def consume_arg(name):
191191 cflags += '-mfpu=neon'
192192 os .environ ['CFLAGS' ] = cflags
193193
194- compile_cython = False
195- cython_only = False
196- if consume_arg ('cython' ):
197- compile_cython = True
194+ no_compilation = bool ({'docs' , 'sdist' , 'stubcheck' }.intersection (sys .argv ))
195+
196+ compile_cython = not no_compilation
198197
198+ # does nothing now, but consume the arg anyways for compatibilty
199+ consume_arg ('cython' )
200+
201+ cython_only = False
199202if consume_arg ('cython_only' ):
200- compile_cython = True
201203 cython_only = True
202204
203205if compile_cython :
@@ -243,22 +245,13 @@ def consume_arg(name):
243245
244246 # update outdated .c files
245247 if os .path .isfile (c_file ):
246- c_timestamp = os .path .getmtime (c_file )
247- if c_timestamp < deps .timestamp (pyx_file ):
248- dep_timestamp , dep = deps .timestamp (pyx_file ), pyx_file
249- priority = 0
250- else :
251- dep_timestamp , dep = deps .newest_dependency (pyx_file )
252- priority = 2 - (dep in deps .immediate_dependencies (pyx_file ))
253- if dep_timestamp > c_timestamp :
254- outdated = True
255- else :
256- outdated = False
248+ outdated = False
249+ priority = 0
257250 else :
258251 outdated = True
259252 priority = 0
260253 if outdated :
261- print (f'Compiling { pyx_file } because it changed .' )
254+ print (f'Compiling { pyx_file } because the generated C file is missing .' )
262255 queue .append ((priority , {'pyx_file' : pyx_file , 'c_file' : c_file , 'fingerprint' : None , 'quiet' : False ,
263256 'options' : c_options , 'full_module_name' : ext .name ,
264257 'embedded_metadata' : pyx_meta .get (ext .name )}))
@@ -275,7 +268,6 @@ def consume_arg(name):
275268 if cython_only :
276269 sys .exit (0 )
277270
278- no_compilation = 'docs' in sys .argv
279271AUTO_CONFIG = not os .path .isfile ('Setup' ) and not no_compilation
280272if consume_arg ('-auto' ):
281273 AUTO_CONFIG = True
0 commit comments