Skip to content
Closed
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
build: use bin path override if no python is found in PATH
On systems with no "python" in the PATH, e.g. FreeBSD, we should always
create a python symlink in get_bin_override(). Otherwise, configure
fails with the following error:

Traceback (most recent call last):
  File "./configure", line 1461, in <module>
    bin_override = get_bin_override()
  File "./configure", line 1360, in get_bin_override
    if os.path.realpath(which('python')) == os.path.realpath(sys.executable):
  File "/usr/local/lib/python2.7/posixpath.py", line 375, in realpath
    path, ok = _joinrealpath('', filename, {})
  File "/usr/local/lib/python2.7/posixpath.py", line 381, in _joinrealpath
    if isabs(rest):
  File "/usr/local/lib/python2.7/posixpath.py", line 54, in isabs
    return s.startswith('/')
AttributeError: 'NoneType' object has no attribute 'startswith'
  • Loading branch information
bradleythughes committed Oct 17, 2017
commit 0f1872c57f02becc63ed02134104b1160de950dc
4 changes: 3 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -1357,7 +1357,9 @@ def get_bin_override():
# sys.executable. This directory will be prefixed to the PATH, so that
# other tools that shell out to `python` will use the appropriate python

if os.path.realpath(which('python')) == os.path.realpath(sys.executable):
which_python = which('python')
if (which_python and
os.path.realpath(which_python) == os.path.realpath(sys.executable)):
return

bin_override = os.path.abspath('out/tools/bin')
Expand Down