The 0.5 release happened on 2/15, not on 2/14. :-)
[python/dscho.git] / Lib / distutils / command / install_ext.py
blob599a37e1cecf3a5fcbde569f7854c9ef3f23dc2a
1 """install_ext
3 Implement the Distutils "install_ext" command to install extension modules."""
5 # created 1999/09/12, Greg Ward
7 __rcsid__ = "$Id$"
9 from distutils.core import Command
10 from distutils.util import copy_tree
12 class InstallExt (Command):
14 description = "install C/C++ extension modules"
16 options = [('install-dir=', 'd', "directory to install to"),
17 ('build-dir=','b', "build directory (where to install from)"),
20 def set_default_options (self):
21 # let the 'install' command dictate our installation directory
22 self.install_dir = None
23 self.build_dir = None
25 def set_final_options (self):
26 self.set_undefined_options ('install',
27 ('build_platlib', 'build_dir'),
28 ('install_site_platlib', 'install_dir'))
30 def run (self):
32 # Make sure we have built all extension modules first
33 self.run_peer ('build_ext')
35 # Dump the entire "build/platlib" directory (or whatever it really
36 # is; "build/platlib" is the default) to the installation target
37 # (eg. "/usr/local/lib/python1.5/site-packages"). Note that
38 # putting files in the right package dir is already done when we
39 # build.
40 outfiles = self.copy_tree (self.build_dir, self.install_dir)
42 # class InstallExt