Skip to content

Commit

Permalink
Merge pull request #48 from idaholab/wangc/fix_build
Browse files Browse the repository at this point in the history
update path for pysp and update libraries in build.sh
  • Loading branch information
mandd authored Oct 20, 2022
2 parents 5c63d3d + 204d692 commit ce217d2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ function install_libraries()
if [[ $ECE_VERBOSE == 0 ]]; then echo ... Installing libraries from conda-forge ...; fi
if [[ "$OSOPTION" = "--windows" ]];
then
local COMMAND=`echo conda install -c conda-forge pyomo ipopt glpk`
local COMMAND=`echo conda install -c conda-forge pyomo ipopt glpk pyutilib numpy-financial`
else
local COMMAND=`echo conda install -c conda-forge pyomo ipopt coincbc glpk`
local COMMAND=`echo conda install -c conda-forge pyomo ipopt coincbc glpk pyutilib numpy-financial`
fi
if [[ $ECE_VERBOSE == 0 ]]; then echo ... conda-forge command: ${COMMAND}; fi
${COMMAND}
Expand All @@ -79,9 +79,9 @@ function create_libraries()
if [[ $ECE_VERBOSE == 0 ]]; then echo ... Installing libraries from conda-forge ...; fi
if [[ "$OSOPTION" = "--windows" ]];
then
local COMMAND=`echo conda install -n ${LOGOS_LIBS_NAME} -c conda-forge pyomo ipopt glpk`
local COMMAND=`echo conda install -n ${LOGOS_LIBS_NAME} -c conda-forge pyomo ipopt glpk pyutilib numpy-financial`
else
local COMMAND=`echo conda install -n ${LOGOS_LIBS_NAME} -c conda-forge pyomo ipopt coincbc glpk`
local COMMAND=`echo conda install -n ${LOGOS_LIBS_NAME} -c conda-forge pyomo ipopt coincbc glpk pyutilib numpy-financial`
fi
if [[ $ECE_VERBOSE == 0 ]]; then echo ... conda-forge command: ${COMMAND}; fi
${COMMAND}
Expand Down
10 changes: 5 additions & 5 deletions src/logos_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@

#Internal Modules------------------------------------------------------------------------------------
# Add contrib to the sys path
from _utils import getPluginLoc
pluginLoc = getPluginLoc(plugin='LOGOS')
if any(os.path.normcase(sp) == os.path.join(pluginLoc, 'src', 'contrib') for sp in sys.path):
print(f'WARNING: "{os.path.join(pluginLoc, "src", "contrib")}" already in system path. Skipping setup')
pyspLoc = os.path.abspath(os.path.join(os.path.dirname(__file__), 'contrib'))
if any(os.path.normcase(sp) == pyspLoc for sp in sys.path):
print(f'WARNING: "{pyspLoc}" already in system path. Skipping setup')
else:
sys.path.append(os.path.join(pluginLoc, 'src', 'contrib'))
sys.path.append(pyspLoc)

#import PyomoModels
from CapitalInvestments import PyomoModels
from CapitalInvestments.investment_utils import inputReader
Expand Down

0 comments on commit ce217d2

Please sign in to comment.