add has_broken_mac_gcc_llvm and use clang if true
This commit is contained in:
parent
9ce760c798
commit
f76faa88b8
@ -626,19 +626,27 @@ require_gcc() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
require_cc() {
|
require_cc() {
|
||||||
local cc ccname
|
while [ -n "$1" ]; do
|
||||||
for ccname in "$@"; do
|
if [ "$1" = "--if" ]; then
|
||||||
cc="$(locate_cc "$ccname" || true)"
|
"$2" || return 0
|
||||||
if [ -n "$cc" ]; then
|
shift 2
|
||||||
|
else
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
local cc
|
||||||
|
local ccname="${1:-cc}"
|
||||||
|
cc="$(locate_cc "$ccname" || true)"
|
||||||
|
if [ -n "$cc" ]; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -z "$cc" ]; then
|
if [ -z "$cc" ]; then
|
||||||
local esc=$'\033'
|
local esc=$'\033'
|
||||||
{ echo
|
{ echo
|
||||||
echo "${esc}[1mERROR${esc}[0m: This package must be compiled with $@, but python-build couldn't"
|
echo "${esc}[1mERROR${esc}[0m: This package must be compiled with $ccname, but python-build couldn't"
|
||||||
echo "find a suitable \`cc\` executable on your system. Please install $@"
|
echo "find a suitable \`cc\` executable on your system. Please install $ccname"
|
||||||
echo "and try again."
|
echo "and try again."
|
||||||
echo
|
echo
|
||||||
} >&3
|
} >&3
|
||||||
@ -671,7 +679,7 @@ locate_cc() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
gccs_in_path() {
|
gccs_in_path() {
|
||||||
ccs_in_path "$gcc" "$@"
|
ccs_in_path "gcc" "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
ccs_in_path() {
|
ccs_in_path() {
|
||||||
@ -764,6 +772,11 @@ has_broken_mac_readline() {
|
|||||||
return "$retval"
|
return "$retval"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
has_broken_mac_gcc_llvm() {
|
||||||
|
[ "$(uname -s)" = "Darwin" ] &&
|
||||||
|
[ "$(gcc --version 2>/dev/null || true)" = "llvm-gcc-4.2" ]
|
||||||
|
}
|
||||||
|
|
||||||
# Post-install check for Python 2.5.x
|
# Post-install check for Python 2.5.x
|
||||||
build_package_verify_py25() {
|
build_package_verify_py25() {
|
||||||
build_package_verify_readline "$@"
|
build_package_verify_readline "$@"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
require_gcc
|
require_cc --if has_broken_mac_gcc_llvm "clang"
|
||||||
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
|
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
|
||||||
install_hg "Python-3.3-dev" "https://bitbucket.org/mirror/cpython" "3.3" standard verify_py33
|
install_hg "Python-3.3-dev" "https://bitbucket.org/mirror/cpython" "3.3" standard verify_py33
|
||||||
install_package "setuptools-0.7.4" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.4.tar.gz#c0b8864b63c13312f5d9568c2a54247e" python
|
install_package "setuptools-0.7.4" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.4.tar.gz#c0b8864b63c13312f5d9568c2a54247e" python
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
require_gcc
|
require_cc --if has_broken_mac_gcc_llvm "clang"
|
||||||
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
|
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
|
||||||
install_package "Python-3.3.0" "http://python.org/ftp/python/3.3.0/Python-3.3.0.tgz#198a64f7a04d1d5e95ce2782d5fd8254" standard verify_py33
|
install_package "Python-3.3.0" "http://python.org/ftp/python/3.3.0/Python-3.3.0.tgz#198a64f7a04d1d5e95ce2782d5fd8254" standard verify_py33
|
||||||
install_package "setuptools-0.7.4" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.4.tar.gz#c0b8864b63c13312f5d9568c2a54247e" python
|
install_package "setuptools-0.7.4" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.4.tar.gz#c0b8864b63c13312f5d9568c2a54247e" python
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
require_gcc
|
require_cc --if has_broken_mac_gcc_llvm "clang"
|
||||||
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
|
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
|
||||||
install_package "Python-3.3.1" "http://python.org/ftp/python/3.3.1/Python-3.3.1.tgz#c19bfd6ea252b61779a4f2996fb3b330" standard verify_py33
|
install_package "Python-3.3.1" "http://python.org/ftp/python/3.3.1/Python-3.3.1.tgz#c19bfd6ea252b61779a4f2996fb3b330" standard verify_py33
|
||||||
install_package "setuptools-0.7.4" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.4.tar.gz#c0b8864b63c13312f5d9568c2a54247e" python
|
install_package "setuptools-0.7.4" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.4.tar.gz#c0b8864b63c13312f5d9568c2a54247e" python
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
require_gcc
|
require_cc --if has_broken_mac_gcc_llvm "clang"
|
||||||
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
|
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
|
||||||
install_package "Python-3.3.2" "http://python.org/ftp/python/3.3.2/Python-3.3.2.tgz#0a2ea57f6184baf45b150aee53c0c8da" standard verify_py33
|
install_package "Python-3.3.2" "http://python.org/ftp/python/3.3.2/Python-3.3.2.tgz#0a2ea57f6184baf45b150aee53c0c8da" standard verify_py33
|
||||||
install_package "setuptools-0.7.4" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.4.tar.gz#c0b8864b63c13312f5d9568c2a54247e" python
|
install_package "setuptools-0.7.4" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.4.tar.gz#c0b8864b63c13312f5d9568c2a54247e" python
|
||||||
|
@ -5,7 +5,7 @@ if ! pyenv-which python3.4 1>/dev/null 2>&1; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
require_gcc
|
require_cc --if has_broken_mac_gcc_llvm "clang"
|
||||||
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
|
install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline
|
||||||
install_hg "Python-3.4-dev" "https://bitbucket.org/mirror/cpython" "default" standard verify_py34
|
install_hg "Python-3.4-dev" "https://bitbucket.org/mirror/cpython" "default" standard verify_py34
|
||||||
install_package "setuptools-0.7.4" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.4.tar.gz#c0b8864b63c13312f5d9568c2a54247e" python
|
install_package "setuptools-0.7.4" "https://bitbucket.org/pypa/setuptools/downloads/setuptools-0.7.4.tar.gz#c0b8864b63c13312f5d9568c2a54247e" python
|
||||||
|
Loading…
x
Reference in New Issue
Block a user