forked from matthew-brett/manylinux-builds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_feathers.sh
executable file
·58 lines (51 loc) · 1.86 KB
/
build_feathers.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
# Build feather packages
# Run with:
# docker run --rm -v $PWD:/io quay.io/pypa/manylinux1_x86_64 /io/build_feathers.sh
# or something like:
# docker run --rm -e PYTHON_VERSIONS=2.7 -v $PWD:/io quay.io/pypa/manylinux1_x86_64 /io/build_feathers.sh
# or:
# docker run --rm -e FEATHER_VERSIONS=0.2.0 -e PYTHON_VERSIONS=2.7 -v $PWD:/io quay.io/pypa/manylinux1_x86_64 /io/build_feathers.sh
#
# Make sure numpy and Cython wheels are on the manylinux server or built in the
# $WHEELHOUSE directory first.
set -e
# Manylinux, Python versions
source /io/common_vars.sh
if [ -z "${FEATHER_VERSIONS}" ]; then
FEATHER_VERSIONS="0.1.0 0.1.1 0.1.2 0.2.0"
fi
# Directory to store wheels
rm_mkdir unfixed_wheels
# Get feather-format source tree
gh-clone wesm/feather
cd feather/python
# Compile wheels
for PYTHON in ${PYTHON_VERSIONS}; do
PYTHON_INTERPRETER="$(cpython_path $PYTHON)/bin/python"
PIP="$(cpython_path $PYTHON)/bin/pip"
PIPI_IO="$PIP install -f $WHEELHOUSE -f $MANYLINUX_URL"
# Only Python 2.7 and 3.4+ are officially suppoted by the feather project,
# skip all other Python versions:
if [ $(lex_ver $PYTHON) -lt $(lex_ver 2.7) ] ; then
continue
elif [[ $(lex_ver $PYTHON) -gt $(lex_ver 2.7) && \
$(lex_ver $PYTHON) -lt $(lex_ver 3.4) ]] ; then
continue
fi
for FEATHER in ${FEATHER_VERSIONS}; do
$PIPI_IO "numpy==1.9.0"
$PIPI_IO "cython==0.24"
echo "Building feather-format $FEATHER for Python $PYTHON"
git clean -fxd
git reset --hard
git checkout "v$FEATHER"
ln -s ../cpp/src src
# XXX: $PIP wheel . does not work for this project
$PYTHON_INTERPRETER setup.py bdist_wheel
mv dist/*.whl ../../unfixed_wheels
done
done
cd ../..
# Bundle external shared libraries into the wheels
repair_wheelhouse unfixed_wheels $WHEELHOUSE