File python-preshed.spec of Package python-preshed

#
# spec file for package python-preshed
#
# Copyright (c) 2023 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/
#

%if 0%{?suse_version} && 0%{?suse_version} <= 1550
%{?sle15_python_module_pythons}
%else
%global pythons %{primary_python}
%endif

Name:           python-preshed
Version:        3.0.8
Release:        0
Summary:        Cython hash table that trusts the keys are pre-hashed
License:        MIT
URL:            https://github.com/explosion/preshed
Source:         https://files.pythonhosted.org/packages/source/p/preshed/preshed-%{version}.tar.gz
BuildRequires:  python-rpm-macros
BuildRequires:  %{python_module cymem >= 2.0.2}
BuildRequires:  %{python_module Cython}
BuildRequires:  %{python_module murmurhash >= 0.28.0}
BuildRequires:  %{python_module pip}
BuildRequires:  %{python_module setuptools}
BuildRequires:  %{python_module wheel}
BuildRequires:  %{python_module pytest}
BuildRequires:  gcc-c++
BuildRequires:  fdupes
%python_subpackages

%description
<a href="https://explosion.ai"><img src="https://explosion.ai/assets/img/logo.svg" width="125" height="125" align="right" /></a>

# preshed: Cython Hash Table for Pre-Hashed Keys

Simple but high performance Cython hash table mapping pre-randomized keys to `void*` values. Inspired by [Jeff Preshing](http://preshing.com/20130107/this-hash-table-is-faster-than-a-judy-array/).

%prep
%autosetup -p1 -n preshed-%{version}

%build
%pyproject_wheel

%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}

%check

%files %{python_files}
%doc README.md
%license LICENSE
%{python_sitearch}/preshed
%{python_sitearch}/preshed-%{version}.dist-info

%changelog
openSUSE Build Service is sponsored by