Skip to content

Commit

Permalink
Fixes and documentation for building wheels (#56)
Browse files Browse the repository at this point in the history
* Fix Python 3.5 compatibility

* Fix script to build wheels

* Add docs for building wheels
  • Loading branch information
pschafhalter authored and ICGog committed Jan 18, 2020
1 parent 492fc9f commit 86e4c0b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Cargo.lock
__pycache__
/env
*.pyc
dist

# Editor files
.vscode
Expand Down
15 changes: 15 additions & 0 deletions python/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# ERDOS Python Interface

## Building Wheels

Use the [manylinux1](https://github.com/pypa/manylinux) docker container
to generate wheels for ERDOS.

Navigate to the project root and run the following command to build ERDOS
wheels for x86-64:

```console
docker run -it -v $(pwd):/io quay.io/pypa/manylinux1_x86_64 bash io/python/build-wheels.sh
```

The wheels will appear in the `dist` folder in the project root.
10 changes: 5 additions & 5 deletions python/build-wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ export PATH="$HOME/.cargo/bin:$PATH"

cd /io

for PYBIN in /opt/python/{cp27-cp27m,cp27-cp27mu,cp35-cp35m,cp36-cp36m,cp37-cp37m}/bin; do
for PYBIN in /opt/python/{cp35-cp35m,cp36-cp36m,cp37-cp37m}/bin; do
export PYTHON_SYS_EXECUTABLE="$PYBIN/python"

"${PYBIN}/pip" install -U setuptools wheel setuptools-rust
"${PYBIN}/python" setup.py bdist_wheel
# Require wheel==0.31.1 because auditwheel breaks on newer versions
"${PYBIN}/pip" install -U setuptools wheel==0.31.1 setuptools-rust
"${PYBIN}/python" python/setup.py bdist_wheel
done

for whl in dist/*.whl; do
auditwheel repair "$whl" -w dist/
done
done

0 comments on commit 86e4c0b

Please sign in to comment.