Skip to content

Commit ae2878f

Browse files
authored
Merge pull request confluentinc#243 from confluentinc/manylinux_test
Build autonomous binary wheels for Linux and OSX
2 parents 960e455 + 0f3a213 commit ae2878f

15 files changed

+1243
-268
lines changed

.appveyor-disabled.yml

+25
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

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +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
19+
dl-*

.travis.yml

+60-21
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,62 @@
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+
matrix:
2+
include:
3+
# Source package verification with Python 2.7 and librdkafka master
4+
- os: linux
5+
language: python
6+
dist: trusty
7+
python: "2.7"
8+
env: LD_LIBRARY_PATH="$PWD/tmp-build/lib" LIBRDKAFKA_VERSION=master
9+
# Source package verification with Python 2.7 and librdkafka v0.9.2
10+
- os: linux
11+
language: python
12+
dist: trusty
13+
python: "2.7"
14+
env: LD_LIBRARY_PATH="$PWD/tmp-build/lib" LIBRDKAFKA_VERSION=v0.9.2
15+
# Source package verification with Python 3.5 and librdkafka master
16+
- os: linux
17+
language: python
18+
dist: trusty
19+
python: "3.5"
20+
env: LD_LIBRARY_PATH="$PWD/tmp-build/lib" LIBRDKAFKA_VERSION=v0.9.2
21+
# cibuildwheel for osx
22+
- os: osx
23+
env: CIBW_BEFORE_BUILD="tools/bootstrap-librdkafka.sh --require-ssl master tmp" CFLAGS="-Itmp/include" LDFLAGS="-Ltmp/lib"
24+
# cibuildwheel for manylinux
25+
- os: linux
26+
dist: trusty
27+
sudo: required
28+
env: CIBW_BEFORE_BUILD="tools/prepare-cibuildwheel-linux.sh master"
29+
language: python
30+
python: "2.7"
31+
services: docker
32+
1833
install:
19-
- pip install flake8
20-
- pip install -v --global-option=build_ext --global-option="-Itmp-build/include/" --global-option="-Ltmp-build/lib" . .[avro]
34+
- if [[ -z $CIBW_BEFORE_BUILD ]]; then rm -rf tmp-build ; tools/bootstrap-librdkafka.sh --require-ssl ${LIBRDKAFKA_VERSION} tmp-build ; fi
35+
- if [[ -z $CIBW_BEFORE_BUILD ]]; then pip install --upgrade pip && pip install pytest-timeout flake8 ; fi
36+
- if [[ -n $TRAVIS_TAG && -n $CIBW_BEFORE_BUILD ]]; then pip install cibuildwheel==0.4.1 ; fi
37+
38+
2139
script:
22-
- flake8
23-
- py.test -v --timeout 20 --ignore=tmp-build --import-mode append
40+
- if [[ -z $CIBW_BEFORE_BUILD ]]; then pip install -v --global-option=build_ext --global-option="-Itmp-build/include/" --global-option="-Ltmp-build/lib" . .[avro] ; fi
41+
- if [[ -z $CIBW_BEFORE_BUILD ]]; then flake8 ; fi
42+
- if [[ -z $CIBW_BEFORE_BUILD ]]; then py.test -v --timeout 20 --ignore=tmp-build --import-mode append ; fi
43+
- if [[ -n $TRAVIS_TAG && -n $CIBW_BEFORE_BUILD ]]; then cibuildwheel --output-dir wheelhouse ; ls -la wheelhouse/ ; fi
44+
- if [[ -n $TRAVIS_TAG && $TRAVIS_OS_NAME == linux && -n $CIBW_BEFORE_BUILD ]]; then tools/test-manylinux.sh ; fi
45+
46+
47+
deploy:
48+
provider: s3
49+
access_key_id:
50+
secure: TWG1fsfD+kWkTHB5RQNW9HDw6i7j7WlYs5oTPLLevOjFmuYhG4qCylp9ZYGqjMzL8Jl4MxydmNDSL/gXYDnNplOX9CA1qbp/pKIG1AjTda12JM6mxs9uZNUOrl4FYRteSfPP+N+25VhPA+ix8ffC/jZ/9wypdQMorn5aC6Ln0LlR3ZdG+JeiOdX2JeqO7d429iDyTzFWYZKJssW8GHGQj07OSVc3vQWBCUPJOaaVRsALKa3VZJgVXooXsjI2SORSnC4GAJhVgqzHLcs7AFVNaS2rrlF23mRcN8ePEnS76uIVk7Y2K90OeHcPgFfsTqrxFuLtHZYY68H2os+DamiERxD2xDpM28G2f3Ltb/bG7NGhuv0YHFWtwCbzB+aSJbGtUuFKqwdOwnD2PnQsVU0aX8N1lna3Fv4WVBBNXNeyKD0fbNYcTPvaOm+KSxN5/0l/BKyohjrTcVsn+6ZLdE6D5A0JfaX4sc3Lv2X+sdIc1ZLOL1OWg3eE1z4aAtKu3da8sPcP2Rb5V18uF0cBICdWP6kKtjRr+meCGw9S0Z2P3I1OLj+KfKmjrqtI7KXUTsz03npwOkbmFVprS5cXoW54kKhjrf99OhBXX7LhwJ5oKokBIDeXmUdyA+ettq5+5w5J8GgQ4MxIoY+vhy/wmcuM3yieASiftRPLFyJTr9/I6i8=
51+
secret_access_key:
52+
secure: G3KBqzmG7HaBznDMwNRq0qGIWiF3n96RgRnZzyvSfhRSqZq2Vv8llFo5GuCE0azzLA6Iot33x+Rugba3PbLReYoFOO87yWYT62Deq+lTwQHSEutcA1tNrW4ho+GPs2av/AhHE9e2r/xhp++2wHEvnj7Vp1HeVcmpAxkggZDkiS15GYiaVNEUa8tPL6GOcH3e8Xwcurr7dAi6KZnBFvylx0eADVPH3EAfN8TxapkT89FKjEtPZOV/srSFi5m561rW/P4+MwzBu0x01ouANdAKoAhEMubcEHANr1x8yuXlr99eapqnbfYMpaITyDbKIDSV/mVR5e/9G6xQEXs59FJJJ1bRCLF9uxIht3rlijED7WEElHJ1j2Ip9JZH0iKEPykw9vGNnjUZK2Hw4D8MvD+6jHbauZGsTeqTbh74tGxsIe/tpAZ2kmueqdO5iYK/R8louWjgmwGf+veqqQXCUw0UBnJoL5x+axp5nszQiepU/EnnyJ5bH1IB5qRUqesTYFWU/dxF7JQYie1wuAqn3ag40ir/Vg8stfjyNk8Ht0Ajpp+rgODzuURDiGutiblVpXffh83R5UZb21pI7oL6eE3HaeH20Ob6c8ELvWskM24EzS7baSJbrzatFtDw8hi0W3eeYIPqoeKC2btUavNnDkkP5mKPYQv0dsy754Yg3956SJw=
53+
bucket: librdkafka-ci-packages
54+
region: us-west-1
55+
local-dir: wheelhouse
56+
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}__
57+
acl: public_read
58+
skip_cleanup: true
59+
on:
60+
repo: confluentinc/confluent-kafka-python
61+
tags: true
62+
condition: "-n $CIBW_BEFORE_BUILD"

LICENSE

-202
This file was deleted.

0 commit comments

Comments
 (0)