diff options
author | Greg Ward <gward@python.net> | 2000-02-26 00:49:04 (GMT) |
---|---|---|
committer | Greg Ward <gward@python.net> | 2000-02-26 00:49:04 (GMT) |
commit | 4f08e4facbb44b64fb1388baaa9a00c9690f8c5b (patch) | |
tree | 61069a510784149b772e693337c2594b3defaeb7 /Lib/distutils/command/install_lib.py | |
parent | b6f6e95ed25f1aa9d8220b96bdf8445b695df7f2 (diff) | |
download | cpython-4f08e4facbb44b64fb1388baaa9a00c9690f8c5b.zip cpython-4f08e4facbb44b64fb1388baaa9a00c9690f8c5b.tar.gz cpython-4f08e4facbb44b64fb1388baaa9a00c9690f8c5b.tar.bz2 |
Unfinished, untested implementation of the lovely baroque installation scheme
cooked up by Fred Drake and me. Only saved for posterity (whoever posterity
is), as it is about to be ditched in favour of GvR's much simpler design.
Diffstat (limited to 'Lib/distutils/command/install_lib.py')
-rw-r--r-- | Lib/distutils/command/install_lib.py | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/Lib/distutils/command/install_lib.py b/Lib/distutils/command/install_lib.py index 919873c..ab82e04 100644 --- a/Lib/distutils/command/install_lib.py +++ b/Lib/distutils/command/install_lib.py @@ -27,22 +27,12 @@ class install_py (Command): def finalize_options (self): - # Find out from the 'build_ext' command if we were asked to build - # any extensions. If so, that means even pure-Python modules in - # this distribution have to be installed to the "platlib" - # directory. - extensions = self.get_peer_option ('build_ext', 'extensions') - if extensions: - dir_option = 'install_site_platlib' - else: - dir_option = 'install_site_lib' - # Get all the information we need to install pure Python modules # from the umbrella 'install' command -- build (source) directory, # install (target) directory, and whether to compile .py files. self.set_undefined_options ('install', ('build_lib', 'build_dir'), - (dir_option, 'install_dir'), + ('install_lib', 'install_dir'), ('compile_py', 'compile'), ('optimize_py', 'optimize')) @@ -52,8 +42,9 @@ class install_py (Command): # Make sure we have "built" all pure Python modules first self.run_peer ('build_py') - # Dump entire contents of the build directory to the installation - # directory (that's the beauty of having a build directory!) + # Install everything: simply dump the 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.install_dir) # (Optionally) compile .py to .pyc @@ -65,7 +56,8 @@ class install_py (Command): from py_compile import compile for f in outfiles: - # XXX can't assume this filename mapping! + # XXX can't assume this filename mapping! (what if + # we're running under "python -O"?) # only compile the file if it is actually a .py file if f[-3:] == '.py': |