%global forgeurl https://github.com/itzik-h/urltools %global tag 0.4.0 Name: python-urltools Version: %{tag} %forgemeta Release: %autorelease Summary: Some functions to parse and normalize URLs License: MIT URL: %{forgeurl} Source: %{forgesource} # https://github.com/itzik-h/urltools/pull/1 Patch0: absolute-path-load.patch # https://github.com/itzik-h/urltools/pull/2 Patch1: correct-tests-7803828216e099a5f841ae8a7525ac52dc2f0ad.patch # Use publicsuffix-list package data package Patch2: local-tld-cache.patch BuildArch: noarch BuildRequires: python3-devel # Test dependencies BuildRequires: python3dist(pytest) BuildRequires: publicsuffix-list # Provides effective_tld_names.dat Requires: publicsuffix-list %global _description\ Some functions to parse and normalize URLs.\ %description %_description %package -n python3-urltools Summary: %{summary} %description -n python3-urltools %_description %prep %forgesetup %patch -P 0 -p1 %patch -P 1 -p1 %patch -P 2 -p1 # Move tests out of lib directory so they are not installed mv urltools/tests tests %build %pyproject_wheel %generate_buildrequires %pyproject_buildrequires %install %pyproject_install %pyproject_save_files urltools %check %pytest %files -n python3-urltools -f %{pyproject_files} %doc README.md %license LICENSE.txt %changelog %autochangelog