Blob Blame History Raw
%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:        22.10.0
Release:        %autorelease
Summary:        Self-service finite-state machines for the programmer on the go

License:        MIT
Source0:        %pypi_source

BuildArch:      noarch
BuildRequires:  python3-devel
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

%autosetup  -p1 -n %{srcname}-%{version}

# Backport of
sed -i "s/py\.test/pytest/g" tox.ini

%pyproject_buildrequires -t


PYTHONPATH=%{pyproject_build_lib}  sphinx-build docs html
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}

%pyproject_save_files %{libname}


%files -n python3-%{srcname} -f %{pyproject_files}

%files -n python-%{srcname}-doc
%doc html
%license LICENSE