Skip to content
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

Windows compatibility #1

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion bob/extension/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ def construct_search_paths(prefixes=None, subpaths=None, suffix=None):
# Priority 4: the conda prefix
conda_prefix = os.environ.get('CONDA_PREFIX')
if conda_prefix:
search.append(conda_prefix + suffix)
if os.name == 'nt':
search.append(os.path.join(conda_prefix,'Library') + suffix)
else:
search.append(conda_prefix + suffix)

# Priority 5: the default search prefixes
search += [p + suffix for p in DEFAULT_PREFIXES]
Expand Down Expand Up @@ -305,6 +308,11 @@ def find_executable(name, subpaths=None, prefixes=None):

binpaths += ['bin']

# Windows
if os.name == 'nt':
binpaths += [os.path.join('mingw-w64','bin')]
name = name + '.exe'

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably want to remove this too. We are trying to add support for msvc not mingw 64 which are incompatible

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think incompatibility applies to executables. Many executables are compiled on MingW and can be used by passing input arguments regardless of how they are compiled. Removing this will cause problems in the future, if not now. The "name = name + '.exe'" is also required as in windows executables need the extension in special cases.

# Exhaustive combination of paths and subpaths
if subpaths:
my_subpaths = []
Expand Down