mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
CMake: Update panda3d/__init__.py
- Python 2.7 EOL warning is now past tense - Use os.add_dll_directory() when available (instead of hacking up PATH)
This commit is contained in:
parent
b739919fe4
commit
e08896deb7
@ -11,6 +11,9 @@ def _fixup_dlls():
|
|||||||
if not os.path.isdir(dll_path):
|
if not os.path.isdir(dll_path):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if hasattr(os, 'add_dll_directory'):
|
||||||
|
os.add_dll_directory(dll_path)
|
||||||
|
else:
|
||||||
os_path = os.environ.get('PATH', '')
|
os_path = os.environ.get('PATH', '')
|
||||||
os_path = os_path.split(os.pathsep) if os_path else []
|
os_path = os_path.split(os.pathsep) if os_path else []
|
||||||
os_path.insert(0, dll_path)
|
os_path.insert(0, dll_path)
|
||||||
|
@ -122,7 +122,7 @@ if __debug__:
|
|||||||
import sys
|
import sys
|
||||||
if sys.version_info < (3, 0):
|
if sys.version_info < (3, 0):
|
||||||
sys.stderr.write('''\\
|
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.
|
To suppress this warning, upgrade to Python 3.
|
||||||
''')
|
''')
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user