## START: Set by rpmautospec ## (rpmautospec version 0.2.5) %define autorelease(e:s:pb:) %{?-p:0.}%{lua: release_number = 2; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{?dist} ## END: Set by rpmautospec Name: python-xxhash Version: 2.0.2 Release: %autorelease Summary: Python Binding for xxHash # Note LICENSE mentions GPLv2 for “xxhsum command line interface”; that is not # included in this package, so the license is BSD only. License: BSD URL: https://github.com/ifduyue/python-xxhash Source0: %{pypi_source xxhash} BuildRequires: python3-devel BuildRequires: gcc BuildRequires: pkgconfig(libxxhash) %global common_description %{expand: xxhash is a Python binding for the xxHash library by Yann Collet.} %description %{common_description} %package -n python3-xxhash Summary: %{summary} %description -n python3-xxhash %{common_description} %prep %autosetup -n xxhash-%{version} # Remove bundled xxhash library rm -rvf deps %generate_buildrequires %pyproject_buildrequires -r %build %set_build_flags # Normally, no extra flags are required to link the xxhash shared library, but # we are prepared: export CFLAGS="${CFLAGS} $(pkgconf --cflags libxxhash)" export LDFLAGS="${LDFLAGS} $(pkgconf --libs-only-L libxxhash)" export LDFLAGS="${LDFLAGS} $(pkgconf --libs-only-other libxxhash)" export XXHASH_LINK_SO='Non-empty string' %pyproject_wheel %install %pyproject_install %pyproject_save_files xxhash %check cd tests PYTHONPATH='%{buildroot}%{python3_sitearch}' %{python3} -m unittest discover %files -n python3-xxhash -f %{pyproject_files} %doc CHANGELOG.rst %doc README.rst %changelog * Mon Oct 25 2021 Benjamin A. Beasley 2.0.2-2 - Use %%python3 macro instead of %%__python3 * Fri Sep 17 2021 Benjamin A. Beasley 2.0.2-1 - Initial package