-
Notifications
You must be signed in to change notification settings - Fork 536
/
Copy pathget_pyomo_extras.py
38 lines (34 loc) · 1.15 KB
/
get_pyomo_extras.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# ___________________________________________________________________________
#
# Pyomo: Python Optimization Modeling Objects
# Copyright (c) 2008-2025
# National Technology and Engineering Solutions of Sandia, LLC
# Under the terms of Contract DE-NA0003525 with National Technology and
# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
# rights in this software.
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
#
# A script to optionally install packages that Pyomo could leverage.
#
import inspect
import os
import sys
from os.path import dirname, abspath
#
# THIS SCRIPT IS DEPRECATED. Please use "pyomo install-extras"
#
if __name__ == '__main__':
try:
callerFrame = inspect.stack()[0]
_dir = os.path.join(
dirname(dirname(abspath(inspect.getfile(callerFrame[0])))),
'pyomo',
'scripting',
'plugins',
)
sys.path.insert(0, _dir)
extras = __import__('extras')
extras.install_extras()
except:
print("Error running get-pyomo-extras.py")