%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) # https://github.com/inveniosoftware-contrib/intbitset/issues/90 ExcludeArch: s390x %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} rm -rfv src/intbitset.c %generate_buildrequires %pyproject_buildrequires -t %build cython intbitset/intbitset.pyx %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} %pycached %{python3_sitearch}/intbitset_*.py %files -n python-%{pypi_name}-doc %doc html %license LICENSE %changelog %autochangelog