From 2bec07b6d524cab883d661b8f04eb3c12a0f3cc0 Mon Sep 17 00:00:00 2001 From: Raul Date: Wed, 10 Jul 2019 01:17:30 -0400 Subject: [PATCH] [skyapi] refs #131 separating the manylinux wheels build of pyskycoin and skyapi --- .travis/build_wheels_skyapi.sh | 30 ++++++++++++++++++++++++++++++ Makefile | 21 ++++++++++----------- 2 files changed, 40 insertions(+), 11 deletions(-) create mode 100755 .travis/build_wheels_skyapi.sh diff --git a/.travis/build_wheels_skyapi.sh b/.travis/build_wheels_skyapi.sh new file mode 100755 index 00000000..ccf50080 --- /dev/null +++ b/.travis/build_wheels_skyapi.sh @@ -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 + diff --git a/Makefile b/Makefile index c4a6c2f4..e383e58c 100644 --- a/Makefile +++ b/Makefile @@ -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