%global srcname bson Name: python-%{srcname} Version: 0.5.10 Release: %autorelease Summary: BSON codec for Python License: BSD-3-Clause AND Apache-2.0 URL: https://github.com/py-bson/bson # PyPI tarball doesn't include tests Source: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz # Use assertEqual instead of assertEquals for Python 3.11 compatibility Patch: %{url}/commit/5346e73124de8a1f9e2a1960501416529e4cee02.patch BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-pytest BuildRequires: sed %global _description %{expand: This package provides an independent BSON codec for Python that doesn't depend on MongoDB. The bson ObjectId implementation is forked from the PyMongo project, licensed under the Apache 2.0 license.} %description %_description %package -n python3-%{srcname} Summary: %{summary} %description -n python3-%{srcname} %_description %prep %autosetup -p1 -n %{srcname}-%{version} # Drop shebangs sed -i %{srcname}/*.py \ -e '/\/usr\/bin\/python/d' \ -e '/\/usr\/bin\/env python/d' %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files %{srcname} %check %pytest %files -n python3-bson -f %{pyproject_files} %doc README.rst %changelog %autochangelog