Merge "Remove dependency to distutils"
This commit is contained in:
commit
68e178a727
2 changed files with 5 additions and 4 deletions
|
@ -18,7 +18,8 @@ import os
|
||||||
import policy
|
import policy
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
import distutils.ccompiler
|
|
||||||
|
SHARED_LIB_EXTENSION = '.dylib' if sys.platform == 'darwin' else '.so'
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
# Tests
|
# Tests
|
||||||
|
@ -158,7 +159,7 @@ if __name__ == '__main__':
|
||||||
(options, args) = parser.parse_args()
|
(options, args) = parser.parse_args()
|
||||||
|
|
||||||
libpath = os.path.join(os.path.dirname(os.path.realpath(__file__)),
|
libpath = os.path.join(os.path.dirname(os.path.realpath(__file__)),
|
||||||
"libsepolwrap" + distutils.ccompiler.new_compiler().shared_lib_extension)
|
"libsepolwrap" + SHARED_LIB_EXTENSION)
|
||||||
if not os.path.exists(libpath):
|
if not os.path.exists(libpath):
|
||||||
sys.exit("Error: libsepolwrap does not exist. Is this binary corrupted?\n")
|
sys.exit("Error: libsepolwrap does not exist. Is this binary corrupted?\n")
|
||||||
|
|
||||||
|
|
|
@ -20,9 +20,9 @@ import policy
|
||||||
from policy import MatchPathPrefix
|
from policy import MatchPathPrefix
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
import distutils.ccompiler
|
|
||||||
|
|
||||||
DEBUG=False
|
DEBUG=False
|
||||||
|
SHARED_LIB_EXTENSION = '.dylib' if sys.platform == 'darwin' else '.so'
|
||||||
|
|
||||||
'''
|
'''
|
||||||
Use file_contexts and policy to verify Treble requirements
|
Use file_contexts and policy to verify Treble requirements
|
||||||
|
@ -375,7 +375,7 @@ if __name__ == '__main__':
|
||||||
parser.usage)
|
parser.usage)
|
||||||
|
|
||||||
libpath = os.path.join(os.path.dirname(os.path.realpath(__file__)),
|
libpath = os.path.join(os.path.dirname(os.path.realpath(__file__)),
|
||||||
"libsepolwrap" + distutils.ccompiler.new_compiler().shared_lib_extension)
|
"libsepolwrap" + SHARED_LIB_EXTENSION)
|
||||||
if not os.path.exists(libpath):
|
if not os.path.exists(libpath):
|
||||||
sys.exit("Error: libsepolwrap does not exist. Is this binary corrupted?\n")
|
sys.exit("Error: libsepolwrap does not exist. Is this binary corrupted?\n")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue