[python-cassandra-driver] Import python-cassandra-driver-1.1.1-2.el7.src.rpm

Lubomir Rintel lkundrak at fedoraproject.org
Mon May 5 12:39:31 UTC 2014


commit 9bd78968e9ca4e1be0eda497472faaa789ec235e
Author: Lubomir Rintel <lkundrak at v3.sk>
Date:   Mon May 5 14:39:39 2014 +0200

    Import python-cassandra-driver-1.1.1-2.el7.src.rpm

 .gitignore                                      |    1 +
 0001-Remove-unnecessary-test-dependencies.patch |   28 ++++++++
 python-cassandra-driver.spec                    |   84 +++++++++++++++++++++++
 sources                                         |    1 +
 4 files changed, 114 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..674f776 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/python-driver-840064a9e27929c5f44ba06b72bfc3e69d905ee6.tar.gz
diff --git a/0001-Remove-unnecessary-test-dependencies.patch b/0001-Remove-unnecessary-test-dependencies.patch
new file mode 100644
index 0000000..9e93e3c
--- /dev/null
+++ b/0001-Remove-unnecessary-test-dependencies.patch
@@ -0,0 +1,28 @@
+From 8c3491c2e9135d853d0c7ca4053374b9b624d845 Mon Sep 17 00:00:00 2001
+From: Lubomir Rintel <lkundrak at v3.sk>
+Date: Wed, 23 Apr 2014 11:31:22 +0200
+Subject: [PATCH] Remove unnecessary test dependencies
+
+ccm, pytz - Only used by integration tests
+unittest2 - Part of python
+PyYAML - Not used at all
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 11f7322..ecf9e0c 100644
+--- a/setup.py
++++ b/setup.py
+@@ -196,7 +196,7 @@ def run_setup(extensions):
+         packages=['cassandra', 'cassandra.io'],
+         include_package_data=True,
+         install_requires=dependencies,
+-        tests_require=['nose', 'mock', 'ccm', 'unittest2', 'PyYAML', 'pytz'],
++        tests_require=['nose', 'mock'],
+         classifiers=[
+             'Development Status :: 5 - Production/Stable',
+             'Intended Audience :: Developers',
+-- 
+1.9.0
+
diff --git a/python-cassandra-driver.spec b/python-cassandra-driver.spec
new file mode 100644
index 0000000..e79fa2d
--- /dev/null
+++ b/python-cassandra-driver.spec
@@ -0,0 +1,84 @@
+%global __provides_exclude_from ^%{python2_sitearch}/cassandra/io/.*\\.so$
+%global commit 840064a9e27929c5f44ba06b72bfc3e69d905ee6
+
+Name:           python-cassandra-driver
+Version:        1.1.1
+Release:        2%{?dist}
+Summary:        DataStax Python Driver for Apache Cassandra
+
+Group:          Development/Libraries
+License:        ASL 2.0 and MIT
+URL:            https://github.com/datastax/python-driver
+Source0:        https://github.com/datastax/python-driver/archive/%{commit}/python-driver-%{commit}.tar.gz
+
+# Not upstreamable
+Patch0:         0001-Remove-unnecessary-test-dependencies.patch
+
+BuildRequires:  python2-devel
+BuildRequires:  python-setuptools
+BuildRequires:  python-futures
+BuildRequires:  python-scales
+BuildRequires:  python-blist
+BuildRequires:  python-nose
+BuildRequires:  python-mock
+BuildRequires:  libev-devel
+
+Requires:       python-futures
+Requires:       python-scales
+Requires:       python-blist
+
+%description
+A Python client 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.
+
+
+%prep
+%setup -q -n python-driver-%{commit}
+%patch0 -p1
+
+
+%build
+CFLAGS="%{optflags}" %{__python2} setup.py build
+
+
+%install
+%{__python2} setup.py install --skip-build --root %{buildroot}
+
+# "The optional C extensions are not supported on big-endian systems."
+# ...which causes setup.py to install it into arch-agnostic directory,
+# which is not what we want, since we can't build a noarch package
+%if "%(%{__python2} -c 'import sys; print sys.byteorder')" != "little"
+mkdir -p %{buildroot}%{python2_sitearch}
+mv %{buildroot}{%{python2_sitelib}/*,%{python2_sitearch}}
+%endif
+
+# ccache mock plugin can cause wrong mode to be set
+chmod 0755 %{buildroot}%{python2_sitearch}/cassandra/{io/,}*.so
+
+
+%check
+# Just running the unit tests. Integration tests need ccm and cassandra
+# running (neither shipped with Fedora)
+%{__python2} setup.py nosetests --tests tests/unit/
+
+
+%files
+%{python2_sitearch}/cassandra/
+%exclude %{python2_sitearch}/cassandra/*.c
+%exclude %{python2_sitearch}/cassandra/*/*.c
+%{python2_sitearch}/cassandra*.egg-info/
+%doc CHANGELOG.rst README.rst LICENSE example.py
+
+
+%changelog
+* Sat May 03 2014 Lubomir Rintel (GoodData) <lubo.rintel at gooddata.com> - 1.1.1-2
+- Make sure the .so files have correct mode
+- Fix license tag
+
+* Wed Apr 23 2014 Lubomir Rintel (GoodData) <lubo.rintel at gooddata.com> - 1.1.1-1
+- Update to 1.1.1
+- Use versioned python macros
+
+* Fri Mar 21 2014 Lubomir Rintel (GoodData) <lubo.rintel at gooddata.com> - 1.0.2-1
+- Initial packaging
diff --git a/sources b/sources
index e69de29..77386cf 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+c6e64d281563c63c3b82fc876ff8ffed  python-driver-840064a9e27929c5f44ba06b72bfc3e69d905ee6.tar.gz


More information about the scm-commits mailing list