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
78021f13
Commit
78021f13
authored
Mar 11, 2019
by
robbuckley
Browse files
cosmetic / comments
parent
89227fcd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
6 deletions
+20
-6
osx_utils.sh
osx_utils.sh
+20
-6
No files found.
osx_utils.sh
View file @
78021f13
...
@@ -135,23 +135,37 @@ function pyinst_fname_for_version {
...
@@ -135,23 +135,37 @@ function pyinst_fname_for_version {
}
}
function
get_macpython_arch
{
function
get_macpython_arch
{
# get arch (e.g. intel or x86_64) from the distutils platform tag
# echo arch (e.g. intel or x86_64), extracted from the distutils platform tag
distutils_plat
=
${
1
:-
$(
get_distutils_platform
)
}
# Parameters
# $distutils_plat PEP425 style platform tag, or if not provided, calls
# the function get_distutils_platform, provided by
# common_utils.sh. Fails if this is not a mac platform
#
# Note: MUST only be called after the version of python used to build the
# target wheel has been installed and is on the path
local
distutils_plat
=
${
1
:-
$(
get_distutils_platform
)
}
if
[[
$distutils_plat
=
~ macosx-
(
10
\.
[
0-9]+
)
-
(
.
*
)
]]
;
then
if
[[
$distutils_plat
=
~ macosx-
(
10
\.
[
0-9]+
)
-
(
.
*
)
]]
;
then
echo
${
BASH_REMATCH
[2]
}
echo
${
BASH_REMATCH
[2]
}
else
else
echo
"Error parsing distutils platform '
$distutils_plat
'"
echo
"Error parsing
macOS
distutils platform '
$distutils_plat
'"
exit
1
exit
1
fi
fi
}
}
function
get_macpython_osx_ver
{
function
get_macpython_osx_ver
{
# get minimum macOS version (e.g. 10.9) from the distutils platform tag
# echo minimum macOS version (e.g. 10.9) from the distutils platform tag
distutils_plat
=
${
1
:-
$(
get_distutils_platform
)
}
# Parameters
# $distutils_plat PEP425 style platform tag, or if not provided, calls
# the function get_distutils_platform, provided by
# common_utils.sh. Fails if this is not a mac platform
#
# Note: MUST only be called after the version of python used to build the
# target wheel has been installed and is on the path
local
distutils_plat
=
${
1
:-
$(
get_distutils_platform
)
}
if
[[
$distutils_plat
=
~ macosx-
(
10
\.
[
0-9]+
)
-
(
.
*
)
]]
;
then
if
[[
$distutils_plat
=
~ macosx-
(
10
\.
[
0-9]+
)
-
(
.
*
)
]]
;
then
echo
${
BASH_REMATCH
[1]
}
echo
${
BASH_REMATCH
[1]
}
else
else
echo
"Error parsing distutils platform '
$distutils_plat
'"
echo
"Error parsing
macOS
distutils platform '
$distutils_plat
'"
exit
1
exit
1
fi
fi
}
}
...
...
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