Home | Trees | Indices | Help |
---|
|
1 ######################################################################## 2 # 3 # File: setup.py 4 # Author: Stefan Seefeld 5 # Date: 2005-11-16 6 # 7 # Contents: 8 # Distribution class adding 'install_extensions' command. 9 # 10 # Copyright (c) 2005 by CodeSourcery, LLC. All rights reserved. 11 # 12 # For license terms see the file COPYING. 13 # 14 ######################################################################## 15 16 ######################################################################## 17 # Imports 18 ######################################################################## 19 20 from distutils import dist 21 from qm.dist.command.build_extensions import build_extensions 22 from qm.dist.command.install_extensions import install_extensions 2325 264428 29 # Set up the Distribution class to make it aware of the additional 30 # commands. First we need to add an attribute so setup() can pass 31 # a 'qmtest_extensions' parameter. 32 self.qmtest_extensions = None 33 dist.Distribution.__init__(self, attrs) 34 # Now add our own commands to the list. 35 self.cmdclass['build_extensions'] = build_extensions 36 self.cmdclass['install_extensions'] = install_extensions 37 38 # Register the command as a sub-command of 'install' 39 def has_extensions(cmd): return self.qmtest_extensions 40 build = self.get_command_class('build') 41 build.sub_commands.append(('build_extensions', has_extensions)) 42 install = self.get_command_class('install') 43 install.sub_commands.append(('install_extensions', has_extensions))
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Fri Dec 23 12:30:47 2011 | http://epydoc.sourceforge.net |