Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ confluent?kafka.egg-info
.cache
*.log
confluent-kafka-0.*.*
tmp-build
.tox
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
language: python
python:
- "2.7"
- "3.4"
before_install:
- bash tools/bootstrap-librdkafka.sh v0.9.2 tmp-build
install:
- pip install -v --global-option=build_ext --global-option="-Itmp-build/include/" --global-option="-Ltmp-build/lib" .
env:
- LD_LIBRARY_PATH=$PWD/tmp-build/lib
script: py.test --ignore=tmp-build
36 changes: 36 additions & 0 deletions tools/bootstrap-librdkafka.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash
#
#
# Downloads, builds and installs librdkafka into <install-dir>
#

set -e

VERSION=$1
PREFIXDIR=$2

if [[ -z "$VERSION" ]]; then
echo "Usage: $0 <librdkafka-version> [<install-dir>]" 1>&2
exit 1
fi

if [[ -z "$PREFIXDIR" ]]; then
PREFIXDIR=tmp-build
fi

if [[ $PREFIXDIR != /* ]]; then
PREFIXDIR="$PWD/$PREFIXDIR"
fi

mkdir -p "$PREFIXDIR/librdkafka"
pushd "$PREFIXDIR/librdkafka"

test -f configure ||
curl -sL "https://github.com/edenhill/librdkafka/archive/${VERSION}.tar.gz" | \
tar -xz --strip-components=1 -f -

./configure --prefix="$PREFIXDIR"
make -j
make install
popd