From e298b0fa9e5085758d46d0b1cb6f595aca1f16d7 Mon Sep 17 00:00:00 2001 From: Tyler Hobbs Date: Fri, 16 Aug 2013 16:05:09 -0500 Subject: [PATCH] 1.0.0-beta1 release --- CHANGELOG.rst | 3 +++ README-dev.rst | 50 +++++++++++++++++++++++++++++++++++++++++++ README.rst | 41 ++++++++++++++++------------------- cassandra/__init__.py | 2 +- setup.py | 7 +++++- 5 files changed, 78 insertions(+), 25 deletions(-) create mode 100644 CHANGELOG.rst create mode 100644 README-dev.rst diff --git a/CHANGELOG.rst b/CHANGELOG.rst new file mode 100644 index 00000000..d39ecdca --- /dev/null +++ b/CHANGELOG.rst @@ -0,0 +1,3 @@ +1.0.0-beta +========== +Initial release diff --git a/README-dev.rst b/README-dev.rst new file mode 100644 index 00000000..e7fb87c0 --- /dev/null +++ b/README-dev.rst @@ -0,0 +1,50 @@ +Releasing +========= +* Run the tests and ensure they all pass +* Update CHANGELOG.rst +* Update the version in ``cassandra/__init__.py`` +* Commit the changelog and version changes +* Tag the release. For example: ``git tag -a 1.0.0 -m 'version 1.0.0'`` +* Push the commit and tag: ``git push --tags origin master`` +* Upload the package to pypi: + + python setup.py register + python setup.py sdist upload + +* Update the docs (see below) +* Add a '+' to the version in ``cassandra/__init__.py`` so that it looks + like ``x.y.z+`` +* Commit and push + +Running the Tests +================= +In order for the extensions to be built and used in the test, run: + + python setup.py nosetests + +Building the Docs +================= +Sphinx is required to build the docs. You probably want to install through apt, +if possible: + + $ sudo apt-get install python-sphinx + +pip may also work: + + $ sudo pip install -U Sphinx + +To build the docs, run: + + python setup.py doc + +To upload the docs, checkout the ``gh-pages`` branch (it's usually easier to +clone a second copy of this repo and leave it on that branch) and copy the entire +contents all of ``docs/_build/X.Y.Z/*`` into the root of the ``gh-pages`` branch +and then push that branch to github. + +For example: + + $ python setup.py doc + $ cp -R docs/_build/1.0.0-beta1/* ~/python-driver-docs/ + $ cd ~/python-driver-docs + $ git push origin gh-pages diff --git a/README.rst b/README.rst index d34c25a4..caf85b33 100644 --- a/README.rst +++ b/README.rst @@ -26,12 +26,17 @@ Features to be Added Installation ------------ -A package hasn't been put on pypi yet, so for now, run: +If you would like to use the optional C extensions, please follow +the instructions in the section below before installing the driver. - .. code-block:: bash +Installation through pip is recommended: - $ sudo pip install futures scales # install dependencies - $ sudo python setup.py install + $ sudo pip install cassandra-driver + +If you want to install manually, you can instead do: + + $ sudo pip install futures scales # install dependencies + $ sudo python setup.py install C Extensions ^^^^^^^^^^^^ @@ -47,15 +52,11 @@ To compile the extenions, ensure that GCC and the Python headers are available. On Ubuntu and Debian, this can be accomplished by running: - .. code-block:: bash - - $ sudo apt-get install build-essential python-dev + $ sudo apt-get install build-essential python-dev On RedHat and RedHat-based systems like CentOS and Fedora: - .. code-block:: bash - - $ sudo yum install gcc python-devel + $ sudo yum install gcc python-devel On OS X, homebrew installations of Python should provide the necessary headers. @@ -68,29 +69,23 @@ a C extension. If you're on Linux, you should be able to install libev through a package manager. For example, on Debian/Ubuntu: - .. code-block:: bash - - $ sudo apt-get install libev4 libev-dev + $ sudo apt-get install libev4 libev-dev If you're on Mac OS X, you should be able to install libev through `Homebrew `_. For example, on Mac OS X: - .. code-block:: bash - - $ brew install libev + $ brew install libev If successful, you should be able to build and install the extension (just using ``setup.py build`` or ``setup.py install``) and then use the libev event loop by doing the following - .. code-block:: python + >>> from cassandra.io.libevreactor import LibevConnection + >>> from cassandra.cluster import Cluster - >>> from cassandra.io.libevreactor import LibevConnection - >>> from cassandra.cluster import Cluster - - >>> cluster = Cluster() - >>> cluster.connection_class = LibevConnection - >>> session = cluster.connect() + >>> cluster = Cluster() + >>> cluster.connection_class = LibevConnection + >>> session = cluster.connect() License ------- diff --git a/cassandra/__init__.py b/cassandra/__init__.py index 957d24e9..3cb517a0 100644 --- a/cassandra/__init__.py +++ b/cassandra/__init__.py @@ -1,4 +1,4 @@ -__version_info__ = (0, 1, 4) +__version_info__ = (1, 0, '0-beta1') __version__ = '.'.join(map(str, __version_info__)) diff --git a/setup.py b/setup.py index 7e937b47..af356563 100644 --- a/setup.py +++ b/setup.py @@ -20,6 +20,9 @@ from distutils.cmd import Command from cassandra import __version__ +long_description = "" +with open("README.rst") as f: + long_description = f.read() class doc(Command): @@ -166,9 +169,11 @@ The optional C extensions are not supported on big-endian systems. features = {} setup( - name='cassandra', + name='cassandra-driver', version=__version__, description='Python driver for Cassandra', + long_description=long_description, + url='http://github.com/datastax/python-driver', author='Tyler Hobbs', author_email='tyler@datastax.com', packages=["cassandra", "cassandra.io"],