File python-hiredis.spec of Package python-hiredis
#
# spec file for package python-hiredis
#
# 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: python-hiredis
Version: 3.2.1
Release: 0
Summary: Python wrapper for hiredis
License: MIT
URL: https://github.com/redis/hiredis-py
Source: https://files.pythonhosted.org/packages/source/h/hiredis/hiredis-%{version}.tar.gz
Patch0: 161-use-system-hiredis.patch
BuildRequires: python-rpm-macros
BuildRequires: %{python_module devel}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: %{python_module pytest}
BuildRequires: hiredis-devel >= 1.0.0
BuildRequires: fdupes
%python_subpackages
%description
Python wrapper for hiredis
%prep
%autosetup -p1 -n hiredis-%{version}
# Use system hiredis
rm -r vendor/hiredis
%build
export CFLAGS="%{optflags}"
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
%pytest_arch
%files %{python_files}
%doc README.md
%license LICENSE LICENSE
%{python_sitearch}/hiredis
%{python_sitearch}/hiredis-%{version}.dist-info
%changelog