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
1062d813
Unverified
Commit
1062d813
authored
Sep 20, 2021
by
John Jones
Browse files
initial pass at musllinux support
parent
b35c219f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
18 deletions
+38
-18
common_utils.sh
common_utils.sh
+6
-0
library_builders.sh
library_builders.sh
+7
-1
manylinux_utils.sh
manylinux_utils.sh
+21
-16
travis_linux_steps.sh
travis_linux_steps.sh
+4
-1
No files found.
common_utils.sh
View file @
1062d813
...
...
@@ -35,6 +35,9 @@ else
which python
||
export
PATH
=
/opt/python/cp39-cp39/bin:
$PATH
fi
if
[
$MB_ML_LIBC
==
"musllinux"
]
;
then
IS_ALPINE
=
1
;
fi
# Work round bug in travis xcode image described at
# https://github.com/direnv/direnv/issues/210
...
...
@@ -220,6 +223,8 @@ function install_rsync {
if [ -n "
$IS_MACOS
" ]; then
# macOS. The colon in the next line is the null command
:
elif [ -n "
$IS_ALPINE
" ]; then
[[
$(
type
-P
rsync
)
]] || apk add rsync
elif [[
$MB_ML_VER
== "
_2_24
" ]]; then
# debian:9 based distro
[[
$(
type
-P
rsync
)
]] || apt-get install -y rsync
...
...
@@ -308,6 +313,7 @@ function build_wheel_cmd {
local repo_dir=
${
2
:-
$REPO_DIR
}
[ -z "
$repo_dir
" ] && echo "
repo_dir not defined
" && exit 1
local wheelhouse=
$(
abspath
${
WHEEL_SDIR
:-
wheelhouse
}
)
mkdir -p "
$wheelhouse
"
start_spinner
if [ -n "
$(
is_function
"pre_build"
)
" ]; then pre_build; fi
stop_spinner
...
...
library_builders.sh
View file @
1062d813
...
...
@@ -133,7 +133,9 @@ function build_zlib {
# Gives an old but safe version
if
[
-n
"
$IS_MACOS
"
]
;
then return
;
fi
# OSX has zlib already
if
[
-e
zlib-stamp
]
;
then return
;
fi
if
[[
$MB_ML_VER
==
"_2_24"
]]
;
then
if
[
-n
"
$IS_ALPINE
"
]
;
then
apk add zlib-dev
elif
[[
$MB_ML_VER
==
"_2_24"
]]
;
then
# debian:9 based distro
apt-get
install
-y
zlib1g-dev
else
...
...
@@ -186,6 +188,8 @@ function get_modern_cmake {
local
cmake
=
cmake
if
[
-n
"
$IS_MACOS
"
]
;
then
brew
install
cmake
>
/dev/null
elif
[
-n
"
$IS_ALPINE
"
]
;
then
apk add cmake
elif
[[
$MB_ML_VER
==
"_2_24"
]]
;
then
# debian:9 based distro
apt-get
install
-y
cmake
...
...
@@ -411,6 +415,8 @@ function build_suitesparse {
if
[
-e
suitesparse-stamp
]
;
then return
;
fi
if
[
-n
"
$IS_MACOS
"
]
;
then
brew
install
suite-sparse
>
/dev/null
elif
[
-n
"
$IS_ALPINE
"
]
;
then
apk add suitesparse-dev
elif
[[
$MB_ML_VER
==
"_2_24"
]]
;
then
# debian:9 based distro
apt-get
install
-y
libsuitesparse-dev
>
/dev/null
...
...
manylinux_utils.sh
View file @
1062d813
...
...
@@ -44,24 +44,29 @@ function activate_ccache {
ln
-s
/parent-home/.ccache
$HOME
/.ccache
# Now install ccache
if
[
[
$MB_ML_VER
==
"_2_24
"
]
]
;
then
# debian:9 based distro
suppress apt-get
install
-y
ccache
if
[
-n
"
$IS_ALPINE
"
]
;
then
supress apk add ccache
export
PATH
=
"/usr/lib/ccache/bin:
$PATH
"
else
# centos based distro
suppress yum_install ccache
fi
if
[[
$MB_ML_VER
==
"_2_24"
]]
;
then
# debian:9 based distro
suppress apt-get
install
-y
ccache
else
# centos based distro
suppress yum_install ccache
fi
# Create fake compilers and prepend them to the PATH
# Note that yum is supposed to create these for us,
# but I had trouble finding them
local
ccache_dir
=
/usr/lib/ccache/compilers
mkdir
-p
$ccache_dir
ln
-s
/usr/bin/ccache
$ccache_dir
/gcc
ln
-s
/usr/bin/ccache
$ccache_dir
/g++
ln
-s
/usr/bin/ccache
$ccache_dir
/cc
ln
-s
/usr/bin/ccache
$ccache_dir
/c++
export
PATH
=
$ccache_dir
:
$PATH
# Create fake compilers and prepend them to the PATH
# Note that yum is supposed to create these for us,
# but I had trouble finding them
local
ccache_dir
=
/usr/lib/ccache/compilers
mkdir
-p
$ccache_dir
ln
-s
/usr/bin/ccache
$ccache_dir
/gcc
ln
-s
/usr/bin/ccache
$ccache_dir
/g++
ln
-s
/usr/bin/ccache
$ccache_dir
/cc
ln
-s
/usr/bin/ccache
$ccache_dir
/c++
export
PATH
=
$ccache_dir
:
$PATH
fi
# Prove to the developer that ccache is activated
echo
"Using C compiler:
$(
which gcc
)
"
...
...
travis_linux_steps.sh
View file @
1062d813
...
...
@@ -69,6 +69,7 @@ function build_multilinux {
# Depends on
# MB_PYTHON_VERSION
# MB_ML_VER
# MB_ML_LIBC (optional)
# UNICODE_WIDTH (optional)
# BUILD_DEPENDS (optional)
# DOCKER_IMAGE (optional)
...
...
@@ -77,7 +78,8 @@ function build_multilinux {
local
plat
=
$1
[
-z
"
$plat
"
]
&&
echo
"plat not defined"
&&
exit
1
local
build_cmds
=
"
$2
"
local
docker_image
=
${
DOCKER_IMAGE
:-
quay
.io/pypa/manylinux
${
MB_ML_VER
}
_
\
$plat
}
local
libc
=
${
MB_ML_LIBC
:-
manylinux
}
local
docker_image
=
${
DOCKER_IMAGE
:-
quay
.io/pypa/
${
libc
}${
MB_ML_VER
}
_
\
$plat
}
docker_image
=
$(
eval echo
"
$docker_image
"
)
retry docker pull
$docker_image
docker run
--rm
\
...
...
@@ -95,6 +97,7 @@ function build_multilinux {
-e
REPO_DIR
=
"
$repo_dir
"
\
-e
PLAT
=
"
$PLAT
"
\
-e
MB_ML_VER
=
"
$MB_ML_VER
"
\
-e
MB_ML_LIBC
=
"
$libc
"
\
-v
$PWD
:/io
\
-v
$HOME
:/parent-home
\
$docker_image
/io/
$MULTIBUILD_DIR
/docker_build_wrap.sh
...
...
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