From 3193d64e70c91d3cad64b0cec1b180a7a1c67ed0 Mon Sep 17 00:00:00 2001 From: John Anderson Date: Tue, 10 Feb 2015 11:26:56 -0800 Subject: [PATCH 1/5] Move to .rst and use it in setup.py for long description --- README.md => README.rst | 23 +++++++++++++++++------ setup.py | 15 +++++++-------- 2 files changed, 24 insertions(+), 14 deletions(-) rename README.md => README.rst (51%) diff --git a/README.md b/README.rst similarity index 51% rename from README.md rename to README.rst index 2bf196539..58814f06b 100644 --- a/README.md +++ b/README.rst @@ -1,10 +1,18 @@ -# Kafka Python client +Kafka Python client +------------------------ +.. image:: https://api.travis-ci.org/mumrah/kafka-python.png?branch=master + :target: https://travis-ci.org/mumrah/kafka-pytho + :alt: Build Status -[![Build Status](https://api.travis-ci.org/mumrah/kafka-python.png?branch=master)](https://travis-ci.org/mumrah/kafka-python) -[![Coverage Status](https://coveralls.io/repos/mumrah/kafka-python/badge.svg?branch=master)](https://coveralls.io/r/mumrah/kafka-python?branch=master) -[![Full documentation available on ReadTheDocs](https://readthedocs.org/projects/kafka-python/badge/?version=latest)](https://readthedocs.org/projects/kafka-python/?badge=latest) +.. image:: https://api.travis-ci.org/mumrah/kafka-python.png?branch=master + :target: https://coveralls.io/repos/mumrah/kafka-python/badge.svg?branch=master + :alt: Coverage Status -[Full documentation available on ReadTheDocs](http://kafka-python.readthedocs.org/en/latest/) +.. image:: https://readthedocs.org/projects/kafka-python/badge/?version=latest + :target: http://kafka-python.readthedocs.org/en/latest/ + :alt: Full documentation available on ReadTheDocs + +`Full documentation available on ReadTheDoc`_ This module provides low-level protocol support for Apache Kafka as well as high-level consumer and producer classes. Request batching is supported by the @@ -24,7 +32,7 @@ Copyright 2015, David Arthur under Apache License, v2.0. See `LICENSE` # Status -The current stable version of this package is [**0.9.3**](https://github.com/mumrah/kafka-python/releases/tag/v0.9.3) and is compatible with +The current stable version of this package is **`0.9.3`_** and is compatible with: Kafka broker versions - 0.8.2.0 [offset management currently ZK only -- does not support ConsumerCoordinator offset management APIs] @@ -38,3 +46,6 @@ Python versions - 3.3 (tested on 3.3.5) - 3.4 (tested on 3.4.2) - pypy (tested on pypy 2.4.0 / python 2.7.8) + +.. _Full documentation available on ReadTheDocs: http://kafka-python.readthedocs.org/en/latest/ +.. _0.9.3: https://github.com/mumrah/kafka-python/releases/tag/v0.9.3 diff --git a/setup.py b/setup.py index 4b1e18ee1..5bdff6502 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,5 @@ import sys - +import os from setuptools import setup, Command with open('VERSION', 'r') as v: @@ -26,6 +26,10 @@ def run(cls): if sys.version_info < (2, 7): test_require.append('unittest2') +here = os.path.abspath(os.path.dirname(__file__)) + +with open(os.path.join(here, 'README.rst')) as f: + README = f.read() setup( name="kafka-python", @@ -46,15 +50,10 @@ def run(cls): url="https://github.com/mumrah/kafka-python", license="Apache License 2.0", description="Pure Python client for Apache Kafka", - long_description=""" -This module provides low-level protocol support for Apache Kafka as well as -high-level consumer and producer classes. Request batching is supported by the -protocol as well as broker-aware request routing. Gzip and Snappy compression -is also supported for message sets. -""", + long_description=README, keywords="apache kafka", install_requires=['six'], - classifiers = [ + classifiers=[ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", From f6c67aef4f38b6adebe060fd67e150895ba2db4d Mon Sep 17 00:00:00 2001 From: John Anderson Date: Tue, 10 Feb 2015 11:30:21 -0800 Subject: [PATCH 2/5] Cleaned up some formatting --- README.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.rst b/README.rst index 58814f06b..5f128c8e7 100644 --- a/README.rst +++ b/README.rst @@ -1,7 +1,7 @@ Kafka Python client ------------------------ .. image:: https://api.travis-ci.org/mumrah/kafka-python.png?branch=master - :target: https://travis-ci.org/mumrah/kafka-pytho + :target: https://travis-ci.org/mumrah/kafka-python :alt: Build Status .. image:: https://api.travis-ci.org/mumrah/kafka-python.png?branch=master @@ -12,7 +12,7 @@ Kafka Python client :target: http://kafka-python.readthedocs.org/en/latest/ :alt: Full documentation available on ReadTheDocs -`Full documentation available on ReadTheDoc`_ +`Full documentation available on ReadTheDocs`_ This module provides low-level protocol support for Apache Kafka as well as high-level consumer and producer classes. Request batching is supported by the @@ -26,13 +26,13 @@ On Freenode IRC at #kafka-python, as well as #apache-kafka For general discussion of kafka-client design and implementation (not python specific), see https://groups.google.com/forum/#!forum/kafka-clients -# License - +License +---------- Copyright 2015, David Arthur under Apache License, v2.0. See `LICENSE` -# Status - -The current stable version of this package is **`0.9.3`_** and is compatible with: +Status +---------- +The current stable version of this package is **0.9.3_** and is compatible with: Kafka broker versions - 0.8.2.0 [offset management currently ZK only -- does not support ConsumerCoordinator offset management APIs] From 2462b878539a0ff56600dfd831b76c28d911d840 Mon Sep 17 00:00:00 2001 From: John Anderson Date: Tue, 10 Feb 2015 11:32:40 -0800 Subject: [PATCH 3/5] More formatting cleanup --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 5f128c8e7..51a866dfe 100644 --- a/README.rst +++ b/README.rst @@ -4,7 +4,7 @@ Kafka Python client :target: https://travis-ci.org/mumrah/kafka-python :alt: Build Status -.. image:: https://api.travis-ci.org/mumrah/kafka-python.png?branch=master +.. image:: https://coveralls.io/r/mumrah/kafka-python?branch=master :target: https://coveralls.io/repos/mumrah/kafka-python/badge.svg?branch=master :alt: Coverage Status @@ -32,7 +32,7 @@ Copyright 2015, David Arthur under Apache License, v2.0. See `LICENSE` Status ---------- -The current stable version of this package is **0.9.3_** and is compatible with: +The current stable version of this package is `0.9.3`_ and is compatible with: Kafka broker versions - 0.8.2.0 [offset management currently ZK only -- does not support ConsumerCoordinator offset management APIs] From 55f5e77421478c635a778ac98b88fb53faba6396 Mon Sep 17 00:00:00 2001 From: John Anderson Date: Tue, 10 Feb 2015 11:34:12 -0800 Subject: [PATCH 4/5] Final formatting --- README.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 51a866dfe..5405f9244 100644 --- a/README.rst +++ b/README.rst @@ -4,8 +4,8 @@ Kafka Python client :target: https://travis-ci.org/mumrah/kafka-python :alt: Build Status -.. image:: https://coveralls.io/r/mumrah/kafka-python?branch=master - :target: https://coveralls.io/repos/mumrah/kafka-python/badge.svg?branch=master +.. image:: https://coveralls.io/repos/mumrah/kafka-python/badge.svg?branch=master + :target: https://coveralls.io/r/mumrah/kafka-python?branch=master :alt: Coverage Status .. image:: https://readthedocs.org/projects/kafka-python/badge/?version=latest @@ -35,12 +35,14 @@ Status The current stable version of this package is `0.9.3`_ and is compatible with: Kafka broker versions + - 0.8.2.0 [offset management currently ZK only -- does not support ConsumerCoordinator offset management APIs] - 0.8.1.1 - 0.8.1 - 0.8.0 Python versions + - 2.6 (tested on 2.6.9) - 2.7 (tested on 2.7.9) - 3.3 (tested on 3.3.5) From 96bc453da96287915a25989ac525c8c8f10b5b99 Mon Sep 17 00:00:00 2001 From: John Anderson Date: Tue, 10 Feb 2015 11:37:55 -0800 Subject: [PATCH 5/5] Added py3 to classifiers --- setup.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup.py b/setup.py index 5bdff6502..f1c195408 100644 --- a/setup.py +++ b/setup.py @@ -61,6 +61,9 @@ def run(cls): "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.3", + "Programming Language :: Python :: 3.4", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries :: Python Modules", ]