Skip to content

Commit

Permalink
Add check to ensure paths aren't added more than once.
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanjm committed Apr 5, 2022
1 parent b0878f6 commit e6c63fc
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions ravenframework/CustomDrivers/DriverUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,15 @@ def setupCpp():
@ Out, None
"""
frameworkDir = findFramework()
from ravenframework.utils import utils
utils.find_crow(frameworkDir)
utils.add_path(os.path.join(frameworkDir,'contrib'))
##TODO REMOVE PP3 WHEN RAY IS AVAILABLE FOR WINDOWS
utils.add_path_recursively(os.path.join(frameworkDir,'contrib','pp'))
ravenDir = os.path.dirname(frameworkDir)
if any(os.path.normcase(sp) == os.path.join(ravenDir, 'crow') for sp in sys.path):
print(f'WARNING: "{os.path.join(ravenDir, "crow")}" already in system path. Skipping CPP setup')
else:
from ravenframework.utils import utils
utils.find_crow(frameworkDir)
utils.add_path(os.path.join(frameworkDir,'contrib'))
##TODO REMOVE PP3 WHEN RAY IS AVAILABLE FOR WINDOWS
utils.add_path_recursively(os.path.join(frameworkDir,'contrib','pp'))

def checkVersions():
"""
Expand Down

0 comments on commit e6c63fc

Please sign in to comment.