diff options
author | Greg Ward <gward@python.net> | 1999-09-13 03:10:25 (GMT) |
---|---|---|
committer | Greg Ward <gward@python.net> | 1999-09-13 03:10:25 (GMT) |
commit | 3b120ab37436a9c0cfb18f3959a2e54051c6b7ef (patch) | |
tree | a9b2d471726f23a7086b5bf537417c08baf7edcf /Lib | |
parent | 138ce653cc8ae53e500c480a9763ee92b9813439 (diff) | |
download | cpython-3b120ab37436a9c0cfb18f3959a2e54051c6b7ef.zip cpython-3b120ab37436a9c0cfb18f3959a2e54051c6b7ef.tar.gz cpython-3b120ab37436a9c0cfb18f3959a2e54051c6b7ef.tar.bz2 |
New command -- install_ext to install extension modules.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/distutils/command/install_ext.py | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/Lib/distutils/command/install_ext.py b/Lib/distutils/command/install_ext.py new file mode 100644 index 0000000..360a802 --- /dev/null +++ b/Lib/distutils/command/install_ext.py @@ -0,0 +1,38 @@ +"""install_ext + +Implement the Distutils "install_ext" command to install extension modules.""" + +# created 1999/09/12, Greg Ward + +__rcsid__ = "$Id$" + +from distutils.core import Command +from distutils.util import copy_tree + +class InstallExt (Command): + + options = [('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.build_dir = None + + def set_final_options (self): + self.set_undefined_options ('install', + ('build_platlib', 'build_dir'), + ('install_site_platlib', '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) + +# class InstallExt |