Skip to content

Commit

Permalink
Fix clab#657: build and deploy Python wheels to PyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhers committed Aug 31, 2017
1 parent feb01a1 commit 3f5cdba
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions deploy_wheels.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

# Run this as:
# docker run -i -t -v `pwd`:/io quay.io/pypa/manylinux1_x86_64 deploy.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/*

0 comments on commit 3f5cdba

Please sign in to comment.