summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Ward <gward@python.net>1999-09-29 12:38:18 (GMT)
committerGreg Ward <gward@python.net>1999-09-29 12:38:18 (GMT)
commite6ac2fcc125621d4dea4240b3b1e9572d8c8e0ab (patch)
treebbed10dc95483f1af9a84877fe1421dde33b3cef
parentdf178f97de0a03b40ee1cb0772d1546bf466dd26 (diff)
downloadcpython-e6ac2fcc125621d4dea4240b3b1e9572d8c8e0ab.zip
cpython-e6ac2fcc125621d4dea4240b3b1e9572d8c8e0ab.tar.gz
cpython-e6ac2fcc125621d4dea4240b3b1e9572d8c8e0ab.tar.bz2
Renamed many options to be consistent across commands.
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.
-rw-r--r--Lib/distutils/command/build.py31
-rw-r--r--Lib/distutils/command/install.py16
-rw-r--r--Lib/distutils/command/install_ext.py9
-rw-r--r--Lib/distutils/command/install_lib.py10
-rw-r--r--Lib/distutils/command/install_py.py10
5 files changed, 35 insertions, 41 deletions
diff --git a/Lib/distutils/command/build.py b/Lib/distutils/command/build.py
index b74e51c..1586e60 100644
--- a/Lib/distutils/command/build.py
+++ b/Lib/distutils/command/build.py
@@ -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.)
diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
index 0e4ad3f..cd12f6f 100644
--- a/Lib/distutils/command/install.py
+++ b/Lib/distutils/command/install.py
@@ -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')
diff --git a/Lib/distutils/command/install_ext.py b/Lib/distutils/command/install_ext.py
index 360a802..3fb756c 100644
--- a/Lib/distutils/command/install_ext.py
+++ b/Lib/distutils/command/install_ext.py
@@ -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
diff --git a/Lib/distutils/command/install_lib.py b/Lib/distutils/command/install_lib.py
index a2ba16c..978bb3b 100644
--- a/Lib/distutils/command/install_lib.py
+++ b/Lib/distutils/command/install_lib.py
@@ -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
diff --git a/Lib/distutils/command/install_py.py b/Lib/distutils/command/install_py.py
index a2ba16c..978bb3b 100644
--- a/Lib/distutils/command/install_py.py
+++ b/Lib/distutils/command/install_py.py
@@ -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