%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} # Using force source else LICENSE.txt is missing. Source: %{forgesource} # effective_tld_names.dat is used during testing stage only and not # released. Source1: https://publicsuffix.org/list/effective_tld_names.dat # 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 BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3dist(pytest) BuildRequires: python3dist(setuptools) %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 cp -p %{SOURCE1} effective_tld_names.dat %build export PUBLIC_SUFFIX_LIST=effective_tld_names.dat %py3_build %install export PUBLIC_SUFFIX_LIST=effective_tld_names.dat %py3_install %check export PUBLIC_SUFFIX_LIST=effective_tld_names.dat pytest %files -n python3-urltools %{python3_sitelib}/urltools-*.egg-info/ %{python3_sitelib}/urltools/ %exclude %{python3_sitelib}/urltools/tests %license LICENSE.txt %doc README.md %changelog %autochangelog