Skip to content

Commit

Permalink
[skyapi] refs skycoin#131 separating the manylinux wheels build of py…
Browse files Browse the repository at this point in the history
…skycoin and skyapi
  • Loading branch information
e1Ru1o committed Jul 10, 2019
1 parent 6f4ff02 commit 2bec07b
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 11 deletions.
30 changes: 30 additions & 0 deletions .travis/build_wheels_skyapi.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash
set -e -x

# Install system packages required by our library
yum install -y sudo pcre pcre-devel
mkdir -p "$HOME/bin"
PIP=/opt/python/cp27-cp27m/bin/pip source /io/.travis/install-linux.sh
eval "$(gimme 1.10)"

# Install golang
curl -sL -o "go1.11.3.linux-$1.tar.gz" https://storage.googleapis.com/golang/go1.11.3.linux-$1.tar.gz
sudo tar -zxf go1.11.3.linux-$1.tar.gz -C /usr/local
echo 'export GOROOT=/usr/local/go' | sudo tee -a /etc/profile
echo 'export PATH=$PATH:/usr/local/go/bin' | sudo tee -a /etc/profile
echo 'export CGO_ENABLE=1' | sudo tee -a /etc/profile
source /etc/profile
go version
go env

# Compile wheels
for PYBIN in /opt/python/*/bin; do
"${PYBIN}/pip" install -r /io/lib/skyapi/requirements.txt
"${PYBIN}/pip" wheel /io/ -w wheelhouse/
done

# Bundle external shared libraries into the wheels
for whl in wheelhouse/*.whl; do
auditwheel repair "$whl" -w /io/lib/skyapi/wheelhouse/
done

21 changes: 10 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,27 +98,26 @@ bdist_manylinux: bdist_manylinux_amd64 ## Create multilinux binary wheel distrib

bdist_manylinux_amd64: ## Create 64 bits multilinux binary wheel distribution archives
docker pull quay.io/pypa/manylinux1_x86_64
docker run --rm -t -v $(REPO_ROOT):/io quay.io/pypa/manylinux1_x86_64 /io/.travis/build_wheels.sh /io/ requierements.dev.txt
docker run --rm -t -v $(REPO_ROOT):/io quay.io/pypa/manylinux1_x86_64 /io/.travis/build_wheels.sh
ls wheelhouse/
mkdir -p $(DIST_DIR)
mv -v wheelhouse/* $(DIST_DIR)
docker run --rm -t -v $(REPO_ROOT):/io quay.io/pypa/manylinux1_x86_64 /io/.travis/build_wheels.sh /io/$(PYTHON_CLIENT_DIR) requierements.txt
cp -v wheelhouse/* $(DIST_DIR)
docker run --rm -t -v $(REPO_ROOT):/io quay.io/pypa/manylinux1_x86_64 /io/.travis/build_wheels_skyapi.sh
mkdir -p $(PYTHON_CLIENT_DIR)/$(DIST_DIR)
mv -v wheelhouse/* $(PYTHON_CLIENT_DIR)/$(DIST_DIR)
cp -v $(PYTHON_CLIENT_DIR)/wheelhouse/* $(PYTHON_CLIENT_DIR)/$(DIST_DIR)
ls $(PYTHON_CLIENT_DIR)/wheelhouse/


bdist_manylinux_i686: ## Create 32 bits multilinux binary wheel distribution archives
docker pull quay.io/pypa/manylinux1_i686
docker run --rm -t -v $(REPO_ROOT):/io quay.io/pypa/manylinux1_i686 linux32 /io/.travis/build_wheels.sh /io/ requierements.dev.txt
ls wheelhouse/
mkdir -p $(DIST_DIR)
mv -v wheelhouse/* $(DIST_DIR)
docker run --rm -t -v $(REPO_ROOT):/io quay.io/pypa/manylinux1_i686 linux32 /io/.travis/build_wheels.sh /io/$(PYTHON_CLIENT_DIR) requierements.txt
mkdir -p $(PYTHON_CLIENT_DIR)/$(DIST_DIR)
mv -v wheelhouse/* $(PYTHON_CLIENT_DIR)/$(DIST_DIR)
docker run --rm -t -v $(REPO_ROOT):/io quay.io/pypa/manylinux1_i686 linux32 /io/.travis/build_wheels.sh
ls wheelhouse/
mkdir -p $(DIST_DIR)
cp -v wheelhouse/* $(DIST_DIR)
docker run --rm -t -v $(REPO_ROOT):/io quay.io/pypa/manylinux1_i686 linux32 /io/.travis/build_wheels_skyapi.sh
mkdir -p $(PYTHON_CLIENT_DIR)/$(DIST_DIR)
cp -v $(PYTHON_CLIENT_DIR)/wheelhouse/* $(PYTHON_CLIENT_DIR)/$(DIST_DIR)
ls $(PYTHON_CLIENT_DIR)/wheelhouse/

dist: sdist bdist_wheel bdist_manylinux_amd64 ## Create distribution archives

Expand Down

0 comments on commit 2bec07b

Please sign in to comment.