File python-pyspf.spec of Package python-pyspf
#
# spec file for package python-pyspf
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pyspf
Version: 2.0.14
Release: 0
Summary: Python SPF (Sender Policy Framework) Domain forgery prevention
License: Python-2.0
Group: Development/Libaries/Python
URL: https://github.com/sdgathman/pyspf/
Source: https://github.com/sdgathman/pyspf/archive/pyspf-%{version}.tar.gz
Patch1: olddnspython.patch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildArch: noarch
Requires: python-authres
%ifpython2
Requires: python2-ipaddr
Requires: python2-pydns
%else
Requires: python3-py3dns
%endif
%python_subpackages
%description
SPF does email sender validation. For more information about SPF, please see
http://www.open-spf.org/
This SPF client is intended to be installed on the border MTA, checking if
incoming SMTP clients are permitted to forward mail. The SPF check should
be done during the MAIL FROM:<...> command.
%prep
%setup -q -n pyspf-pyspf-%{version}
%patch -P1 -p1
# For rpmlint warning: remove shebang from python library:
sed -i '/^#!/d' ./spf.py
%build
%python_build
%install
%python_install
rm %{buildroot}%{_bindir}/type99.py %{buildroot}%{_bindir}/spfquery.py
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%files %{python_files}
%{python_sitelib}/*
%changelog