Changeset 9590


Ignore:
Timestamp:
Feb 2, 2015, 8:28:56 PM (10 years ago)
Author:
steve
Message:

Small errorin test which writes to test directory (and so causes error when run
from site-packages)

Location:
trunk/anuga_core
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/anuga/__init__.py

    r9588 r9590  
    2727
    2828from .version import git_revision as __git_revision__
     29from .version import svn_revision as __svn_revision__
    2930from .version import version as __version__
    3031
    3132
    32 
    33 
    34 # We first need to detect if we're being called as part of the numpy setup
     33# We first need to detect if we're being called as part of the anuga setup
    3534# procedure itself in a reliable manner.
    3635try:
  • trunk/anuga_core/anuga/file_conversion/sts2sww_mesh.py

    r9551 r9590  
    5151
    5252    number_of_points = nrows*ncols
    53     points_utm = num.empty((number_of_points,2),float)
     53    points_utm = num.zeros((number_of_points,2),num.float)
    5454    points_utm[:,0]=x+x_origin
    5555    points_utm[:,1]=y+y_origin
  • trunk/anuga_core/anuga/shallow_water/tests/test_shallow_water_domain.py

    r9566 r9590  
    71027102
    71037103       
    7104         # Get path where this test is run
     7104        # Get path where thie data file are
    71057105        path = get_pathname_from_package('anuga.shallow_water')       
    71067106       
     
    71517151            interior_regions.append( [polygon, 100] )
    71527152
    7153         meshname = 'offending_mesh.msh'
     7153        meshname = 'offending_mesh_1.msh'
    71547154        create_mesh_from_regions(bounding_polygon,
    71557155                                 boundary_tags={'south': [0], 'east': [1],
     
    71677167        #----------------------------------------------------------------------
    71687168
    7169         points_file = os.path.join(path, 'offending_point.pts')
     7169        points_file = 'offending_point_1.pts'
    71707170
    71717171        # Offending point
     
    72177217        path = get_pathname_from_package('anuga.shallow_water')       
    72187218
    7219         meshname = 'test_mesh.msh'
     7219        meshname = 'test_mesh_2.msh'
    72207220       
    72217221        W = 304180
  • trunk/anuga_core/setup.py

    r9589 r9590  
    6363
    6464    return filter(str.isdigit, "$Revision$")
    65 
    66 
    6765
    6866
     
    173171    return config
    174172
    175 def check_submodules():
    176     """ verify that the submodules are checked out and clean
    177         use `git submodule update --init`; on failure
    178     """
    179     if not os.path.exists('.git'):
    180         return
    181     with open('.gitmodules') as f:
    182         for l in f:
    183             if 'path' in l:
    184                 p = l.split('=')[-1].strip()
    185                 if not os.path.exists(p):
    186                     raise ValueError('Submodule %s missing' % p)
    187 
    188 
    189     proc = subprocess.Popen(['git', 'submodule', 'status'],
    190                             stdout=subprocess.PIPE)
    191     status, _ = proc.communicate()
    192     status = status.decode("ascii", "replace")
    193     for line in status.splitlines():
    194         if line.startswith('-') or line.startswith('+'):
    195             raise ValueError('Submodule not clean: %s' % line)
    196 
    197 from distutils.command.sdist import sdist
    198 
    199 class sdist_checked(sdist):
    200     """ check submodules on sdist to prevent incomplete tarballs """
    201     def run(self):
    202         check_submodules()
    203         sdist.run(self)
    204 
    205 def generate_cython():
    206     cwd = os.path.abspath(os.path.dirname(__file__))
    207     print("Cythonizing sources")
    208     p = subprocess.call([sys.executable,
    209                           os.path.join(cwd, 'tools', 'cythonize.py'),
    210                           'numpy/random'],
    211                          cwd=cwd)
    212     if p != 0:
    213         raise RuntimeError("Running cythonize failed!")
    214 
    215 from distutils.core import Command
    216 
    217 class PyTest(Command):
    218     user_options = []
    219     def initialize_options(self):
    220         pass
    221 
    222     def finalize_options(self):
    223         pass
    224 
    225     def run(self):
    226         import sys,subprocess
    227         errno = subprocess.call([sys.executable, 'runtests.py'])
    228         raise SystemExit(errno)
     173
    229174
    230175   
     
    249194        license = 'GPL',
    250195        classifiers=[_f for _f in CLASSIFIERS.split('\n') if _f],
    251         platforms = ["Windows", "Linux", "Mac OS-X", "Unix"],
    252         cmdclass={"sdist": sdist_checked, "test": PyTest},
     196        platforms = ["Windows", "Linux", "Mac OS-X", "Unix"]
    253197    )
    254198
Note: See TracChangeset for help on using the changeset viewer.