mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Issue #7071: byte-compilation in Distutils now looks at sys.dont_write_bytecode
This commit is contained in:
parent
da8652d920
commit
b9c1cfc428
8 changed files with 67 additions and 5 deletions
|
@ -6,6 +6,8 @@ Implements the Distutils 'install_lib' command
|
|||
__revision__ = "$Id$"
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
from distutils.core import Command
|
||||
from distutils.errors import DistutilsOptionError
|
||||
|
||||
|
@ -118,6 +120,10 @@ class install_lib(Command):
|
|||
return outfiles
|
||||
|
||||
def byte_compile(self, files):
|
||||
if sys.dont_write_bytecode:
|
||||
self.warn('byte-compile not supported on this platform, skipping.')
|
||||
return
|
||||
|
||||
from distutils.util import byte_compile
|
||||
|
||||
# Get the "--root" directory supplied to the "install" command,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue