From 667a5cab50e387fbaec450ce3f0b061c93d17f30 Mon Sep 17 00:00:00 2001 From: paul cannon Date: Thu, 3 Apr 2014 11:49:10 -0600 Subject: [PATCH] Debian packaging --- debian/changelog | 5 +++ debian/compat | 1 + debian/control | 46 ++++++++++++++++++++ debian/copyright | 28 ++++++++++++ debian/patches/0001-don-t-use-ez_setup.patch | 40 +++++++++++++++++ debian/patches/series | 1 + debian/python-cassandra-driver-dbg.install | 2 + debian/python-cassandra-driver-doc.docs | 1 + debian/python-cassandra-driver.install | 4 ++ debian/rules | 16 +++++++ debian/source/format | 1 + 11 files changed, 145 insertions(+) create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/patches/0001-don-t-use-ez_setup.patch create mode 100644 debian/patches/series create mode 100644 debian/python-cassandra-driver-dbg.install create mode 100644 debian/python-cassandra-driver-doc.docs create mode 100644 debian/python-cassandra-driver.install create mode 100755 debian/rules create mode 100644 debian/source/format diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 00000000..c98ea8c9 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +python-cassandra-driver (1.1.0~prerelease-1) unstable; urgency=low + + * Initial packaging + + -- paul cannon Thu, 03 Apr 2014 10:30:11 -0600 diff --git a/debian/compat b/debian/compat new file mode 100644 index 00000000..ec635144 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 00000000..c13f4e86 --- /dev/null +++ b/debian/control @@ -0,0 +1,46 @@ +Source: python-cassandra-driver +Maintainer: paul cannon +Section: python +Priority: optional +Build-Depends: python-all-dev (>= 2.6.6-3), python-all-dbg, debhelper (>= 9), + python-sphinx (>= 1.0.7+dfsg) | python3-sphinx, libev-dev, + python-concurrent.futures | python-futures, python-setuptools, + python-nose, python-mock, python-yaml, python-gevent, + python-blist, python-tz +X-Python-Version: >= 2.7 +Standards-Version: 3.9.4 + +Package: python-cassandra-driver +Architecture: any +Depends: ${misc:Depends}, ${python:Depends}, ${shlibs:Depends}, python-blist, + python-concurrent.futures | python-futures +Provides: ${python:Provides} +Recommends: python-scales +Suggests: python-cassandra-driver-doc +Description: Python driver for Apache Cassandra + This driver works exclusively with the Cassandra Query Language v3 (CQL3) + and Cassandra's native protocol. As such, only Cassandra 1.2+ is supported. + +Package: python-cassandra-driver-dbg +Architecture: any +Depends: ${misc:Depends}, ${python:Depends}, ${shlibs:Depends}, + python-cassandra-driver (= ${binary:Version}) +Provides: ${python:Provides} +Section: debug +Priority: extra +Description: Python driver for Apache Cassandra (debug build and symbols) + This driver works exclusively with the Cassandra Query Language v3 (CQL3) + and Cassandra's native protocol. As such, only Cassandra 1.2+ is supported. + . + This package contains debug builds of the extensions and debug symbols for + the extensions in the main package. + +Package: python-cassandra-driver-doc +Architecture: all +Section: doc +Priority: extra +Depends: ${misc:Depends}, ${sphinxdoc:Depends} +Suggests: python-cassandra-driver +Description: Python driver for Apache Cassandra (documentation) + This contains HTML documentation for the use of the Python Cassandra + driver. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 00000000..f138547a --- /dev/null +++ b/debian/copyright @@ -0,0 +1,28 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: python-driver +Upstream-Contact: Tyler Hobbs +Source: https://github.com/datastax/python-driver + +Files: * +Copyright: Copyright 2013, DataStax +License: Apache-2.0 + +Files: debian/* +Copyright: Copyright (c) 2014 by Space Monkey, Inc. +License: Apache-2.0 + +License: Apache-2.0 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + http://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + On Debian systems, the full text of the Apache License version 2.0 + can be found in the file `/usr/share/common-licenses/Apache-2.0'. diff --git a/debian/patches/0001-don-t-use-ez_setup.patch b/debian/patches/0001-don-t-use-ez_setup.patch new file mode 100644 index 00000000..ece0bef8 --- /dev/null +++ b/debian/patches/0001-don-t-use-ez_setup.patch @@ -0,0 +1,40 @@ +From: paul cannon +Date: Thu, 3 Apr 2014 11:27:09 -0600 +Subject: don't use ez_setup + +Debian packages aren't supposed to download stuff while building, and +since the version of setuptools in stable is less than the one ez_setup +wants, and since some system python packages don't ship their .egg-info +directories, it might try. + +It's ok though, we can rely on the Depends and Build-Depends for making +sure python-setuptools and the various other deps are around at the right +times. +--- + setup.py | 7 ++----- + 1 file changed, 2 insertions(+), 5 deletions(-) + +diff --git a/setup.py b/setup.py +index 0c28d3d..c0fd6c1 100644 +--- a/setup.py ++++ b/setup.py +@@ -1,8 +1,5 @@ + import sys + +-import ez_setup +-ez_setup.use_setuptools() +- + if __name__ == '__main__' and sys.argv[1] == "gevent_nosetests": + from gevent.monkey import patch_all + patch_all() +@@ -174,8 +171,8 @@ def run_setup(extensions): + author_email='tyler@datastax.com', + packages=['cassandra', 'cassandra.io'], + include_package_data=True, +- install_requires=dependencies, +- tests_require=['nose', 'mock', 'ccm', 'unittest2', 'PyYAML', 'pytz'], ++ install_requires=(), ++ tests_require=(), + classifiers=[ + 'Development Status :: 5 - Production/Stable', + 'Intended Audience :: Developers', diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 00000000..25373f18 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +0001-don-t-use-ez_setup.patch diff --git a/debian/python-cassandra-driver-dbg.install b/debian/python-cassandra-driver-dbg.install new file mode 100644 index 00000000..a75d4c78 --- /dev/null +++ b/debian/python-cassandra-driver-dbg.install @@ -0,0 +1,2 @@ +usr/lib/python2*/*-packages/cassandra/*_d.so +usr/lib/python2*/*-packages/cassandra/io/*_d.so diff --git a/debian/python-cassandra-driver-doc.docs b/debian/python-cassandra-driver-doc.docs new file mode 100644 index 00000000..300da921 --- /dev/null +++ b/debian/python-cassandra-driver-doc.docs @@ -0,0 +1 @@ +docs/_build/*/* diff --git a/debian/python-cassandra-driver.install b/debian/python-cassandra-driver.install new file mode 100644 index 00000000..cf5c1ebe --- /dev/null +++ b/debian/python-cassandra-driver.install @@ -0,0 +1,4 @@ +usr/lib/python2*/*-packages/cassandra/*[!_][!_].so +usr/lib/python2*/*-packages/cassandra/*.py +usr/lib/python2*/*-packages/cassandra/io/*[!_][!_].so +usr/lib/python2*/*-packages/cassandra/io/*.py diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000..1943cfc1 --- /dev/null +++ b/debian/rules @@ -0,0 +1,16 @@ +#!/usr/bin/make -f + +%: + dh $@ --with python2,sphinxdoc + +override_dh_auto_build: + dh_auto_build + python setup.py doc + +ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) +override_dh_auto_test: + python setup.py gevent_nosetests +endif + +override_dh_strip: + dh_strip --dbg-package=python-cassandra-driver-dbg diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 00000000..163aaf8d --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt)