Blob Blame History Raw
%global pypi_name surt

%global forgeurl
# Using a commit here as the release isn't tagged
%global commit 6934c321b3e2f66af9c001d882475949f00570c5

%global common_description %{expand:
SURT is a Python package to implement a Sort-friendly URI Reordering Transform,
which is a transformation applied to URIs which makes their left-to-right
representation better match the natural hierarchy of domain names.}

Name:           python-%{pypi_name}
Version:        0.3.1
Release:        %autorelease
Summary:        Sort-friendly URI Reordering Transform (SURT) python package

License:        AGPLv3+
URL:            %{forgeurl}
# PyPI doesn't include tests so use the GitHub tarball instead
Source0:        %{forgesource}
# PR#27: Remove unnecessary shebangs
Patch0:         %{forgeurl}/pull/27.patch
BuildArch:      noarch

BuildRequires:  python3-devel


%package -n     python3-%{pypi_name}
Summary:        %{summary}

%description -n python3-%{pypi_name} %{common_description}

%forgeautosetup -p1

%pyproject_buildrequires -t


%pyproject_save_files surt


%files -n python3-%{pypi_name} -f %{pyproject_files}
%license LICENSE
%doc README.rst