Changeset 261

Show
Ignore:
Timestamp:
Sun Aug 27 15:43:30 2006
Author:
asmathers
Message:

- tweaks for win32 compatability

Files:

Legend:

Unmodified
Added
Removed
Modified
  • trunk/scripts/xix-coverage.py

    r257 r261  
    13 13 from shutil import copy2, copytree, rmtree  
    14 14 from glob import glob  
    15   from commands import getoutput  
      15 #from commands import getoutput  
      16 from xix.utils.phole import getoutput, resource_filename  
    16 17 from StringIO import StringIO  
    17 18  
     
    68 69         args.extend(glob(pj(root, '*.py')))  
    69 70     fd =  open('.report', 'w')  
    70       output = getoutput('python coverage.py -a -r -m %s' % ' '.join(args))  
      71     cmd = 'python coverage.py -a -r -m %s' % ' '.join(args)  
      72     output = getoutput(cmd)  
    71 73     fd.write(output)  
    72 74     fd.close()  
     
    156 158     for asset in options.html_assets:  
    157 159         copy2(asset, reportdir)  
      160     if not options.html_assets: # make it perty by default  
      161         fn = resource_filename('xix', pj('data', 'coverage.css'))  
      162         copy2(fn, reportdir)  
    158 163     print 'Report complete. See ' + pj(reportdir, 'index.html')  
    159 164      
  • trunk/setup.py

    r257 r261  
    5 5     from setuptools import setup  
    6 6 except:  
    7       try:  
    8           import ez_setup  
    9           ez_setup.use_setuptools()  
    10           from setuptools import setup  
    11       except: # so everybody's happy  
    12           from distutils.core import setup  
      7     from distutils.core import setup  
    13 8  
    14 9 setup(  
     
    21 16     packages=['xix', 'xix.utils', 'xix.utils.comp', 'xix.utils.tools'],  
    22 17     package_dir={'xix': 'xix'},  
    23       package_data={'xix': ['*.cfg']},  
      18     package_data={'xix': ['*.cfg', 'data/*.css', 'data/*.xsl']},  
    23 18     )  
  • trunk/xix/utils/phole.py

    r260 r261  
    1 1  
      2 # Adataptor for folks who are too lazy to install setuptools  
    2 3 try:  
    3 4     from pkg_resources import resource_filename  
     
    9 10         return fname  
    10 11      
      12 # win32 adaptor for getoutput from commands module  
      13  
      14 from commands import getoutput  
      15 import os  
      16 if os.sys.platform in ('win32', 'nt'):  
      17     def getoutput(cmd):  
      18         output = os.popen2(cmd)[1]  
      19         return output.read()  
      20