-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use standard locations if the LD_LIBRARY_PATH or ROOTSYS are empty #1378
base: master
Are you sure you want to change the base?
Conversation
Happy New Year to all! @andresailer |
Hi @andriish , The puthon formatting check unfortunately failed:
Please fix. |
@andriish |
Test Results 14 files 14 suites 5h 34m 31s ⏱️ For more details on these failures, see this check. Results for commit 875c1fe. ♻️ This comment has been updated with latest results. |
DDCore/python/dd4hep_base.py
Outdated
dd4hep = os.environ['DD4hepINSTALL'] | ||
else: | ||
dd4hep = "/usr" | ||
if os.getenv("ROOTSYS") is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getenv has an optional default https://docs.python.org/3/library/os.html#os.getenv
DDCore/python/dd4hep_base.py
Outdated
dd4hep = os.environ['DD4hepINSTALL'] | ||
inc = ' -I' + os.environ['ROOTSYS'] + '/include -I' + dd4hep + '/include ' | ||
lib = ' -L' + dd4hep + '/lib -lDDCore -lDDG4 -lDDSegmentation ' | ||
if os.getenv("DD4hepINSTALL") is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getenv has an optional default https://docs.python.org/3/library/os.html#os.getenv
DDCore/python/dd4hep_base.py
Outdated
rootsys = os.environ['ROOTSYS'] | ||
else: | ||
rootsys = "/usr" | ||
sys.path.append(rootsys + os.sep + 'lib') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use os.path.join
@@ -156,9 +156,10 @@ namespace Gaudi { | |||
const char sep = ':'; | |||
#endif | |||
char* search_path = ::getenv( envVar ); | |||
if ( search_path ) { | |||
if ( true ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? Add a comment.
DDCore/python/dd4hepFactories.py
Outdated
@@ -27,7 +27,10 @@ def __init__(self): | |||
self.all_components = [] | |||
|
|||
def scanPath(self): | |||
ldp = os.environ['LD_LIBRARY_PATH'].split(':') | |||
if os.getenv("LD_LIBRARY_PATH") is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getenv has an optional default https://docs.python.org/3/library/os.html#os.getenv
Co-authored-by: Andre Sailer <[email protected]>
BEGINRELEASENOTES
ENDRELEASENOTES