mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-28 07:48:37 -04:00
dist: Implement fallback for sysconfig for FreezeTool (see #1395)
This commit is contained in:
parent
a5be6fa5ff
commit
622eda951f
10
direct/src/dist/FreezeTool.py
vendored
10
direct/src/dist/FreezeTool.py
vendored
@ -9,7 +9,10 @@ import imp
|
|||||||
import platform
|
import platform
|
||||||
import struct
|
import struct
|
||||||
import io
|
import io
|
||||||
import distutils.sysconfig as sysconf
|
try:
|
||||||
|
import distutils.sysconfig as sysconf
|
||||||
|
except ImportError:
|
||||||
|
import sysconfig as sysconf
|
||||||
import zipfile
|
import zipfile
|
||||||
import importlib
|
import importlib
|
||||||
|
|
||||||
@ -223,7 +226,10 @@ class CompilationEnvironment:
|
|||||||
|
|
||||||
# Paths to Python stuff.
|
# Paths to Python stuff.
|
||||||
self.Python = None
|
self.Python = None
|
||||||
self.PythonIPath = sysconf.get_python_inc()
|
if hasattr(sysconf, 'get_python_inc'):
|
||||||
|
self.PythonIPath = sysconf.get_python_inc()
|
||||||
|
else:
|
||||||
|
self.PythonIPath = sysconf.get_path('include')
|
||||||
self.PythonVersion = sysconf.get_config_var("LDVERSION") or sysconf.get_python_version()
|
self.PythonVersion = sysconf.get_config_var("LDVERSION") or sysconf.get_python_version()
|
||||||
|
|
||||||
# The VC directory of Microsoft Visual Studio (if relevant)
|
# The VC directory of Microsoft Visual Studio (if relevant)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user