-
Notifications
You must be signed in to change notification settings - Fork 703
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #657: build and deploy Python wheels to PyPI
- Loading branch information
1 parent
37f61e6
commit 123aac1
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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_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/* |