Skip to content

build: Fix python path resolution in configure #16460

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

Merged
merged 1 commit into from
Oct 26, 2017
Merged
Changes from all 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
7 changes: 5 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -1351,7 +1351,9 @@ def configure_inspector(o):
o['variables']['v8_enable_inspector'] = 0 if disable_inspector else 1


def get_bin_override():
def make_bin_override():
if sys.platform == 'win32':
raise Exception('make_bin_override should not be called on win32.')
Copy link
Member

Choose a reason for hiding this comment

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

Does WSL's sys.platform identify as win32?

Copy link
Contributor

Choose a reason for hiding this comment

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

It says linux2

# If the system python is not the python we are running (which should be
# python 2), then create a directory with a symlink called `python` to our
# sys.executable. This directory will be prefixed to the PATH, so that
Expand Down Expand Up @@ -1460,7 +1462,8 @@ if options.prefix:

config = '\n'.join(map('='.join, config.iteritems())) + '\n'

bin_override = get_bin_override()
# On Windows there's no reason to search for a different python binary.
bin_override = None if sys.platform == 'win32' else make_bin_override()
if bin_override:
config = 'export PATH:=' + bin_override + ':$(PATH)\n' + config

Expand Down