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

Fixes and improvements for source builds #51422

Merged
merged 3 commits into from
Sep 23, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Don't quote the path to Python.
  • Loading branch information
maleadt committed Sep 22, 2023
commit 665173095c330a38c7b6215836d14fcf30c91d96
2 changes: 1 addition & 1 deletion Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,7 @@ endif

# We need python for things like BB triplet recognition. We don't really care
# about version, generally, so just find something that works:
PYTHON := "$(shell which python 2>/dev/null || which python3 2>/dev/null || which python2 2>/dev/null || echo not found)"
PYTHON := $(shell which python 2>/dev/null || which python3 2>/dev/null || which python2 2>/dev/null || echo not found)
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

This broke things on cygwin:

$ make print-PYTHONmake: /cygdrive/c/Program: No such file or directory
/bin/sh: /cygdrive/c/Program: No such file or directory/home/Administrator/julia/Make.inc:1220: normalize_triplet.py appears to be non-functional 
(used python interpreter "/cygdrive/c/Program Files/Python38/python"), so BinaryBuilder disabled
/bin/sh: /cygdrive/c/Program: No such file or directory
/bin/sh: /cygdrive/c/Program: No such file or directory
/bin/sh: /cygdrive/c/Program: No such file or directory
/bin/sh: /cygdrive/c/Program: No such file or directory
/bin/sh: /cygdrive/c/Program: No such file or directory
/bin/sh: /cygdrive/c/Program: No such file or directory
/bin/sh: /cygdrive/c/Program: No such file or directory
/bin/sh: /cygdrive/c/Program: No such file or directory
/bin/sh: /cygdrive/c/Program: No such file or directory
/bin/sh: /cygdrive/c/Program: No such file or directory
/bin/sh: /cygdrive/c/Program: No such file or directory
/bin/sh: /cygdrive/c/Program: No such file or directory
/bin/sh: /cygdrive/c/Program: No such file or directory
PYTHON=/cygdrive/c/Program Files/Python38/python

To make things weirder we define this code twice:
First here

julia/Make.inc

Line 120 in 1524466

PYTHON := "$(shell which python 2>/dev/null || which python3 2>/dev/null || which python2 2>/dev/null || echo "{python|python3|python2} not found")"
where we still wrap it in "

cc: @staticfloat

PYTHON_SYSTEM := $(shell $(PYTHON) -c 'from __future__ import print_function; import platform; print(platform.system())')

# If we're running on Cygwin, but using a native-windows Python, we need to use cygpath -w
Expand Down