Home | Trees | Indices | Help |
---|
|
1 ######################################################################## 2 # 3 # File: build_extensions.py 4 # Author: Stefan Seefeld 5 # Date: 2005-11-16 6 # 7 # Contents: 8 # Command to build qmtest extensions. 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 import qm.xmlutil 21 from distutils.command.build_py import build_py 22 from distutils.util import get_platform 23 import os, sys, dircache 24 25 ######################################################################## 26 # Classes 27 ######################################################################## 2830 """build extension files.""" 31 32 description = "build qmtest extension classes." 336735 36 b = self.distribution.get_command_obj('build') 37 b.ensure_finalized() 38 base = b.build_base 39 40 build_py.finalize_options(self) 41 42 self.build_dir = os.path.join(base, 'ext') 43 if self.distribution.ext_modules: 44 plat_specifier = ".%s-%s" % (get_platform(), sys.version[0:3]) 45 self.build_dir += plat_specifier 46 47 48 self.extensions = self.distribution.qmtest_extensions49 5052 """Return all files containing extension classes.""" 53 54 files = [os.path.join(self.extensions, f) 55 for f in dircache.listdir(self.extensions) 56 if f.endswith('.py') or f == 'classes.qmc'] 57 return files58 5961 62 self.mkpath(self.build_dir) 63 for f in self.get_input(): 64 basename = os.path.basename(f) 65 self.copy_file(f, os.path.join(self.build_dir, basename), 66 preserve_mode=0)
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Fri Dec 23 12:30:45 2011 | http://epydoc.sourceforge.net |