File python-email-validator.spec of Package python-email-validator

#
# spec file for package python-email-validator
#
# Copyright (c) 2020 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-email-validator
Version:        1.1.2
Release:        0
Summary:        A robust email syntax and deliverability validation library for Python 2.x/3.x
License:        CC0-1.0
Group:          Development/Languages/Python
URL:            https://github.com/JoshData/python-email-validator
Source:         https://files.pythonhosted.org/packages/source/e/email-validator/email-validator-%{version}.tar.gz
BuildRequires:  python-rpm-macros
BuildRequires:  %{python_module setuptools}
# SECTION test requirements
BuildRequires:  %{python_module dnspython >= 1.15.0}
BuildRequires:  %{python_module idna >= 2.0.0}
# /SECTION
BuildRequires:  fdupes
Requires:       python-dnspython >= 1.15.0
Requires:       python-idna >= 2.0.0
BuildArch:      noarch
%python_subpackages

%description
This library validates that a string is of the form name@example.com. 
This is the sort of validation you would want for an email-based login form on a website.

%prep
%setup -q -n email-validator-%{version}

%build
%python_build

%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/email_validator
%python_expand %fdupes %{buildroot}%{$python_sitelib}

%post
%python_install_alternative email_validator

%postun
%python_uninstall_alternative email_validator

%files %{python_files}
%doc README.md
%license LICENSE
%python_alternative %{_bindir}/email_validator
%{python_sitelib}/*

%changelog
openSUSE Build Service is sponsored by