New patches (both for SConstruct): * Do not import from distutils. Since Python support/modules are not built, there is no need to import from distutils. (Importing from distutils may prevent the package from being built on systems without a full distutils module, e.g. Debian with python3-minimal.) I have added back the import in places where it may be helpful to have, if scons is run manually. Fixes #10993. * Do not check the size of time_t. The way this is done is to compile and run a test program; this fails when cross-compiling[1]. This doesn't appear to affect any functionality (other than missing a compile-time warning that things will fail in 2038 if time_t is too small). [1]: https://gitlab.com/gpsd/gpsd/issues/48 Signed-off-by: Jeffery To <jeffery.to@gmail.com>
26 lines
811 B
Diff
26 lines
811 B
Diff
--- a/SConstruct
|
|
+++ b/SConstruct
|
|
@@ -42,7 +42,6 @@ import re
|
|
import subprocess
|
|
import sys
|
|
import time
|
|
-from distutils import sysconfig
|
|
import SCons
|
|
|
|
|
|
@@ -669,6 +668,7 @@ def GetPythonValue(context, name, imp, e
|
|
context.Message('Obtaining Python %s... ' % name)
|
|
context.sconf.cached = 0 # Avoid bogus "(cached)"
|
|
if not env['target_python']:
|
|
+ from distutils import sysconfig
|
|
status, value = 0, str(eval(expr))
|
|
else:
|
|
command = [target_python_path, '-c', '%s; print(%s)' % (imp, expr)]
|
|
@@ -1218,6 +1218,7 @@ if helping:
|
|
|
|
# If helping just get usable config info from the local Python
|
|
target_python_path = ''
|
|
+ from distutils import sysconfig
|
|
py_config_text = str(eval(PYTHON_CONFIG_CALL))
|
|
python_libdir = str(eval(PYTHON_LIBDIR_CALL))
|
|
|