source: pyomo/trunk/pyomo/version/__init__.py @ 9475

Last change on this file since 9475 was 9475, checked in by wehart, 4 years ago

Updating the version #.

Renaming transformations to 'base.*' if they didn't have a specific
naming. NOTE: these are in the pyomo.core package ... which seems
odd. But we agreed that 'core' provides a connotation that we don't
intend.

Adding some documentation changes for 'pyomo help -t'.

  • Property svn:keywords set to URL
File size: 1.8 KB
Line 
1#  _________________________________________________________________________
2#
3#  Pyomo: Python Optimization Modeling Objects
4#  Copyright (c) 2008 Sandia Corporation.
5#  This software is distributed under the BSD License.
6#  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
7#  the U.S. Government retains certain rights in this software.
8#  For more information, see the Pyomo README.txt file.
9#  _________________________________________________________________________
10
11"""Pyomo: Python Optimization Modeling Objects
12
13Pyomo provides Python packages for formulating and solving complex
14optimization applications.  Most of Pyomo's packages rely on externally
15built optimization solvers.
16
17The pyomo.pyomo package provides a mechanism for managing stuff
18that is related to releases of the entire Pyomo software.
19"""
20
21_init_url="$URL: pyomo/trunk/pyomo/version/__init__.py $"
22
23# The micro number should be set when tagging a release or generating a
24# VOTD build
25_major=4
26_minor=0
27_micro=0
28_releaselevel='invalid'
29_serial=0
30
31if '/trunk/' in _init_url:
32    # __file__ fails if script is called in different ways on Windows
33    # __file__ fails if someone does os.chdir() before
34    # sys.argv[0] also fails because it doesn't not always contains the path
35    from os.path import abspath, dirname, exists, join
36    from inspect import getfile, currentframe
37    if exists(join( dirname( abspath( getfile( currentframe() ) ) ), 
38                    '..', '..', '.svn' )):
39        _releaselevel = 'trunk'
40    else:
41        _releaselevel = 'VOTD'
42elif '/tags/' in _init_url:
43    _releaselevel = 'final'
44
45version_info = (_major, _minor, _micro, _releaselevel, _serial)
46
47if _micro:
48    version = '.'.join(str(x) for x in version_info[:3])
49else:
50    version = '.'.join(str(x) for x in version_info[:2])
51if _releaselevel != 'final':
52    version += ' ('+_releaselevel+')'
Note: See TracBrowser for help on using the repository browser.