Skip to content

Commit 335d52e

Browse files
committed
Use cibuildwheel for building manylinux and osx wheels on travis
1 parent c9b20bf commit 335d52e

File tree

5 files changed

+81
-23
lines changed

5 files changed

+81
-23
lines changed

.appveyor-disabled.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
environment:
2+
global:
3+
CIBW_TEST_REQUIRES: pytest requests avro
4+
CIBW_TEST_COMMAND: "pytest --import-mode=append --ignore={project}\\tests\\avro {project}\\tests"
5+
# SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
6+
# /E:ON and /V:ON options are not enabled in the batch script intepreter
7+
# See: http://stackoverflow.com/a/13751649/163740
8+
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\tools\\appveyor\\run_with_env.cmd"
9+
10+
#install:
11+
12+
build_script:
13+
- dir c:\python27
14+
- dir c:\python27\include
15+
- "curl https://raw.githubusercontent.com/chemeris/msinttypes/master/inttypes.h -o c:\\python27\\include\\inttypes.h"
16+
- "curl https://raw.githubusercontent.com/chemeris/msinttypes/master/stdint.h -o c:\\python27\\include\\stdint.h"
17+
- nuget install librdkafka.redist -OutputDirectory dest
18+
- pip install https://github.com/joerick/cibuildwheel/archive/master.zip
19+
- set INCLUDE=C:\\projects\\confluent-kafka-python\\dest\\librdkafka.redist.0.11.0\\build\\native\\include\\;%INCLUDE%
20+
- set LIB=C:\\projects\\confluent-kafka-python\\dest\\librdkafka.redist.0.11.0\\runtimes\\win7-x64\\native;%LIB%
21+
- cibuildwheel --output-dir wheelhouse
22+
23+
artifacts:
24+
- path: "wheelhouse\\*.whl"
25+
name: Wheels

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ confluent?kafka.egg-info
1212
*.pyc
1313
.cache
1414
*.log
15-
confluent-kafka-0.*.*
15+
confluent-kafka-*.*.*
1616
tmp-build
1717
.tox
18-
wheelhouse
18+
wheelhouse
19+
dl-*

.travis.yml

Lines changed: 38 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,40 @@
1-
language: python
2-
sudo: required
3-
python:
4-
- "2.7"
5-
- "3.4"
6-
- "3.5"
7-
env:
8-
global:
9-
- LD_LIBRARY_PATH=$PWD/tmp-build/lib
10-
matrix:
11-
- LIBRDKAFKA_VERSION=v0.9.2
12-
- LIBRDKAFKA_VERSION=master
13-
before_install:
14-
- rm -rf tmp-build
15-
- bash tools/bootstrap-librdkafka.sh ${LIBRDKAFKA_VERSION} tmp-build
16-
- pip install --upgrade pip
17-
- pip install pytest-timeout
1+
#env:
2+
# global:
3+
# Wheel tests are not working due to some .cimpl import weirdness.
4+
#- CIBW_TEST_REQUIRES="pytest requests avro"
5+
#- CIBW_TEST_COMMAND="pytest {project}/tests"
6+
7+
matrix:
8+
include:
9+
- os: osx
10+
env: CIBW_BEFORE_BUILD="tools/bootstrap-librdkafka.sh master tmp" CFLAGS="-Itmp/include" LDFLAGS="-Ltmp/lib"
11+
- os: linux
12+
dist: trusty
13+
sudo: required
14+
env: CIBW_BEFORE_BUILD="tools/bootstrap-librdkafka.sh master /usr"
15+
language: python
16+
python: "2.7"
17+
services: docker
18+
1819
install:
19-
- pip install flake8
20-
- pip install -v --global-option=build_ext --global-option="-Itmp-build/include/" --global-option="-Ltmp-build/lib" . .[avro]
20+
- pip install cibuildwheel==0.4.1
21+
2122
script:
22-
- flake8
23-
- py.test -v --timeout 20 --ignore=tmp-build --import-mode append
23+
- cibuildwheel --output-dir wheelhouse
24+
- ls -la wheelhouse/
25+
26+
deploy:
27+
provider: s3
28+
access_key_id:
29+
secure: TWG1fsfD+kWkTHB5RQNW9HDw6i7j7WlYs5oTPLLevOjFmuYhG4qCylp9ZYGqjMzL8Jl4MxydmNDSL/gXYDnNplOX9CA1qbp/pKIG1AjTda12JM6mxs9uZNUOrl4FYRteSfPP+N+25VhPA+ix8ffC/jZ/9wypdQMorn5aC6Ln0LlR3ZdG+JeiOdX2JeqO7d429iDyT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5UZb21pI7oL6eE3HaeH20Ob6c8ELvWskM24EzS7baSJbrzatFtDw8hi0W3eeYIPqoeKC2btUavNnDkkP5mKPYQv0dsy754Yg3956SJw=
32+
bucket: librdkafka-ci-packages
33+
region: us-west-1
34+
local-dir: wheelhouse
35+
upload-dir: confluent-kafka-python/p-confluent-kafka-python__bld-travis__plat-${TRAVIS_OS_NAME}__tag-${TRAVIS_TAG}__sha-${TRAVIS_COMMIT}__bid-${TRAVIS_BUILD_ID}__
36+
acl: public_read
37+
skip_cleanup: true
38+
on:
39+
repo: confluentinc/confluent-kafka-python
40+
branch: manylinux_test

tools/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Tools
2+
3+
4+
## download-s3.py
5+
6+
To download CI build artifacts from S3, set up your AWS credentials
7+
and run `tools/download-s3.py <tag|sha1>`, the artifacts will be downloaded
8+
into `dl-<tag|sha1>`.
9+
10+
To upload packages to PyPi (test.pypi.org in this example to be safe), do:
11+
12+
$ twine upload -r test dl-<tag|sha1>/*
13+

tools/bootstrap-librdkafka.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ test -f configure ||
2929
curl -sL "https://github.com/edenhill/librdkafka/archive/${VERSION}.tar.gz" | \
3030
tar -xz --strip-components=1 -f -
3131

32+
./configure --clean
33+
make clean
3234
./configure --prefix="$PREFIXDIR"
3335
make -j
3436
make install

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy