Skip to content
Permalink
Browse files

Use system PATH variable in pathfinder (#389)

  • Loading branch information...
alubbock committed Dec 11, 2018
1 parent c51c190 commit 3f6518528f48e3c792f4f1797ac2cbf617c5f7f4
Showing with 7 additions and 0 deletions.
  1. +7 −0 pysb/pathfinder.py
@@ -2,6 +2,9 @@
import sys
import sysconfig

# Set to False to not utilize the system PATH environment variable
use_path = 'PYSB_PATHFINDER_IGNORE_PATH' not in os.environ

_path_config = {
'bng': {
'name': 'BioNetGen',
@@ -146,6 +149,10 @@ def get_path(prog_name):
set_path.__name__))

search_paths = path_conf['search_paths'][os.name]
if use_path:
search_paths = list(search_paths) + os.environ.get('PATH', '').split(
os.pathsep)

for search_path in search_paths:
try:
_path_cache[prog_name] = _validate_path(prog_name, search_path)

0 comments on commit 3f65185

Please sign in to comment.
You can’t perform that action at this time.