"platforms/reference/vscode:/vscode.git/clone" did not exist on "74ef687d1855f7d9ea7e987d4fafde0199804b55"
Unverified Commit 4b6eb06a authored by Matthew Brett's avatar Matthew Brett Committed by GitHub
Browse files

Merge pull request #430 from liath/musllinux

musllinux support
parents 678d8451 bc065e03
...@@ -35,6 +35,9 @@ else ...@@ -35,6 +35,9 @@ else
which python || export PATH=/opt/python/cp39-cp39/bin:$PATH which python || export PATH=/opt/python/cp39-cp39/bin:$PATH
fi fi
if [ "$MB_ML_LIBC" == "musllinux" ]; then
IS_ALPINE=1;
fi
# Work round bug in travis xcode image described at # Work round bug in travis xcode image described at
# https://github.com/direnv/direnv/issues/210 # https://github.com/direnv/direnv/issues/210
...@@ -220,6 +223,8 @@ function install_rsync { ...@@ -220,6 +223,8 @@ function install_rsync {
if [ -n "$IS_MACOS" ]; then if [ -n "$IS_MACOS" ]; then
# macOS. The colon in the next line is the null command # 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 elif [[ $MB_ML_VER == "_2_24" ]]; then
# debian:9 based distro # debian:9 based distro
[[ $(type -P rsync) ]] || apt-get install -y rsync [[ $(type -P rsync) ]] || apt-get install -y rsync
...@@ -308,6 +313,7 @@ function build_wheel_cmd { ...@@ -308,6 +313,7 @@ function build_wheel_cmd {
local repo_dir=${2:-$REPO_DIR} local repo_dir=${2:-$REPO_DIR}
[ -z "$repo_dir" ] && echo "repo_dir not defined" && exit 1 [ -z "$repo_dir" ] && echo "repo_dir not defined" && exit 1
local wheelhouse=$(abspath ${WHEEL_SDIR:-wheelhouse}) local wheelhouse=$(abspath ${WHEEL_SDIR:-wheelhouse})
mkdir -p "$wheelhouse"
start_spinner start_spinner
if [ -n "$(is_function "pre_build")" ]; then pre_build; fi if [ -n "$(is_function "pre_build")" ]; then pre_build; fi
stop_spinner stop_spinner
......
...@@ -133,7 +133,9 @@ function build_zlib { ...@@ -133,7 +133,9 @@ function build_zlib {
# Gives an old but safe version # Gives an old but safe version
if [ -n "$IS_MACOS" ]; then return; fi # OSX has zlib already if [ -n "$IS_MACOS" ]; then return; fi # OSX has zlib already
if [ -e zlib-stamp ]; then return; fi 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 # debian:9 based distro
apt-get install -y zlib1g-dev apt-get install -y zlib1g-dev
else else
...@@ -186,6 +188,8 @@ function get_modern_cmake { ...@@ -186,6 +188,8 @@ function get_modern_cmake {
local cmake=cmake local cmake=cmake
if [ -n "$IS_MACOS" ]; then if [ -n "$IS_MACOS" ]; then
brew install cmake > /dev/null brew install cmake > /dev/null
elif [ -n "$IS_ALPINE" ]; then
apk add cmake
elif [[ $MB_ML_VER == "_2_24" ]]; then elif [[ $MB_ML_VER == "_2_24" ]]; then
# debian:9 based distro # debian:9 based distro
apt-get install -y cmake apt-get install -y cmake
...@@ -411,6 +415,8 @@ function build_suitesparse { ...@@ -411,6 +415,8 @@ function build_suitesparse {
if [ -e suitesparse-stamp ]; then return; fi if [ -e suitesparse-stamp ]; then return; fi
if [ -n "$IS_MACOS" ]; then if [ -n "$IS_MACOS" ]; then
brew install suite-sparse > /dev/null brew install suite-sparse > /dev/null
elif [ -n "$IS_ALPINE" ]; then
apk add suitesparse-dev
elif [[ $MB_ML_VER == "_2_24" ]]; then elif [[ $MB_ML_VER == "_2_24" ]]; then
# debian:9 based distro # debian:9 based distro
apt-get install -y libsuitesparse-dev > /dev/null apt-get install -y libsuitesparse-dev > /dev/null
......
...@@ -44,6 +44,11 @@ function activate_ccache { ...@@ -44,6 +44,11 @@ function activate_ccache {
ln -s /parent-home/.ccache $HOME/.ccache ln -s /parent-home/.ccache $HOME/.ccache
# Now install ccache # Now install ccache
local ccache_dir
if [ -n "$IS_ALPINE" ]; then
suppress apk add ccache
ccache_dir='/usr/lib/ccache/bin'
else
if [[ $MB_ML_VER == "_2_24" ]]; then if [[ $MB_ML_VER == "_2_24" ]]; then
# debian:9 based distro # debian:9 based distro
suppress apt-get install -y ccache suppress apt-get install -y ccache
...@@ -55,13 +60,14 @@ function activate_ccache { ...@@ -55,13 +60,14 @@ function activate_ccache {
# Create fake compilers and prepend them to the PATH # Create fake compilers and prepend them to the PATH
# Note that yum is supposed to create these for us, # Note that yum is supposed to create these for us,
# but I had trouble finding them # but I had trouble finding them
local ccache_dir=/usr/lib/ccache/compilers ccache_dir='/usr/lib/ccache/compilers'
mkdir -p $ccache_dir mkdir -p $ccache_dir
ln -s /usr/bin/ccache $ccache_dir/gcc ln -s /usr/bin/ccache $ccache_dir/gcc
ln -s /usr/bin/ccache $ccache_dir/g++ ln -s /usr/bin/ccache $ccache_dir/g++
ln -s /usr/bin/ccache $ccache_dir/cc ln -s /usr/bin/ccache $ccache_dir/cc
ln -s /usr/bin/ccache $ccache_dir/c++ ln -s /usr/bin/ccache $ccache_dir/c++
export PATH=$ccache_dir:$PATH fi
export PATH="$ccache_dir:$PATH"
# Prove to the developer that ccache is activated # Prove to the developer that ccache is activated
echo "Using C compiler: $(which gcc)" echo "Using C compiler: $(which gcc)"
......
...@@ -69,6 +69,7 @@ function build_multilinux { ...@@ -69,6 +69,7 @@ function build_multilinux {
# Depends on # Depends on
# MB_PYTHON_VERSION # MB_PYTHON_VERSION
# MB_ML_VER # MB_ML_VER
# MB_ML_LIBC (optional)
# UNICODE_WIDTH (optional) # UNICODE_WIDTH (optional)
# BUILD_DEPENDS (optional) # BUILD_DEPENDS (optional)
# DOCKER_IMAGE (optional) # DOCKER_IMAGE (optional)
...@@ -77,7 +78,8 @@ function build_multilinux { ...@@ -77,7 +78,8 @@ function build_multilinux {
local plat=$1 local plat=$1
[ -z "$plat" ] && echo "plat not defined" && exit 1 [ -z "$plat" ] && echo "plat not defined" && exit 1
local build_cmds="$2" 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") docker_image=$(eval echo "$docker_image")
retry docker pull $docker_image retry docker pull $docker_image
docker run --rm \ docker run --rm \
...@@ -95,6 +97,7 @@ function build_multilinux { ...@@ -95,6 +97,7 @@ function build_multilinux {
-e REPO_DIR="$repo_dir" \ -e REPO_DIR="$repo_dir" \
-e PLAT="$PLAT" \ -e PLAT="$PLAT" \
-e MB_ML_VER="$MB_ML_VER" \ -e MB_ML_VER="$MB_ML_VER" \
-e MB_ML_LIBC="$libc" \
-v $PWD:/io \ -v $PWD:/io \
-v $HOME:/parent-home \ -v $HOME:/parent-home \
$docker_image /io/$MULTIBUILD_DIR/docker_build_wrap.sh $docker_image /io/$MULTIBUILD_DIR/docker_build_wrap.sh
...@@ -108,6 +111,7 @@ function install_run { ...@@ -108,6 +111,7 @@ function install_run {
# Depends on # Depends on
# PLAT (can be passed in as argument) # PLAT (can be passed in as argument)
# MB_PYTHON_VERSION # MB_PYTHON_VERSION
# MB_ML_LIBC (optional)
# UNICODE_WIDTH (optional) # UNICODE_WIDTH (optional)
# WHEEL_SDIR (optional) # WHEEL_SDIR (optional)
# MANYLINUX_URL (optional) # MANYLINUX_URL (optional)
...@@ -115,8 +119,12 @@ function install_run { ...@@ -115,8 +119,12 @@ function install_run {
# MB_TEST_VER (optional) # MB_TEST_VER (optional)
local plat=${1:-${PLAT:-x86_64}} local plat=${1:-${PLAT:-x86_64}}
if [ -z "$DOCKER_TEST_IMAGE" ]; then if [ -z "$DOCKER_TEST_IMAGE" ]; then
if [ "$MB_ML_LIBC" == "musllinux" ]; then
local docker_image="multibuild/alpine3.14_$plat"
else
local bitness=$([ "$plat" == i686 ] && echo 32 || echo 64) local bitness=$([ "$plat" == i686 ] && echo 32 || echo 64)
local docker_image="matthewbrett/trusty:$bitness" local docker_image="matthewbrett/trusty:$bitness"
fi
else else
# aarch64 is called arm64v8 in Ubuntu # aarch64 is called arm64v8 in Ubuntu
local plat_subst=$([ "$plat" == aarch64 ] && echo arm64v8 || echo $plat) local plat_subst=$([ "$plat" == aarch64 ] && echo arm64v8 || echo $plat)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment