Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fengzch-das
multibuild
Commits
bec7515f
Commit
bec7515f
authored
Feb 26, 2019
by
Rob Buckley
Browse files
use MB_PYTHON_OSX_VER for defaults in osx_utils.sh
parent
e62f5118
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
16 deletions
+18
-16
configure_build.sh
configure_build.sh
+5
-4
osx_utils.sh
osx_utils.sh
+13
-12
No files found.
configure_build.sh
View file @
bec7515f
...
...
@@ -15,13 +15,14 @@ BUILD_PREFIX="${BUILD_PREFIX:-/usr/local}"
# Default compilation flags for OSX
# IS_OSX is defined in common_utils.sh
if
[
-n
"
$IS_OSX
"
]
;
then
MAC_ARCH
=
$(
mac_arch_for_pyosx_version
$MB_PYTHON_OSX_VER
)
if
[[
"
$MAC_ARCH
"
==
"intel"
]]
;
then
source
$MULTIBUILD_DIR
/osx_utils.sh
PLAT
=
$(
mac_cpython_arch_for_osx_ver
)
if
[[
$PLAT
==
intel
]]
;
then
ARCH_FLAGS
=
${
ARCH_FLAGS
:-
"-arch i386 -arch x86_64"
}
elif
[[
"
$MAC_ARCH
"
==
"
x86_
x
64
"
]]
;
then
elif
[[
$PLAT
==
x86_64
]]
;
then
ARCH_FLAGS
=
${
ARCH_FLAGS
:-
"-arch x86_64"
}
else
echo
"invalid
ARCH = '
$MAC_ARCH
'"
echo
"invalid
platform = '
$PLAT
', supported values are 'intel' or 'x86_64
'"
exit
1
fi
# Only set CFLAGS, FFLAGS if they are not already defined. Build functions
...
...
osx_utils.sh
View file @
bec7515f
...
...
@@ -9,6 +9,7 @@ source $MULTIBUILD_DIR/common_utils.sh
MACPYTHON_URL
=
https://www.python.org/ftp/python
MACPYTHON_PY_PREFIX
=
/Library/Frameworks/Python.framework/Versions
MACPYTHON_DEFAULT_OSX
=
"10.6"
MB_PYTHON_OSX_VER
=
${
MB_PYTHON_OSX_VER
:-
$MACPYTHON_DEFAULT_OSX
}
GET_PIP_URL
=
https://bootstrap.pypa.io/get-pip.py
DOWNLOADS_SDIR
=
downloads
WORKING_SDIR
=
working
...
...
@@ -123,8 +124,7 @@ function pyinst_fname_for_version {
# $py_version (python version in major.minor.extra format)
# $py_osx_ver: {major.minor | not defined}
# if defined, the macosx version that python is built for, e.g.
# "10.6" or "10.9", if not defined, uses the default
# MACPYTHON_DEFAULT_OSX
# "10.6" or "10.9", if not defined, uses the default MACPYTHON_DEFAULT_OSX
# Note: this is the version the Python is built for, and hence
# the min version supported, NOT the version of the current system
local
py_version
=
$1
...
...
@@ -134,16 +134,15 @@ function pyinst_fname_for_version {
}
function
mac_arch_for_
py
osx_ver
sion
{
# echo arch (intel or x86_64)
that c
python builds targetted for
the
# given minimum macOS
are targetted for
function
mac_
cpython_
arch_for_osx_ver
{
# echo arch (intel or x86_64)
for cpython
python
.org
builds targetted for
#
the
given minimum macOS
version
# Parameters
# $py_osx_ver (major.minor | not defined}
# if defined, the macosx version that python is built for, e.g.
# "10.6" or "10.9", if not defined, uses the default
# MACPYTHON_DEFAULT_OSX
py_osx_ver
=
${
1
:-
$MACPYTHON_DEFAULT_OSX
}
check_var
$py_osx_ver
# the macosx version that python is built for, e.g.
# "10.6" or "10.9", or MB_PYTHON_OSX_VER if undefined
#
py_osx_ver
=
${
1
:-
$MB_PYTHON_OSX_VER
}
if
[[
"
$py_osx_ver
"
==
"10.6"
]]
;
then
echo
"intel"
elif
[[
"
$py_osx_ver
"
==
"10.9"
]]
;
then
...
...
@@ -301,8 +300,10 @@ function get_macpython_environment {
# $venv_dir : {directory_name|not defined}
# If defined - make virtualenv in this directory, set python / pip
# commands accordingly
# NOTE: to use the default for $py_osx_ver while defining $venv_dir, set
# $py_osx_ver to "" (empty string)
# $py_osx_ver: {major.minor | not defined}
# if defined, the macosx version that python is built for, e.g.
# "10.6" or "10.9", if not defined, use the version from the
# environment variable MB_PYTHON_OSX_VER
#
# Installs Python
# Sets $PYTHON_EXE to path to Python executable
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment