Skip to content

Commit 18501e4

Browse files
committed
Add changes to build arm64 wheels
Update setup tools to fix build error in `python setup.py egg_info` Update greenlet version to fix build error in `tox -e gevent_loop`
1 parent 15d715f commit 18501e4

File tree

3 files changed

+54
-10
lines changed

3 files changed

+54
-10
lines changed

.travis.yml

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
11
dist: xenial
2-
sudo: false
3-
42
language: python
5-
python:
6-
- "2.7"
7-
- "3.5"
8-
- "3.6"
9-
- "3.7"
10-
- "pypy2.7-6.0"
11-
- "pypy3.5"
3+
os: linux
4+
services: docker
125

136
env:
14-
- CASS_DRIVER_NO_CYTHON=1
7+
global:
8+
- CASS_DRIVER_NO_CYTHON=1
159

1610
addons:
1711
apt:
@@ -24,10 +18,46 @@ addons:
2418
- libev-dev
2519

2620
install:
21+
- pip install --upgrade setuptools
2722
- pip install tox-travis
2823
- if [[ $TRAVIS_PYTHON_VERSION != pypy3.5 ]]; then pip install lz4; fi
24+
- if [[ $PLAT == aarch64 ]]; then uname -m; docker pull $DOCKER_IMAGE; fi
2925

3026
script:
3127
- tox
3228
- tox -e gevent_loop
3329
- tox -e eventlet_loop
30+
- if [[ $PLAT == aarch64 ]]; then docker run --rm -e PLAT=$PLAT -e PYTHON=$PYTHON -v $(realpath .):/src $DOCKER_IMAGE /src/build-arm64-wheels.sh; fi
31+
jobs:
32+
include:
33+
- arch: amd64
34+
python: "pypy2.7-6.0"
35+
36+
- arch: amd64
37+
python: "pypy3.5"
38+
39+
- arch: amd64
40+
python: "3.5"
41+
42+
- arch: amd64
43+
python: "2.7"
44+
45+
- arch: amd64
46+
python: "3.6"
47+
48+
- arch: amd64
49+
python: "3.7"
50+
51+
- arch: arm64
52+
python: "3.7"
53+
env:
54+
- DOCKER_IMAGE=quay.io/pypa/manylinux2014_aarch64
55+
- PLAT=aarch64
56+
- PYTHON=cp37-cp37m
57+
58+
- arch: arm64
59+
python: "3.8"
60+
env:
61+
- DOCKER_IMAGE=quay.io/pypa/manylinux2014_aarch64
62+
- PLAT=aarch64
63+
- PYTHON=cp38-cp38

build-arm64-wheels.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
set -e -u -x
3+
cd /src/
4+
5+
# Create binary wheels
6+
/opt/python/${PYTHON}/bin/pip wheel /src/ -w wheelhouse/
7+
8+
ls -lrt wheelhouse/
9+
10+
# Normalize resulting binaries to a common format
11+
for whl in wheelhouse/cassandra_driver-*.whl; do
12+
auditwheel repair "$whl" -w wheelhouse/
13+
done

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ deps = nose
1212
pure-sasl
1313
kerberos
1414
futurist
15+
greenlet>=0.4.14,<0.4.17
1516
lz4_dependency = py27,py35,py36,py37,py38: lz4
1617

1718
[testenv]

0 commit comments

Comments
 (0)