def ext(extName): extPath = extName.replace(".", os.path.sep)+".pyx" return Extension( extName, [extPath], extra_compile_args=my_extra_compile_args_nonmath )