fixed warning and error message
This commit is contained in:
parent
468f700af7
commit
1733c9362b
|
@ -374,7 +374,7 @@ class build_py(Command):
|
||||||
|
|
||||||
def byte_compile(self, files):
|
def byte_compile(self, files):
|
||||||
if sys.dont_write_bytecode:
|
if sys.dont_write_bytecode:
|
||||||
self.warn('byte-compile not supported on this platform, skipping.')
|
self.warn('byte-compiling is disabled, skipping.')
|
||||||
return
|
return
|
||||||
|
|
||||||
from distutils.util import byte_compile
|
from distutils.util import byte_compile
|
||||||
|
|
|
@ -121,7 +121,7 @@ class install_lib(Command):
|
||||||
|
|
||||||
def byte_compile(self, files):
|
def byte_compile(self, files):
|
||||||
if sys.dont_write_bytecode:
|
if sys.dont_write_bytecode:
|
||||||
self.warn('byte-compile not supported on this platform, skipping.')
|
self.warn('byte-compiling is disabled, skipping.')
|
||||||
return
|
return
|
||||||
|
|
||||||
from distutils.util import byte_compile
|
from distutils.util import byte_compile
|
||||||
|
|
|
@ -103,7 +103,7 @@ class BuildPyTestCase(support.TempdirManager,
|
||||||
finally:
|
finally:
|
||||||
sys.dont_write_bytecode = old_dont_write_bytecode
|
sys.dont_write_bytecode = old_dont_write_bytecode
|
||||||
|
|
||||||
self.assertTrue('byte-compile not supported ' in self.logs[0][1])
|
self.assertTrue('byte-compiling is disabled' in self.logs[0][1])
|
||||||
|
|
||||||
def test_suite():
|
def test_suite():
|
||||||
return unittest.makeSuite(BuildPyTestCase)
|
return unittest.makeSuite(BuildPyTestCase)
|
||||||
|
|
|
@ -92,7 +92,7 @@ class InstallLibTestCase(support.TempdirManager,
|
||||||
finally:
|
finally:
|
||||||
sys.dont_write_bytecode = old_dont_write_bytecode
|
sys.dont_write_bytecode = old_dont_write_bytecode
|
||||||
|
|
||||||
self.assertTrue('byte-compile not supported ' in self.logs[0][1])
|
self.assertTrue('byte-compiling is disabled' in self.logs[0][1])
|
||||||
|
|
||||||
def test_suite():
|
def test_suite():
|
||||||
return unittest.makeSuite(InstallLibTestCase)
|
return unittest.makeSuite(InstallLibTestCase)
|
||||||
|
|
|
@ -448,7 +448,7 @@ def byte_compile(py_files, optimize=0, force=0, prefix=None, base_dir=None,
|
||||||
"""
|
"""
|
||||||
# nothing is done if sys.dont_write_bytecode is True
|
# nothing is done if sys.dont_write_bytecode is True
|
||||||
if sys.dont_write_bytecode:
|
if sys.dont_write_bytecode:
|
||||||
raise DistutilsByteCompileError('byte-compiling not supported.')
|
raise DistutilsByteCompileError('byte-compiling is disabled.')
|
||||||
|
|
||||||
# First, if the caller didn't force us into direct or indirect mode,
|
# First, if the caller didn't force us into direct or indirect mode,
|
||||||
# figure out which mode we should be in. We take a conservative
|
# figure out which mode we should be in. We take a conservative
|
||||||
|
|
Loading…
Reference in New Issue