scons,stdlib: Remove deprecated 'distutils' module
The Python module 'distutils' will be removed in Python 3.12:
https://docs.python.org/3/library/distutils.html
This patch removed usage of 'distutils' in the gem5 code base.
Change-Id: I1e3a944446149f3cd6cbf4211a1565b5f74c85a0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/71679
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
(cherry picked from commit b182b15f93)
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/71741
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
This commit is contained in:
committed by
Bobby Bruce
parent
7398e1e401
commit
29055a0a6a
@@ -39,7 +39,7 @@
|
||||
|
||||
import collections
|
||||
import copy
|
||||
import distutils.spawn
|
||||
from shutil import which
|
||||
import itertools
|
||||
import os
|
||||
import os.path
|
||||
@@ -269,7 +269,7 @@ def ProtoBuf(source, tags=None, add_tags=None):
|
||||
'''Add a Protocol Buffer to build'''
|
||||
Source(source, tags, add_tags, append={'CXXFLAGS': '-Wno-array-bounds'})
|
||||
|
||||
env['PROTOC_GRPC'] = distutils.spawn.find_executable('grpc_cpp_plugin')
|
||||
env['PROTOC_GRPC'] = which('grpc_cpp_plugin')
|
||||
if env['PROTOC_GRPC']:
|
||||
with Configure(env) as conf:
|
||||
if (not env['HAVE_PKG_CONFIG'] or
|
||||
|
||||
Reference in New Issue
Block a user