15
0

Accepting request 1244731 from home:glaubitz:branches:devel:languages:python

- Update to 3.29.2
  * Convert to pytest for running unit and integration tests (PYTHON-1297)
  * Add support for Cassandra 4.1.x and 5.0 releases to CI (PYTHON-1393)
  * Extend driver vector support to arbitrary subtypes and fix handling
    of variable length types (PYTHON-1369)
  * Python NumpyProtocolHandler does not work with NumPy 1.24.0 or greater (PYTHON-1359)
  * cibuildwheel appears to not be stripping Cython-generated shared objects (PYTHON-1387)
  * Windows build for Python 3.12 compiled without libev support (PYTHON-1386)
  * Update README.rst with badges for version and license (PR 1210)
  * Remove dependency on old mock external module (PR 1201)
  * Removed future print_function, division, and with and some pre 3.7 handling (PR 1208)
  * Update geomet dependency (PR 1207)
  * Remove problematic escape sequences in some docstrings to avoid SyntaxWarning
    in Python 3.12 (PR 1205)
  * Use timezone-aware API to avoid deprecated warning (PR 1213)
- Drop python-cassandra-driver-no-mock.patch, fixed upstream
- Drop python-cassandra-driver-test_libevreactor-DependencyException.patch, fixed upstream
- Remove C source files from source tree
- Switch package to modern Python Stack on SLE-15
  * Use Python 3.11 on SLE-15 by default
  * Drop support for older Python versions
- Switch build system from setuptools to pyproject.toml
  * Add python-pip and python-wheel to BuildRequires
  * Replace %python_build with %pyproject_wheel
  * Replace %python_install with %pyproject_install
  * Update name for dist directory in %files section

OBS-URL: https://build.opensuse.org/request/show/1244731
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cassandra-driver?expand=0&rev=61
This commit is contained in:
2025-02-10 13:46:40 +00:00
committed by Git OBS Bridge
parent 49186207ee
commit c4d00b2d23
6 changed files with 44 additions and 339 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-cassandra-driver
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,18 +16,14 @@
#
%bcond_without python2
%{?sle15_python_module_pythons}
Name: python-cassandra-driver
Version: 3.29.1
Version: 3.29.2
Release: 0
Summary: Python driver for Cassandra
License: Apache-2.0
URL: https://github.com/datastax/python-driver
Source: https://github.com/datastax/python-driver/archive/%{version}.tar.gz
# https://datastax-oss.atlassian.net/browse/PYTHON-1299
Patch0: python-cassandra-driver-no-mock.patch
# if CASS_DRIVER_NO_EXTENSIONS=1, import throws DependencyException https://datastax-oss.atlassian.net/browse/PYTHON-1383
Patch1: python-cassandra-driver-test_libevreactor-DependencyException.patch
BuildRequires: %{python_module Cython}
BuildRequires: %{python_module PyYAML}
BuildRequires: %{python_module Twisted}
@@ -35,12 +31,14 @@ BuildRequires: %{python_module devel}
BuildRequires: %{python_module eventlet}
BuildRequires: %{python_module geomet >= 0.1}
BuildRequires: %{python_module gevent}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pure-sasl}
BuildRequires: %{python_module pyasyncore if %python-base >= 3.12}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module pytz}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module sure}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: libev-devel
BuildRequires: python-rpm-macros
@@ -79,15 +77,17 @@ rm -f tests/unit/test_types.py
sed -i -e 's:Cython>=0.20,!=0.25,<0.29:Cython:g' setup.py
# fix tests on Python 3.12
sed -i 's/assertRaisesRegexp/assertRaisesRegex/' tests/unit/test_response_future.py
# remove C sources
rm -f cassandra/cmurmur3.c cassandra/io/libevwrapper.c cassandra/numpyFlags.h
%build
export CFLAGS="%{optflags}"
export CASS_DRIVER_NO_EXTENSIONS=1
%python_build
%pyproject_wheel
%install
export CASS_DRIVER_NO_EXTENSIONS=1
%python_install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
@@ -101,8 +101,8 @@ pytest tests/unit/test_host_connection_pool.py -k "HostConnectionPoolTests"
%license LICENSE
%doc README.rst
%dir %{python_sitearch}/cassandra
%dir %{python_sitearch}/cassandra_driver-%{version}-py*.egg-info
%dir %{python_sitearch}/cassandra_driver-%{version}.dist-info
%{python_sitearch}/cassandra/*
%{python_sitearch}/cassandra_driver-%{version}-py*.egg-info/*
%{python_sitearch}/cassandra_driver-%{version}.dist-info/*
%changelog