Skip to content

Commit 341fad4

Browse files
authored
Wheels (#40)
Added manylinux wheel builds and uploads. Updated travis cfg to use stages, build wheels. Added osx wheel build and upload. Added changelog.
1 parent 1a773b1 commit 341fad4

File tree

4 files changed

+108
-27
lines changed

4 files changed

+108
-27
lines changed

.travis.yml

Lines changed: 71 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,84 @@ sudo: required
44
notifications:
55
email: false
66
python:
7-
- 2.6
87
- 2.7
98
- 3.4
109
- 3.5
1110
- 3.6
1211
# - pypy
1312
env:
1413
- INFLUXDB_VERSION=1.2.2
15-
matrix:
16-
allow_failures:
17-
- python: 2.6
14+
jobs:
15+
include:
16+
- os: osx
17+
branches:
18+
# Hopefully this will work in future.
19+
only:
20+
- master
21+
- /^\d+\.\d+(\.\d+)?(-\S*)?$/
22+
before_install: skip
23+
install:
24+
- pip install -U delocate twine wheel pip setuptools
25+
- python setup.py bdist_wheel
26+
script:
27+
- delocate-listdeps --all dist/*.whl
28+
- delocate-wheel -v dist/*.whl
29+
- delocate-listdeps --all dist/*.whl
30+
- ls -l dist/
31+
- pip install -v dist/*.whl
32+
- pwd; mkdir temp; cd temp; pwd
33+
- python -c "from influxgraph.ext.nodetrie import Node; Node()"
34+
- cd ..; pwd
35+
after_success:
36+
- if [[ ! -z "$TRAVIS_TAG" ]]; then
37+
twine upload -u $PYPI_U -p $PYPI_P dist/*.whl;
38+
fi
39+
language: generic
40+
python: skip
41+
- stage: build wheels
42+
os: linux
43+
python: 3.6
44+
before_install: skip
45+
install:
46+
- pip install twine
47+
script:
48+
- if [[ ! -z "$TRAVIS_TAG" ]]; then
49+
echo "Building wheels for tag ${TRAVIS_TAG}" &&
50+
docker pull quay.io/pypa/manylinux1_x86_64 &&
51+
docker run --rm -v `pwd`:/io quay.io/pypa/manylinux1_x86_64 /io/ci/build-wheels.sh &&
52+
ls wheelhouse;
53+
fi
54+
after_success:
55+
- if [[ ! -z "$TRAVIS_TAG" ]]; then
56+
twine upload -u $PYPI_U -p $PYPI_P wheelhouse/*.whl;
57+
fi
58+
- stage: deploy PyPi
59+
before_install: skip
60+
install: skip
61+
script: skip
62+
deploy:
63+
provider: pypi
64+
on:
65+
tags: true
66+
repo: InfluxGraph/influxgraph
67+
distributions: sdist
68+
user: pkittenis
69+
password:
70+
secure: YjKb3mcrgeUmNFVzlJxBQcvTE//X8dERdVqQyqPYgNNMo/NZgR6++gzdYSB25AP14hlFXalGuRZ5x5/t0ngv+eDE2YeCczPtAWGS2KG+Tym6XaIMfLesQsfrJhIB+7pj5iWzXYxhyChKBjWLkM1sz3GhCPSMBngBim4uH24Fja3xIuCCi9dmCMxV/j2laCPwW870Lc/gR5kLLsS9Lf9tZmGz0t6yujRqfW3wtzbQZX0VVun5LaUo01l9Q6tIhEOLswjJt/jVjSqvG7NGap3EzIFtIIgiyx9yFRnpDdxeVEIbp/jyZJgWXM6Wx9VaGzQDBIJUHpF9ro5pEiFCXWrSE19L/Y+mVoZy6SwhI/RwVhmEoYuOguxbDtyQTewl0ldDo3nZ7H0v5xo2DEWqdcVOTGIBd9FErhXNOP3Nz35AiJj+ovnEl9jxJEQgZGXCQnFks/cHDjmENhXjPiqX6FJNohCp+hZmbx4OCZ5x98Zema9K8zN/UPNpxxZwA8zdR6rrQe8iVHZ34aber9gg0mmHkvw1zj9QxKjKDhZR7wvI2eBcUSYGyrqIXCOlTF5rXAIbJ/XGBuebkrMQStE/aPyv6NZQbCtszgPL6BTKgT69ADOm50twgjdews1lIlymI8cwasvoPkOLXebrjjiyAO6Xr/IiBdFQBpQ5aJR/pRnKje0=
71+
skip_upload_docs: true
72+
after_deploy:
73+
- docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" &&
74+
cd docker &&
75+
docker build -t ikuosu/influxgraph:${TRAVIS_TAG} . &&
76+
docker push ikuosu/influxgraph:${TRAVIS_TAG};
77+
after_success:
78+
- coveralls
79+
- if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]]; then
80+
docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" &&
81+
cd docker &&
82+
docker build -t ikuosu/influxgraph:latest . &&
83+
docker push ikuosu/influxgraph:latest;
84+
fi
1885
before_install:
1986
- pip install -U pip setuptools wheel
2087
- wget https://dl.influxdata.com/influxdb/releases/influxdb_${INFLUXDB_VERSION}_amd64.deb
@@ -34,26 +101,3 @@ script:
34101
services:
35102
- memcached
36103
- docker
37-
deploy:
38-
provider: pypi
39-
on:
40-
tags: true
41-
repo: InfluxGraph/influxgraph
42-
distributions: sdist
43-
user: pkittenis
44-
password:
45-
secure: YjKb3mcrgeUmNFVzlJxBQcvTE//X8dERdVqQyqPYgNNMo/NZgR6++gzdYSB25AP14hlFXalGuRZ5x5/t0ngv+eDE2YeCczPtAWGS2KG+Tym6XaIMfLesQsfrJhIB+7pj5iWzXYxhyChKBjWLkM1sz3GhCPSMBngBim4uH24Fja3xIuCCi9dmCMxV/j2laCPwW870Lc/gR5kLLsS9Lf9tZmGz0t6yujRqfW3wtzbQZX0VVun5LaUo01l9Q6tIhEOLswjJt/jVjSqvG7NGap3EzIFtIIgiyx9yFRnpDdxeVEIbp/jyZJgWXM6Wx9VaGzQDBIJUHpF9ro5pEiFCXWrSE19L/Y+mVoZy6SwhI/RwVhmEoYuOguxbDtyQTewl0ldDo3nZ7H0v5xo2DEWqdcVOTGIBd9FErhXNOP3Nz35AiJj+ovnEl9jxJEQgZGXCQnFks/cHDjmENhXjPiqX6FJNohCp+hZmbx4OCZ5x98Zema9K8zN/UPNpxxZwA8zdR6rrQe8iVHZ34aber9gg0mmHkvw1zj9QxKjKDhZR7wvI2eBcUSYGyrqIXCOlTF5rXAIbJ/XGBuebkrMQStE/aPyv6NZQbCtszgPL6BTKgT69ADOm50twgjdews1lIlymI8cwasvoPkOLXebrjjiyAO6Xr/IiBdFQBpQ5aJR/pRnKje0=
46-
skip_upload_docs: true
47-
after_deploy:
48-
- docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" &&
49-
cd docker &&
50-
docker build -t ikuosu/influxgraph:${TRAVIS_TAG} . &&
51-
docker push ikuosu/influxgraph:${TRAVIS_TAG};
52-
after_success:
53-
- coveralls
54-
- if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]]; then
55-
docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" &&
56-
cd docker &&
57-
docker build -t ikuosu/influxgraph:latest . &&
58-
docker push ikuosu/influxgraph:latest;
59-
fi

Changelog.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Change Log
2+
=============
3+
4+
1.4.0
5+
++++++
6+
7+
Release includes binary wheels for Linux and OSX.
8+
9+
Changes
10+
--------
11+
12+
* Config name of DB password - #39
13+
* Add config option for index lock file path - #37

README.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ An `InfluxDB`_ storage plugin for `Graphite-API`_. Graphite with InfluxDB data s
1515
.. image:: https://readthedocs.org/projects/influxgraph/badge/?version=latest
1616
:target: http://influxgraph.readthedocs.io/en/latest/?badge=latest
1717
:alt: Documentation Status
18+
.. image:: https://img.shields.io/pypi/wheel/influxgraph.svg
19+
:target: https://pypi.python.org/pypi/influxgraph
20+
.. image:: https://img.shields.io/pypi/pyversions/influxgraph.svg
21+
:target: https://pypi.python.org/pypi/influxgraph
1822

1923

2024
This project started as a re-write of `graphite influxdb <https://github.com/vimeo/graphite-influxdb>`_, now a separate project.

ci/build-wheels.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash -xe
2+
3+
yum install -y libffi-devel
4+
5+
# Compile wheels
6+
for PYBIN in /opt/python/*/bin; do
7+
"${PYBIN}/pip" install -r /io/requirements.txt
8+
"${PYBIN}/pip" wheel --no-deps /io/ -w wheelhouse/
9+
done
10+
11+
# Bundle external shared libraries into the wheels
12+
for whl in wheelhouse/*.whl; do
13+
auditwheel repair "$whl" -w /io/wheelhouse/
14+
done
15+
16+
# Install packages and test
17+
for PYBIN in /opt/python/*/bin; do
18+
"${PYBIN}/pip" install influxgraph --no-index -f /io/wheelhouse
19+
(cd "$HOME"; "${PYBIN}/python" -c 'from influxgraph.ext.nodetrie import Node; Node()')
20+
done

0 commit comments

Comments
 (0)