%global srcname Automat %global libname automat %global common_description %{expand: Automat is a library for concise, idiomatic Python expression of finite-state automata (particularly deterministic finite-state transducers).} Name: python-%{srcname} Version: 24.8.1 Release: %autorelease Summary: Self-service finite-state machines for the programmer on the go License: MIT URL: https://github.com/glyph/automat Source0: https://files.pythonhosted.org/packages/source/a/%{libname}/%{libname}-%{version}.tar.gz # https://github.com/glyph/automat/issues/162 Patch0: python-Automat-24.8.1-nogit.patch BuildArch: noarch BuildRequires: python3-devel BuildRequires: python-pydoctor BuildRequires: python3dist(sphinx-rtd-theme) %description %{common_description} %package -n python3-%{srcname} Summary: %{summary} Provides: python3-%{libname} %description -n python3-%{srcname} %{common_description} %package -n python-%{srcname}-doc Summary: Automat documentation %description -n python-%{srcname}-doc Documentation for Automat %prep %autosetup -p1 -n %{libname}-%{version} %generate_buildrequires %pyproject_buildrequires -t %build %pyproject_wheel PYTHONPATH=src sphinx-build docs html # remove the sphinx-build leftovers rm -rf html/.{doctrees,buildinfo} %install %pyproject_install %pyproject_save_files %{libname} %check %tox %files -n python3-%{srcname} -f %{pyproject_files} %license LICENSE %{_bindir}/automat-visualize %files -n python-%{srcname}-doc %doc README.md html %license LICENSE %changelog %autochangelog