From d2eaaa06a14138618aed11bdbfbd72490f701f61 Mon Sep 17 00:00:00 2001 From: Eric Evans Date: Wed, 21 Dec 2011 22:19:37 +0000 Subject: [PATCH] add cqlsh to debian packaging Patch by paul cannon (w/ minor changes); reviewed by eevans for CASSANDRA-3458 git-svn-id: https://svn.apache.org/repos/asf/cassandra/branches/cassandra-1.0@1221909 13f79535-47bb-0310-9956-ffa450edef68 --- debian/cassandra.install | 1 + debian/control | 5 +++-- debian/pyversions | 1 + debian/rules | 4 ++++ pylib/setup.py | 24 ++++++++++++++++++++++++ 5 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 debian/pyversions create mode 100644 pylib/setup.py diff --git a/debian/cassandra.install b/debian/cassandra.install index 214b5dba3b..ecefe47dfa 100644 --- a/debian/cassandra.install +++ b/debian/cassandra.install @@ -11,5 +11,6 @@ bin/json2sstable usr/bin bin/sstable2json usr/bin bin/sstablekeys usr/bin bin/sstableloader usr/bin +bin/cqlsh usr/bin lib/*.jar usr/share/cassandra/lib lib/licenses usr/share/doc/cassandra diff --git a/debian/control b/debian/control index 56b76edf29..d13af49672 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,8 @@ Source: cassandra Section: misc Priority: extra Maintainer: Eric Evans -Build-Depends: debhelper (>= 5), openjdk-6-jdk (>= 6b11) | java6-sdk, ant (>= 1.7), ant-optional (>= 1.7), subversion +Uploaders: Sylvain Lebresne +Build-Depends: debhelper (>= 5), openjdk-6-jdk (>= 6b11) | java6-sdk, ant (>= 1.7), ant-optional (>= 1.7), subversion, python-support (>= 0.6) Homepage: http://cassandra.apache.org Vcs-Svn: https://svn.apache.org/repos/asf/cassandra/trunk Vcs-Browser: http://svn.apache.org/viewvc/cassandra/trunk @@ -10,7 +11,7 @@ Standards-Version: 3.8.3 Package: cassandra Architecture: all -Depends: openjdk-6-jre-headless (>= 6b11) | java6-runtime, jsvc (>= 1.0), libcommons-daemon-java (>= 1.0), adduser, libjna-java +Depends: openjdk-6-jre-headless (>= 6b11) | java6-runtime, jsvc (>= 1.0), libcommons-daemon-java (>= 1.0), adduser, libjna-java, python-cql, ${python:Depends}, ${misc:Depends} Conflicts: apache-cassandra1 Replaces: apache-cassandra1 Description: distributed storage system for structured data diff --git a/debian/pyversions b/debian/pyversions new file mode 100644 index 0000000000..b3dc41ebcd --- /dev/null +++ b/debian/pyversions @@ -0,0 +1 @@ +2.5- diff --git a/debian/rules b/debian/rules index 89067012cc..97e02742a2 100755 --- a/debian/rules +++ b/debian/rules @@ -18,6 +18,7 @@ clean: rm -rf bin/java find -name "*.pyc" -exec rm '{}' ';' find -name "*py.class" -exec rm '{}' ';' + $(RM) -r pylib/build dh_clean build: build-stamp @@ -26,6 +27,8 @@ build-stamp: printf "version=%s" $(VERSION) > build.properties $(ANT) jar + cd pylib && python setup.py install --no-compile --install-layout deb \ + --root $(CURDIR)/debian/cassandra touch build-stamp @@ -34,6 +37,7 @@ install: build dh_testroot dh_installdirs dh_install + dh_pysupport # Copy in the jar and symlink to something stable dh_install build/apache-cassandra-$(VERSION).jar \ diff --git a/pylib/setup.py b/pylib/setup.py new file mode 100644 index 0000000000..704d077cdf --- /dev/null +++ b/pylib/setup.py @@ -0,0 +1,24 @@ +#!/usr/bin/python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. + +from distutils.core import setup + +setup( + name="cassandra-pylib", + description="Cassandra Python Libraries", + packages=["cqlshlib"], +)