source: coopr.opt/trunk/coopr/opt/__init__.py @ 2700

Last change on this file since 2700 was 2700, checked in by prsteel, 10 years ago

Temporary fix.

Pyomo fails if the CooprMIPTestDriver plugin is loaded; we prevent it from loading.

File size: 1.1 KB
Line 
1#  _________________________________________________________________________
2#
3#  Coopr: A COmmon Optimization Python Repository
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 Coopr README.txt file.
9#  _________________________________________________________________________
10
11import pyutilib.component.core
12
13pyutilib.component.core.PluginGlobals.push_env( 'coopr.opt' )
14
15from base import *
16from results import *
17import solver
18import reader
19import testing
20from parallel import *
21
22pyutilib.component.core.PluginGlobals.pop_env()
23
24
25try:
26    import pkg_resources
27    #
28    # Load modules associated with Plugins that are defined in
29    # EGG files.
30    #
31    for entrypoint in pkg_resources.iter_entry_points('coopr.opt'):
32        if str(entrypoint) != "testdriver.coopr.mip = coopr.plugins.testdriver.mip.CooprMIPTestDriver":
33            plugin_class = entrypoint.load()
34except:
35    pass
36
Note: See TracBrowser for help on using the repository browser.