diff --git a/cmake/templates/win32_python/__init__.py b/cmake/templates/win32_python/__init__.py index 8228db8f46..758478f46b 100644 --- a/cmake/templates/win32_python/__init__.py +++ b/cmake/templates/win32_python/__init__.py @@ -11,10 +11,13 @@ def _fixup_dlls(): if not os.path.isdir(dll_path): return - os_path = os.environ.get('PATH', '') - os_path = os_path.split(os.pathsep) if os_path else [] - os_path.insert(0, dll_path) - os.environ['PATH'] = os.pathsep.join(os_path) + if hasattr(os, 'add_dll_directory'): + os.add_dll_directory(dll_path) + else: + os_path = os.environ.get('PATH', '') + os_path = os_path.split(os.pathsep) if os_path else [] + os_path.insert(0, dll_path) + os.environ['PATH'] = os.pathsep.join(os_path) _fixup_dlls() del _fixup_dlls diff --git a/panda/CMakeLists.txt b/panda/CMakeLists.txt index 6535b42e72..a545ef14bd 100644 --- a/panda/CMakeLists.txt +++ b/panda/CMakeLists.txt @@ -122,7 +122,7 @@ if __debug__: import sys if sys.version_info < (3, 0): sys.stderr.write('''\\ -WARNING: Python 2.7 will reach EOL after December 31, 2019. +WARNING: Python 2.7 has reached EOL as of January 1, 2020. To suppress this warning, upgrade to Python 3. ''') sys.stdout.flush()