]> granicus.if.org Git - python/commitdiff
Added --compile, --optimize options so users have an easy way to
authorGreg Ward <gward@python.net>
Mon, 2 Oct 2000 02:16:04 +0000 (02:16 +0000)
committerGreg Ward <gward@python.net>
Mon, 2 Oct 2000 02:16:04 +0000 (02:16 +0000)
instruct the "install_lib" command from the command-line.

Lib/distutils/command/install.py

index e9528c635dd560c54516771b6dc93cd1c172f4b1..303ae4c02da90acb8396097595b9e308a147c768 100644 (file)
@@ -90,6 +90,15 @@ class install (Command):
         ('install-data=', None,
          "installation directory for data files"),
 
+        # Byte-compilation options -- see install_lib.py for details, as
+        # these are duplicated from there (but only install_lib does
+        # anything with them).
+        ('compile', 'c', "compile .py to .pyc [default]"),
+        ('no-compile', None, "don't compile .py files"),
+        ('optimize=', 'O',
+         "also compile with optimization: -O1 for \"python -O\", "
+         "-O2 for \"python -OO\", and -O0 to disable [default: -O0]"),
+         
         # Miscellaneous control options
         ('force', 'f',
          "force installation (overwrite any existing files)"),
@@ -135,6 +144,9 @@ class install (Command):
         self.install_scripts = None
         self.install_data = None
 
+        self.compile = None
+        self.optimize = None
+
         # These two are for putting non-packagized distributions into their
         # own directory and creating a .pth file if it makes sense.
         # 'extra_path' comes from the setup file; 'install_path_file' can