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
4e71b725
Commit
4e71b725
authored
Mar 11, 2019
by
robbuckley
Browse files
comments, typos and cosmetic changes
fixup comments
parent
79fdca95
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
9 deletions
+10
-9
osx_utils.sh
osx_utils.sh
+7
-6
tests/test_osx_utils.sh
tests/test_osx_utils.sh
+1
-1
tests/test_python_install.sh
tests/test_python_install.sh
+2
-2
No files found.
osx_utils.sh
View file @
4e71b725
...
@@ -171,12 +171,13 @@ function get_macpython_osx_ver {
...
@@ -171,12 +171,13 @@ function get_macpython_osx_ver {
}
}
function
macpython_arch_for_version
{
function
macpython_arch_for_version
{
# echo arch (
e.g.
intel or x86_64) that a version of
C
Python is expected
# echo arch (intel or x86_64) that a version of Python is expected
# to be built for
, given the minimum macOS version
# to be built for
# Parameters
# Parameters
# $py_ver Python version,
e.g.
(major.minor.patch) for
CPython,
# $py_ver Python version,
in the format
(major.minor.patch) for
#
or pypy-(major.minor) for PyPy
#
CPython,
or pypy-(major.minor) for PyPy
# $py_osx_ver minimum macOS version the target Python is built for
# $py_osx_ver minimum macOS version the target Python is built for
# (major.minor)
local
py_ver
=
$1
local
py_ver
=
$1
local
py_osx_ver
=
${
2
:-
$MB_PYTHON_OSX_VER
}
local
py_osx_ver
=
${
2
:-
$MB_PYTHON_OSX_VER
}
check_var
$1
check_var
$1
...
@@ -186,7 +187,7 @@ function macpython_arch_for_version {
...
@@ -186,7 +187,7 @@ function macpython_arch_for_version {
elif
[[
"
$py_osx_ver
"
==
"10.9"
]]
;
then
elif
[[
"
$py_osx_ver
"
==
"10.9"
]]
;
then
echo
"x86_64"
echo
"x86_64"
else
else
echo
"Unexpected CPython
osx
version:
${
py_osx_ver
}
, supported values: 10.6 and 10.9"
echo
"Unexpected CPython
macOS
version:
${
py_osx_ver
}
, supported values: 10.6 and 10.9"
exit
1
exit
1
fi
fi
else
else
...
@@ -215,7 +216,7 @@ function macpython_impl_for_version {
...
@@ -215,7 +216,7 @@ function macpython_impl_for_version {
}
}
function
strip_macpython_ver_prefix
{
function
strip_macpython_ver_prefix
{
# strip
the
implementation prefix from a Python version string
# strip
any
implementation prefix from a Python version string
# Parameters:
# Parameters:
# $version : [implementation-]major[.minor[.patch]]
# $version : [implementation-]major[.minor[.patch]]
# Python implementation, e.g. "3.6" for CPython or
# Python implementation, e.g. "3.6" for CPython or
...
...
tests/test_osx_utils.sh
View file @
4e71b725
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
[
"
$(
get_py_mm
)
"
==
"
${
cpython_version
:0:3
}
"
]
||
ingest
[
"
$(
get_py_mm
)
"
==
"
${
cpython_version
:0:3
}
"
]
||
ingest
[
"
$(
get_py_mm_nodot
)
"
==
$(
echo
"
${
cpython_version
:0:3
}
"
|
tr
-d
.
)
]
||
ingest
[
"
$(
get_py_mm_nodot
)
"
==
$(
echo
"
${
cpython_version
:0:3
}
"
|
tr
-d
.
)
]
||
ingest
# test lookup of arch from Python mac
os
target build
# test lookup of arch from Python mac
OS
target build
[
"
$(
macpython_arch_for_version 2.7 10.6
)
"
==
"intel"
]
||
ingest
[
"
$(
macpython_arch_for_version 2.7 10.6
)
"
==
"intel"
]
||
ingest
[
"
$(
macpython_arch_for_version 2.7 10.9
)
"
==
"x86_64"
]
||
ingest
[
"
$(
macpython_arch_for_version 2.7 10.9
)
"
==
"x86_64"
]
||
ingest
[
"
$(
macpython_arch_for_version pypy-2.7
)
"
==
"x86_64"
]
||
ingest
[
"
$(
macpython_arch_for_version pypy-2.7
)
"
==
"x86_64"
]
||
ingest
...
...
tests/test_python_install.sh
View file @
4e71b725
...
@@ -67,6 +67,6 @@ expected_arch=$(macpython_arch_for_version $PYTHON_VERSION)
...
@@ -67,6 +67,6 @@ expected_arch=$(macpython_arch_for_version $PYTHON_VERSION)
if
[[
$requested_impl
==
'cp'
]]
;
then
if
[[
$requested_impl
==
'cp'
]]
;
then
expected_tag
=
"macosx-
$MB_PYTHON_OSX_VER
-
$expected_arch
"
expected_tag
=
"macosx-
$MB_PYTHON_OSX_VER
-
$expected_arch
"
else
else
expected_tag
=
"macosx-
(
10.[0-9]+
)
-
$expected_arch
"
expected_tag
=
"macosx-10.[0-9]+-
$expected_arch
"
fi
fi
[[
$distutils_plat
=
~
$expected_tag
]]
||
ingest
[[
$distutils_plat
=
~
$expected_tag
]]
||
ingest
\ No newline at end of file
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