Name:           python-mdurl
Version:        0.1.0
Release:        1%{?dist}
Summary:        Markdown URL utilities

License:        MIT
URL:            https://github.com/hukkin/mdurl
Source0:        %{url}/archive/%{version}/mdurl-%{version}.tar.gz

BuildArch:      noarch
BuildRequires:  python3-devel


%global _description %{expand:
URL utilities for markdown-it parser.}


%description %_description

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

%description -n python3-mdurl %_description


%prep
%autosetup -p1 -n mdurl-%{version}

# Remove coverage from the test requirements
sed -i "s/pytest-cov//" tests/requirements.txt


%generate_buildrequires
%pyproject_buildrequires tests/requirements.txt


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files mdurl


%check
%pytest


%files -n python3-mdurl -f %{pyproject_files}
%doc README.md
%license LICENSE


%changelog
* Mon Jan 31 2022 Karolina Surma <ksurma@redhat.com> - 0.1.0-1
- Initial package