%global srcname beanhub-extract %bcond check 1 Name: python-%{srcname} Version: 0.1.5 Release: %autorelease Summary: Library for extracting bank account transaction export files License: MIT URL: https://github.com/LaunchPlatform/beanhub-extract # PyPI tarball doesn't include tests Source: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: sed %if %{with check} BuildRequires: python3dist(pytest) BuildRequires: python3dist(pytest-lazy-fixture) %endif %global _description %{expand: The is a simple library for extracting all kind of bank account transaction export files, mostly for beanhub-import to ingest and generate transactions.} %description %_description %package -n python3-%{srcname} Summary: %{summary} %description -n python3-%{srcname} %_description %prep %autosetup -p1 -n %{srcname}-%{version} # Relax pytz version dependency sed -i 's/pytz = ">= 2023.1, <2025"/pytz = ">= 2023.1"/' pyproject.toml %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files beanhub_extract %check %if %{with check} %pytest -v %else %pyproject_check_import %endif %files -n python3-%{srcname} -f %{pyproject_files} %doc README.md assets/ %changelog %autochangelog