File python-pyspf.spec of Package python-pyspf
#
# spec file for package python-pyspf
#
# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-pyspf
Version: 2.0.14
Release: 0
License: Python-2.0
Summary: SPF (Sender Policy Framework) implemented in Python
Url: https://github.com/sdgathman/pyspf/
Group: Development/Languages/Python
Source: https://files.pythonhosted.org/packages/source/p/pyspf/pyspf-%{version}.tar.gz
BuildRequires: python-rpm-macros
BuildRequires: %{python_module setuptools}
BuildRequires: python2-pydns
BuildRequires: python3-py3dns
BuildRequires: %{python_module authres}
BuildRequires: %{python_module ipaddr >= 2.1.10}
BuildRequires: %{python_module nose}
BuildRequires: %{python_module PyYAML}
%ifpython2
Requires: python-pydns
%endif
%ifpython3
Requires: python-py3dns
%endif
Requires: python-authres
Requires: python-ipaddr >= 2.1.10
BuildRequires: fdupes
BuildArch: noarch
Requires(post): update-alternatives
Requires(postun): update-alternatives
%python_subpackages
%description
Python implementation of SPF (Sender Policy Framework).
Now RFC 4408 compliant.
SPF does email sender validation. For more information about SPF, please see
http://www.openspf.net/
This SPF client is intended to be installed on the border MTA, checking if
incoming SMTP clients are permitted to forward mail.
%prep
%setup -q -n pyspf-%{version}
%build
%python_build
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/pyspf
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%python_exec -m nose
%post
%python_install_alternative pyspf
%postun
%python_uninstall_alternative pyspf
%files %{python_files}
%doc CHANGELOG README.md
%python_alternative %{_bindir}/spfquery.py
%python_alternative %{_bindir}/type99.py
%{python_sitelib}/*
%changelog