Speedups: fix file date check when frozen (#2211)

This commit is contained in:
black-sliver 2023-09-22 23:05:04 +02:00 committed by GitHub
parent b4b8426def
commit ea799c494e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -411,7 +411,7 @@ else:
from _speedups import LocationStore
import _speedups
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! "
f"Please rebuild with `cythonize -b -i _speedups.pyx` or delete it!")
except ImportError: