File python-fnvhash.spec of Package python-fnvhash
#
# spec file for package python-fnvhash
#
# 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/
#
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
%define pname python-fnvhash
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: %{pname}%{psuffix}
Version: 0.2.1
Release: 0
Summary: Python library of the FNV hash family
License: MIT
Group: Development/Languages/Python
URL: https://github.com/znerol/py-fnvhash
Source0: %{pname}-%{version}.tar.xz
BuildArch: noarch
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
%python_subpackages
%description
Pure Python implementation of the FNV hash family with 100% test coverage. Take a look at pyhash for use cases where performance is more important than portability.
%prep
%setup -q -n %{pname}-%{version}
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%if %{with test}
%check
%python_exec setup.py test
%endif
%files %python_files
%defattr(-,root,root,-)
%{python_sitelib}/*
%doc README.rst
%license LICENSE
%changelog