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
db94f746
Commit
db94f746
authored
May 22, 2017
by
Matthew Brett
Browse files
RF: look for Python 2.6 installer in right place
Python 2.6 installer has 10.3 suffix.
parent
a83e6bb8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
3 deletions
+22
-3
osx_utils.sh
osx_utils.sh
+17
-3
tests/test_osx_utils.sh
tests/test_osx_utils.sh
+5
-0
No files found.
osx_utils.sh
View file @
db94f746
...
...
@@ -120,6 +120,21 @@ function pyinst_ext_for_version {
fi
}
function
pyinst_fname_for_version
{
# echo filename for OSX installer file given Python version
# Parameters
# $py_version (python version in major.minor.extra format)
local
py_version
=
$1
local
inst_ext
=
$(
pyinst_ext_for_version
$py_version
)
# Python 2.6 has OSX 10.3 suffix
if
[
"
$(
lex_ver
$py_version
)
"
-le
"
$(
lex_ver 2.6.6
)
"
]
;
then
local
osx_ver
=
10.3
else
local
osx_ver
=
10.6
fi
echo
"python-
$py_version
-macosx
${
osx_ver
}
.
$inst_ext
"
}
function
install_macpython
{
# Install Python and set $PYTHON_EXE to the installed executable
# Parameters:
...
...
@@ -145,12 +160,11 @@ function install_mac_cpython {
# sets $PYTHON_EXE variable to python executable
local
py_version
=
$(
fill_pyver
$1
)
local
py_stripped
=
$(
strip_ver_suffix
$py_version
)
local
inst_ext
=
$(
pyinst_ext_for_version
$py_version
)
local
py_inst
=
python-
$py_version
-macosx10
.6.
$inst_ext
local
py_inst
=
$(
pyinst_fname_for_version
$py_version
)
local
inst_path
=
$DOWNLOADS_SDIR
/
$py_inst
mkdir
-p
$DOWNLOADS_SDIR
curl
$MACPYTHON_URL
/
$py_stripped
/
${
py_inst
}
>
$inst_path
if
[
"
$
inst_ext
"
==
"dmg"
]
;
then
if
[
"
$
{
py_inst
:
-3
}
"
==
"dmg"
]
;
then
hdiutil attach
$inst_path
-mountpoint
/Volumes/Python
inst_path
=
/Volumes/Python/Python.mpkg
fi
...
...
tests/test_osx_utils.sh
View file @
db94f746
...
...
@@ -12,6 +12,11 @@
[
"
$(
pyinst_ext_for_version 3.3
)
"
==
dmg
]
||
ingest
[
"
$(
pyinst_ext_for_version 3.4
)
"
==
pkg
]
||
ingest
[
"
$(
pyinst_ext_for_version 3
)
"
==
pkg
]
||
ingest
[
"
$(
pyinst_fname_for_version 2.6.6
)
"
==
"python-2.6.6-macosx10.3.dmg"
]
||
ingest
[
"
$(
pyinst_fname_for_version 2.7.9
)
"
==
"python-2.7.9-macosx10.6.dmg"
]
||
ingest
[
"
$(
pyinst_fname_for_version 3.4.1
)
"
==
"python-3.4.1-macosx10.6.dmg"
]
||
ingest
[
"
$(
pyinst_fname_for_version 3.4.2
)
"
==
"python-3.4.2-macosx10.6.pkg"
]
||
ingest
[
"
$(
pyinst_fname_for_version 3.6.1
)
"
==
"python-3.6.1-macosx10.6.pkg"
]
||
ingest
# Test utilities for getting Python version versions
[
"
$(
get_py_digit
)
"
==
"
${
cpython_version
:0:1
}
"
]
||
ingest
...
...
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