From 70acd2709d329402ecb83a7641d377cfdb17d9cb Mon Sep 17 00:00:00 2001 From: Daniel Hershcovich Date: Thu, 31 Aug 2017 14:03:49 +0300 Subject: [PATCH] Fix #657: build and deploy Python wheels to PyPI --- deploy_wheels.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 deploy_wheels.sh diff --git a/deploy_wheels.sh b/deploy_wheels.sh new file mode 100644 index 000000000..ffddca2a6 --- /dev/null +++ b/deploy_wheels.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# Run this as: +# docker run -i -t -v `pwd`:/io quay.io/pypa/manylinux1_x86_64 deploy_wheels.sh +cd $HOME +EIGEN_COMMIT=51c95eb5952b +wget "https://bitbucket.org/eigen/eigen/get/${EIGEN_COMMIT}.zip" +unzip "${EIGEN_COMMIT}.zip" +mv "eigen-eigen-${EIGEN_COMMIT}" eigen +wget "https://repo.continuum.io/miniconda/Miniconda3-latest-${OS}-${MACHTYPE}.sh" -O miniconda.sh +bash miniconda.sh -b -p "$HOME/miniconda" +export PATH="$HOME/miniconda/bin:$PATH" LD_LIBRARY_PATH="$HOME/miniconda/lib:$LD_LIBRARY_PATH" CMAKE=cmake28 EIGEN3_INCLUDE_DIR="$HOME/eigen" +git clone https://github.com/clab/dynet +cd dynet +for PYTHON_VERSION in 2.7 3.3 3.4 3.5 3.6; do + conda create -n "$PYTHON_VERSION" anaconda python="$PYTHON_VERSION" + activate "$PYTHON_VERSION" + pip install cython auditwheel + python setup.py bdist_wheel + auditwheel repair dist/dyNET-*-"cp${PYTHON_VERSION/./}-cp${PYTHON_VERSION/./}m-${OSTYPE}_${MACHTYPE}".whl +done +pip install twine +twine upload dist/*