Skip to content

Commit

Permalink
Only build wheels for x64 architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
yihming committed Dec 5, 2020
1 parent 6d7f920 commit a054d6b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
2 changes: 0 additions & 2 deletions build_linux.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
docker pull quay.io/pypa/manylinux2014_x86_64
docker run -it --rm -e PLAT=manylinux2014_x86_64 -v `pwd`:/src -v `pwd`/dist:/wheelhouse quay.io/pypa/manylinux2014_x86_64 /bin/sh -c "/src/wheel_build/build_wheel_for_linux.sh"
docker pull quay.io/pypa/manylinux2014_i686
docker run -it --rm -e PLAT=manylinux1_i686 -v `pwd`:/src -v `pwd`/dist:/wheelhouse quay.io/pypa/manylinux2014_i686 /bin/sh -c "/src/wheel_build/build_wheel_for_linux.sh"
13 changes: 2 additions & 11 deletions wheel_build/build_wheel_for_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,14 @@ function repair_wheel {
fi
}

if [[ $PLAT =~ .*_x86_64 ]]; then
declare -a PythonVersions=("cp36-cp36m" "cp37-cp37m" "cp38-cp38")
else
declare -a PythonVersions=("cp36-cp36m" "cp37-cp37m")
fi
declare -a PythonVersions=("cp36-cp36m" "cp37-cp37m" "cp38-cp38")

for val in ${PythonVersions[@]}; do
/opt/python/$val/bin/pip install -r /src/requirements.txt
/opt/python/$val/bin/pip wheel /src/ --no-deps -w /wheelhouse/
done


if [[ $PLAT =~ .*_x86_64 ]]; then
suffix=*_x86_64.whl
else
suffix=*_i686.whl
fi
suffix=*_x86_64.whl

for whl in /wheelhouse/$suffix; do
repair_wheel "$whl"
Expand Down

0 comments on commit a054d6b

Please sign in to comment.