Skip to content

Commit

Permalink
Fix defining Windows dll candidates for Python 3.8+
Browse files Browse the repository at this point in the history
Generate full pathname for dll on Windows.
See https://docs.python.org/3/whatsnew/3.8.html#bpo-36085-whatsnew
  • Loading branch information
labrys committed Feb 28, 2021
1 parent 726b1cd commit 3fba0da
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion knowit/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ def define_candidate(locations, names, os_family=None, suggested_path=None):

if location == '__PATH__':
for name in names[os_family]:
yield name
if os_family == 'windows':
for path in os.environ['PATH'].split(';'):
yield os.path.join(path, name)
else:
yield name
elif os.path.isfile(location):
yield location
elif os.path.isdir(location):
Expand Down

0 comments on commit 3fba0da

Please sign in to comment.