summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command/install_lib.py
diff options
context:
space:
mode:
authorGreg Ward <gward@python.net>2000-09-30 20:39:09 (GMT)
committerGreg Ward <gward@python.net>2000-09-30 20:39:09 (GMT)
commit1df6e7b1fc1b63fdb4b9320222205f145d149880 (patch)
tree588835ee182b3d107f962a0240c79fa1deddf0ab /Lib/distutils/command/install_lib.py
parent1297b5ce67642dba35615121825fb1621e28e6b8 (diff)
downloadcpython-1df6e7b1fc1b63fdb4b9320222205f145d149880.zip
cpython-1df6e7b1fc1b63fdb4b9320222205f145d149880.tar.gz
cpython-1df6e7b1fc1b63fdb4b9320222205f145d149880.tar.bz2
Reduced the 'bytecompile()' method to a one-line wrapper around
'util.byte_compile()'. Currently just reproduces the existing functionality -- doesn't use any of the fancy features in the new 'byte_compile()'.
Diffstat (limited to 'Lib/distutils/command/install_lib.py')
-rw-r--r--Lib/distutils/command/install_lib.py19
1 files changed, 4 insertions, 15 deletions
diff --git a/Lib/distutils/command/install_lib.py b/Lib/distutils/command/install_lib.py
index 2c92f3f..6ad0a54 100644
--- a/Lib/distutils/command/install_lib.py
+++ b/Lib/distutils/command/install_lib.py
@@ -5,6 +5,7 @@ __revision__ = "$Id$"
import sys, os, string
from distutils.core import Command
from distutils.dir_util import copy_tree
+from distutils.util import byte_compile
class install_lib (Command):
@@ -82,21 +83,9 @@ class install_lib (Command):
return outfiles
def bytecompile (self, files):
- # XXX hey! we can't control whether we optimize or not; that's up
- # to the invocation of the current Python interpreter (at least
- # according to the py_compile docs). That sucks.
- if self.compile:
- from py_compile import compile
-
- for f in files:
- # only compile the file if it is actually a .py file
- if f[-3:] == '.py':
- out_fn = f + (__debug__ and "c" or "o")
- compile_msg = "byte-compiling %s to %s" % \
- (f, os.path.basename(out_fn))
- skip_msg = "skipping byte-compilation of %s" % f
- self.make_file(f, out_fn, compile, (f,),
- compile_msg, skip_msg)
+ byte_compile(files,
+ force=self.force,
+ verbose=self.verbose, dry_run=self.dry_run)
# -- Utility methods -----------------------------------------------