Speedups: fix file date check when frozen (#2211)
This commit is contained in:
parent
b4b8426def
commit
ea799c494e
|
@ -411,7 +411,7 @@ else:
|
||||||
from _speedups import LocationStore
|
from _speedups import LocationStore
|
||||||
import _speedups
|
import _speedups
|
||||||
import os.path
|
import os.path
|
||||||
if os.path.getctime(_speedups.__file__) < os.path.getctime("_speedups.pyx"):
|
if os.path.isfile("_speedups.pyx") and os.path.getctime(_speedups.__file__) < os.path.getctime("_speedups.pyx"):
|
||||||
warnings.warn(f"{_speedups.__file__} outdated! "
|
warnings.warn(f"{_speedups.__file__} outdated! "
|
||||||
f"Please rebuild with `cythonize -b -i _speedups.pyx` or delete it!")
|
f"Please rebuild with `cythonize -b -i _speedups.pyx` or delete it!")
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|
Loading…
Reference in New Issue