]> granicus.if.org Git - python/commitdiff
Renamed many options to be consistent across commands.
authorGreg Ward <gward@python.net>
Wed, 29 Sep 1999 12:38:18 +0000 (12:38 +0000)
committerGreg Ward <gward@python.net>
Wed, 29 Sep 1999 12:38:18 +0000 (12:38 +0000)
Tweaked some help strings to be consistent with documentation.
Don't call 'set_final_options()' in 'run()' anymore -- that's now
  guaranteed to be taken care of for us by the Distribution instance.

Lib/distutils/command/build.py
Lib/distutils/command/install.py
Lib/distutils/command/install_ext.py
Lib/distutils/command/install_lib.py
Lib/distutils/command/install_py.py

index b74e51cfea2766eb5bad2c1d3187822b0d05fc12..1586e60b07145d2c10efd8c5e438db1f74fe658a 100644 (file)
@@ -12,31 +12,32 @@ from distutils.core import Command
 
 class Build (Command):
 
-    options = [('basedir=', 'b', "base directory for build library"),
-               ('libdir=', 'l', "directory for platform-shared files"),
-               ('platdir=', 'p', "directory for platform-specific files"),
+    options = [('build-base=', 'b',
+                "base directory for build library"),
+               ('build-lib=', 'l',
+                "directory for platform-shared files"),
+               ('build-platlib=', 'p',
+                "directory for platform-specific files"),
               ]
 
     def set_default_options (self):
-        self.basedir = 'build'
-        # these are decided only after 'basedir' has its final value
+        self.build_base = 'build'
+        # these are decided only after 'build_base' has its final value
         # (unless overridden by the user or client)
-        self.libdir = None
-        self.platdir = None
+        self.build_lib = None
+        self.build_platlib = None
 
     def set_final_options (self):
-        # 'libdir' and 'platdir' just default to 'lib' and 'plat' under
-        # the base build directory
-        if self.libdir is None:
-            self.libdir = os.path.join (self.basedir, 'lib')
-        if self.platdir is None:
-            self.platdir = os.path.join (self.basedir, 'platlib')
+        # 'build_lib' and 'build_platlib' just default to 'lib' and
+        # 'platlib' under the base build directory
+        if self.build_lib is None:
+            self.build_lib = os.path.join (self.build_base, 'lib')
+        if self.build_platlib is None:
+            self.build_platlib = os.path.join (self.build_base, 'platlib')
 
 
     def run (self):
 
-        self.set_final_options ()
-
         # For now, "build" means "build_py" then "build_ext".  (Eventually
         # it should also build documentation.)
 
index 0e4ad3f0166d2c5f1783eeb6f90acba73db127c2..cd12f6fc5bde6b93d8e7e69b7a144a84f4fafceb 100644 (file)
@@ -16,16 +16,16 @@ from distutils.util import write_file
 class Install (Command):
 
     options = [('prefix=', None, "installation prefix"),
-               ('execprefix=', None,
+               ('exec-prefix=', None,
                 "prefix for platform-specific files"),
 
                # Build directories: where to install from
                ('build-base=', None,
                 "base build directory"),
                ('build-lib=', None,
-                "build directory for non-platform-specific library files"),
+                "build directory for pure Python modules"),
                ('build-platlib=', None,
-                "build directory for platform-specific library files"),
+                "build directory for extension modules"),
 
                # Installation directories: where to put modules and packages
                ('install-lib=', None,
@@ -113,11 +113,11 @@ class Install (Command):
         # to fix things.
 
         # Figure out the build directories, ie. where to install from
-        self.set_peer_option ('build', 'basedir', self.build_base)
+        self.set_peer_option ('build', 'build_base', self.build_base)
         self.set_undefined_options ('build',
-                                    ('basedir', 'build_base'),
-                                    ('libdir', 'build_lib'),
-                                    ('platdir', 'build_platlib'))
+                                    ('build_base', 'build_base'),
+                                    ('build_lib', 'build_lib'),
+                                    ('build_platlib', 'build_platlib'))
 
         # Figure out actual installation directories; the basic principle
         # is: if the user supplied nothing, then use the directories that
@@ -275,8 +275,6 @@ class Install (Command):
 
     def run (self):
 
-        self.set_final_options ()
-
         # Obviously have to build before we can install
         self.run_peer ('build')
 
index 360a8027b75849c75b75aa2dbd1b2bdaaa4be4b7..3fb756c6a111e10bbdf66537d65978fd874d6b8d 100644 (file)
@@ -11,28 +11,27 @@ from distutils.util import copy_tree
 
 class InstallExt (Command):
 
-    options = [('dir=', 'd', "directory to install to"),
+    options = [('install-dir=', 'd', "directory to install to"),
                ('build-dir=','b', "build directory (where to install from)"),
               ]
 
     def set_default_options (self):
         # let the 'install' command dictate our installation directory
-        self.dir = None
+        self.install_dir = None
         self.build_dir = None
 
     def set_final_options (self):
         self.set_undefined_options ('install',
                                     ('build_platlib', 'build_dir'),
-                                    ('install_site_platlib', 'dir'))
+                                    ('install_site_platlib', 'install_dir'))
 
     def run (self):
-        self.set_final_options ()
 
         # Dump the entire "build/platlib" directory (or whatever it really
         # is; "build/platlib" is the default) to the installation target
         # (eg. "/usr/local/lib/python1.5/site-packages").  Note that
         # putting files in the right package dir is already done when we
         # build.
-        outfiles = self.copy_tree (self.build_dir, self.dir)
+        outfiles = self.copy_tree (self.build_dir, self.install_dir)
 
 # class InstallExt
index a2ba16cc35e5ff1650d3ac1af9615337b9f1b8a4..978bb3b958879fb6b1ed9e8b2ba44d989091e569 100644 (file)
@@ -8,7 +8,7 @@ from distutils.util import copy_tree
 
 class InstallPy (Command):
 
-    options = [('dir=', 'd', "directory to install to"),
+    options = [('install-dir=', 'd', "directory to install to"),
                ('build-dir=','b', "build directory (where to install from)"),
                ('compile', 'c', "compile .py to .pyc"),
                ('optimize', 'o', "compile .py to .pyo (optimized)"),
@@ -17,7 +17,7 @@ class InstallPy (Command):
 
     def set_default_options (self):
         # let the 'install' command dictate our installation directory
-        self.dir = None
+        self.install_dir = None
         self.build_dir = None
         self.compile = 1
         self.optimize = 1
@@ -39,18 +39,16 @@ class InstallPy (Command):
         # install (target) directory, and whether to compile .py files.
         self.set_undefined_options ('install',
                                     ('build_lib', 'build_dir'),
-                                    (dir_option, 'dir'),
+                                    (dir_option, 'install_dir'),
                                     ('compile_py', 'compile'),
                                     ('optimize_py', 'optimize'))
 
 
     def run (self):
 
-        self.set_final_options ()
-
         # Dump entire contents of the build directory to the installation
         # directory (that's the beauty of having a build directory!)
-        outfiles = self.copy_tree (self.build_dir, self.dir)
+        outfiles = self.copy_tree (self.build_dir, self.install_dir)
                    
         # (Optionally) compile .py to .pyc
         # XXX hey! we can't control whether we optimize or not; that's up
index a2ba16cc35e5ff1650d3ac1af9615337b9f1b8a4..978bb3b958879fb6b1ed9e8b2ba44d989091e569 100644 (file)
@@ -8,7 +8,7 @@ from distutils.util import copy_tree
 
 class InstallPy (Command):
 
-    options = [('dir=', 'd', "directory to install to"),
+    options = [('install-dir=', 'd', "directory to install to"),
                ('build-dir=','b', "build directory (where to install from)"),
                ('compile', 'c', "compile .py to .pyc"),
                ('optimize', 'o', "compile .py to .pyo (optimized)"),
@@ -17,7 +17,7 @@ class InstallPy (Command):
 
     def set_default_options (self):
         # let the 'install' command dictate our installation directory
-        self.dir = None
+        self.install_dir = None
         self.build_dir = None
         self.compile = 1
         self.optimize = 1
@@ -39,18 +39,16 @@ class InstallPy (Command):
         # install (target) directory, and whether to compile .py files.
         self.set_undefined_options ('install',
                                     ('build_lib', 'build_dir'),
-                                    (dir_option, 'dir'),
+                                    (dir_option, 'install_dir'),
                                     ('compile_py', 'compile'),
                                     ('optimize_py', 'optimize'))
 
 
     def run (self):
 
-        self.set_final_options ()
-
         # Dump entire contents of the build directory to the installation
         # directory (that's the beauty of having a build directory!)
-        outfiles = self.copy_tree (self.build_dir, self.dir)
+        outfiles = self.copy_tree (self.build_dir, self.install_dir)
                    
         # (Optionally) compile .py to .pyc
         # XXX hey! we can't control whether we optimize or not; that's up