%global pypi_name intbitset Name: python-%{pypi_name} Version: 3.0.2 Release: %autorelease Summary: Python C-based extension implementing fast integer bit sets License: LGPL-3.0-or-later URL: https://github.com/inveniosoftware-contrib/intbitset Source: %URL/archive/v%{version}/%{pypi_name}-%{version}.tar.gz BuildRequires: gcc BuildRequires: python3-devel BuildRequires: python3-Cython BuildRequires: python3dist(sphinx) %global common_description %{expand: The intbitset library provides a set implementation to store sorted unsigned integers either 32-bits integers (between 0 and 2**31 - 1 or intbitset.__maxelem__) or an infinite range with fast set operations implemented via bit vectors in a Python C extension for speed and reduced memory usage. The inbitset class emulates the Python built-in set class interface with some additional specific methods such as its own fast dump and load marshalling functions.} %description %{common_description} %package -n python3-%{pypi_name} Summary: %{summary} %description -n python3-%{pypi_name} %{common_description} %package -n python-%{pypi_name}-doc Summary: Documentation for python-%{pypi_name} BuildArch: noarch %description -n python-%{pypi_name}-doc %{common_description} This package is providing the documentation for %{pypi_name}. %prep %autosetup -p1 -n %{pypi_name}-%{version} cython intbitset/intbitset.pyx %generate_buildrequires %pyproject_buildrequires -t %build %pyproject_wheel # generate html docs sphinx-build-3 -b html docs/ html # remove the sphinx-build-3 leftovers rm -rf html/.{doctrees,buildinfo} %install %pyproject_install %pyproject_save_files %{pypi_name} %check %pytest %files -n python3-%{pypi_name} -f %{pyproject_files} %doc AUTHORS.rst CHANGELOG.rst README.rst %license LICENSE %pycached %{python3_sitearch}/intbitset_*.py %files -n python-%{pypi_name}-doc %doc html %license LICENSE %changelog %autochangelog