|
|
@ -1369,10 +1369,12 @@ else |
|
|
unset PYTHON_BUILD_MIRROR_URL |
|
|
unset PYTHON_BUILD_MIRROR_URL |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
# Add an option to build a debug version of Python (#11) |
|
|
if [ -n "$DEBUG" ]; then |
|
|
if [ -n "$DEBUG" ]; then |
|
|
package_option python configure --with-pydebug |
|
|
package_option python configure --with-pydebug |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
# python-build: Set `RPATH` if `--enable-shared` was given (#65, #66, 82) |
|
|
if [[ "$CONFIGURE_OPTS" == *"--enable-shared"* ]] || [[ "$PYTHON_CONFIGURE_OPTS" == *"--enable-shared"* ]]; then |
|
|
if [[ "$CONFIGURE_OPTS" == *"--enable-shared"* ]] || [[ "$PYTHON_CONFIGURE_OPTS" == *"--enable-shared"* ]]; then |
|
|
# The ld on Darwin embeds the full paths to each dylib by default |
|
|
# The ld on Darwin embeds the full paths to each dylib by default |
|
|
if [[ "$LDFLAGS" != *"-rpath="* ]] && [[ "Darwin" != "$(uname -s)" ]]; then |
|
|
if [[ "$LDFLAGS" != *"-rpath="* ]] && [[ "Darwin" != "$(uname -s)" ]]; then |
|
|
@ -1380,6 +1382,7 @@ if [[ "$CONFIGURE_OPTS" == *"--enable-shared"* ]] || [[ "$PYTHON_CONFIGURE_OPTS" |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
# Add support for framework installation (`--enable-framework`) of CPython (#55, #99) |
|
|
if [[ "$PYTHON_CONFIGURE_OPTS" == *"--enable-framework"* ]]; then |
|
|
if [[ "$PYTHON_CONFIGURE_OPTS" == *"--enable-framework"* ]]; then |
|
|
create_framework_dirs() { |
|
|
create_framework_dirs() { |
|
|
local version="$(echo "$1" | sed -E 's/^[^0-9]*([0-9]+\.[0-9]+).*$/\1/')" |
|
|
local version="$(echo "$1" | sed -E 's/^[^0-9]*([0-9]+\.[0-9]+).*$/\1/')" |
|
|
@ -1395,6 +1398,7 @@ if [[ "$PYTHON_CONFIGURE_OPTS" == *"--enable-framework"* ]]; then |
|
|
package_option python configure --enable-framework="${PREFIX_PATH}" |
|
|
package_option python configure --enable-framework="${PREFIX_PATH}" |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
# SSL Certificate error with older wget that does not support Server Name Indication (#60) |
|
|
if ! command -v curl 1>/dev/null 2>&1 && [[ "$(wget --version 2>/dev/null || true)" = "GNU Wget 1.1"[0-3]* ]]; then |
|
|
if ! command -v curl 1>/dev/null 2>&1 && [[ "$(wget --version 2>/dev/null || true)" = "GNU Wget 1.1"[0-3]* ]]; then |
|
|
echo "python-build: wget (< 1.14) doesn't support Server Name Indication. Please install curl (>= 7.18.1) and try again" >&2 |
|
|
echo "python-build: wget (< 1.14) doesn't support Server Name Indication. Please install curl (>= 7.18.1) and try again" >&2 |
|
|
exit 1 |
|
|
exit 1 |
|
|
|