Skip to content

Commit

Permalink
use LIBSWIPL_PATH from environment (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrbauer authored Jun 8, 2024
1 parent 5961f87 commit 3171d8a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pyswip/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,11 @@ def _findSwipl():
:rtype: Tuple of strings
:raises ImportError: If we cannot guess the name of the library
"""

# Now begins the guesswork
# check environment
if 'LIBSWIPL_PATH' in os.environ:
return (os.environ['LIBSWIPL_PATH'], os.environ.get('SWI_HOME_DIR'))

# Now begins the guesswork
platform = sys.platform[:3]
if platform == "win": # In Windows, we have the default installer
# path and the registry to look
Expand Down

0 comments on commit 3171d8a

Please sign in to comment.