Changeset 9677


Ignore:
Timestamp:
Feb 17, 2015, 4:52:27 PM (10 years ago)
Author:
steve
Message:

small cleanup of get_revision code

Location:
trunk/anuga_core
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/.gitignore

    r9668 r9677  
    1717*.tmp
    1818*.vim
     19*.sww
    1920tags
    2021
  • trunk/anuga_core/.travis.yml

    r9668 r9677  
    44env:
    55  matrix:
    6     - PYTHON_VERSION="2.7"
    7     - PYTHON_VERSION="2.6"
     6    - PYTHON_VERSION="2.7"  PARALLEL="mpich2"
     7    - PYTHON_VERSION="2.7"  PARALLEL="false"
     8    - PYTHON_VERSION="2.6"  PARALLEL="false"
    89install:
    910  - sudo apt-get update
    1011  - sudo apt-get install gfortran
     12
     13  - if [[ "$PARALLEL" == "mpich2" ]]; then
     14       sudo apt-get install mpich2;
     15       mpirun -np 4 pwd;
     16    fi
    1117
    1218  # Deactivate the travis-provided virtual environment and setup a
     
    2127  # Useful for debugging any issues with conda
    2228  - conda info -a
    23   # More debugging
    24   - printenv
    2529
    2630  # Conda dependencies
     
    2933
    3034  - python --version
    31   # Get GDAL from the PinguCarsti binstar channel.
    32   # On Windows Get GDAL from jjhelmus binstar channel
    33   - conda install -c pingucarsti gdal geos gdal-data
    34  
    35   - export GDAL_DATA=`gdal-config --datadir`
     35
     36  # Get GDAL from the PinguCarsti binstar channel for python 2.7
     37  # On osx get GDAL from jjhelmus binstar channel
     38  - if [[ "$PYTHON_VERSION" == "2.7" ]]; then
     39       conda install -c pingucarsti gdal-data;
     40       export GDAL_DATA=`gdal-config --datadir`;
     41    fi
     42
     43  - if [[ "$PYTHON_VERSION" == "2.6" ]]; then conda install gdal; fi
    3644
    3745  # Install more software to deal with geographical projections
     
    4149  - if [[ "$PYTHON_VERSION" == "2.6" ]]; then conda install argparse; fi
    4250
     51
     52  # Install pypar if parallel
     53  - if [[ "$PARALLEL" == "mpich2" ]]; then
     54       svn checkout http://pypar.googlecode.com/svn/ pypar;
     55       cd pypar/source;
     56       python setup.py install;
     57       cd ../..;
     58    fi
     59
     60  # More debugging
     61  - printenv
     62  - conda list
     63
    4364  - python setup.py install
    4465
  • trunk/anuga_core/LICENCE.txt

    r9641 r9677  
    44
    55
    6 Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010 Australian National University and Geoscience Australia. All rights reserved.
     6Copyright 2004 - 2015 Australian National University
     7and Geoscience Australia. All rights reserved.
    78
    89
  • trunk/anuga_core/anuga/file_conversion/setup.py

    r9569 r9677  
    1414
    1515    config.add_data_dir('tests')
    16     config.add_data_dir(join('tests','data'))
    1716
    1817    util_dir = os.path.abspath(join(os.path.dirname(__file__),'..','utilities'))
  • trunk/anuga_core/anuga/parallel/tests/test_parallel_boyd_box_operator.py

    r9638 r9677  
    333333        if myid == 0:
    334334            if verbose: print 'PARALLEL START'
     335            random.seed(1001)
    335336            for i in range(samples):
    336337                x = random.randrange(0,1000)/1000.0 * length
  • trunk/anuga_core/anuga/utilities/system_tools.py

    r9254 r9677  
    194194   
    195195def get_revision_number():
    196     """Get the version number of this repository copy.
    197 
    198     Try getting data from stored_version_info.py first, otherwise
    199     try using SubWCRev.exe (Windows) or svnversion (linux), otherwise
    200     try reading file .svn/entries for version information, otherwise
    201     throw an exception.
    202 
    203     NOTE: This requires that the command svn is on the system PATH
    204     (simply aliasing svn to the binary will not work)
    205     """
    206 
    207     # try to get revision information from stored_version_info.py
    208     try:
    209         return __get_revision_from_svn_client__()
    210     except:
    211         try:
    212             from anuga.stored_version_info import version_info
    213             return process_version_info(version_info)
    214         except:
    215             from anuga.version import version
    216             return version
     196    """Get the (svn) revision number of this repository copy.
     197    """
     198
     199    from anuga import __svn_revision__ as revision
     200    return revision
     201           
    217202
    218203def process_version_info(version_info):
Note: See TracChangeset for help on using the changeset viewer.