Skip to content

Commit

Permalink
Merge pull request #848 from aawilson/python_builder_compat
Browse files Browse the repository at this point in the history
Remove a cross-platform compat bug in python builder
  • Loading branch information
DamnWidget authored Mar 9, 2020
2 parents 2463829 + 06a5e0c commit 261513c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion anaconda_lib/builder/python_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def _parse_tpl(self, cmd):

template_file = os.path.join(
os.path.dirname(__file__),
'../../', 'templates', 'python_build.tpl'
'..', '..', 'templates', 'python_build.tpl'
)
with open(template_file, 'r', encoding='utf8') as tplfile:
template = Template(tplfile.read())
Expand Down
8 changes: 7 additions & 1 deletion anaconda_lib/workers/interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,13 @@ def __extract_python_interpreter(self, view):
os.path.expandvars(get_interpreter(view))
)
)
python = urldata.path

if len(urldata.scheme) == 1:
# Assume this comes from a Windows path if scheme is a single character
python = os.path.join('{}:'.format(urldata.scheme), urldata.path)
else:
python = urldata.path

if '$VIRTUAL_ENV' in python:
Log.warning(
'WARNING: your anaconda configured python interpreter '
Expand Down

0 comments on commit 261513c

Please sign in to comment.