Blame python-email-validator.spec

cf4aff7
Name:           python-email-validator
6c53302
Version:        2.1.1
5fb7a77
Release:        %autorelease
76108c8
Summary:        A robust email syntax and deliverability validation library
5b34e03
6c53302
License:        Unlicense
5b34e03
URL:            https://github.com/JoshData/python-email-validator
6a6e99a
Source:         %{url}/archive/v%{version}/python-email-validator-%{version}.tar.gz
cf4aff7
5b34e03
BuildArch:      noarch
5b34e03
cf4aff7
BuildRequires:  python3-devel
cf4aff7
# test_requirements.txt pins exact versions and includes unwanted coverage and
cf4aff7
# linting dependencies, so we fall back to manual BuildRequires:
cf4aff7
BuildRequires:  %{py3_dist pytest}
cf4aff7
54e0df1
%global _description %{expand:
f91d80e
This library validates that a string is of the form name@example.com and
f91d80e
optionally checks that the domain name is set up to receive email. This is the
f91d80e
sort of validation you would want when you are identifying users by their email
f91d80e
address like on a registration/login form (but not necessarily for composing an
f91d80e
email message).
5b34e03
5b34e03
Key features:
5b34e03
6c53302
  • Checks that an email address has the correct syntax – great for
6c53302
    email-based registration/login forms or validing data.
f91d80e
  • Gives friendly English error messages when validation fails that you can
f91d80e
    display to end-users.
f91d80e
  • Checks deliverability (optional): Does the domain name resolve? (You can
f91d80e
    override the default DNS resolver to add query caching.)
f91d80e
  • Supports internationalized domain names and internationalized local parts.
f91d80e
  • Rejects addresses with unsafe Unicode characters, obsolete email address
f91d80e
    syntax that you’d find unexpected, special use domain names like
f91d80e
    @localhost, and domains without a dot by default. This is an opinionated
f91d80e
    library!
f91d80e
  • Normalizes email addresses (important for internationalized and
f91d80e
    quoted-string addresses!)
f91d80e
  • Python type annotations are used.}
54e0df1
54e0df1
%description %{_description}
5b34e03
cf4aff7
%package -n     python3-email-validator
5b34e03
Summary:        %{summary}
76108c8
cf4aff7
%description -n python3-email-validator %{_description}
5b34e03
5b34e03
%prep
cf4aff7
%autosetup -n python-email-validator-%{version}
cf4aff7
cf4aff7
%generate_buildrequires
cf4aff7
%pyproject_buildrequires
5b34e03
5b34e03
%build
cf4aff7
%pyproject_wheel
5b34e03
5b34e03
%install
cf4aff7
%pyproject_install
d2d2b1a
%pyproject_save_files -l email_validator
5b34e03
862fb37
%check
6c53302
%pytest -v tests -m 'not network'
862fb37
cf4aff7
%files -n python3-email-validator -f %{pyproject_files}
80ba900
%doc CHANGELOG.md README.md
5b34e03
%{_bindir}/email_validator
5b34e03
5b34e03
%changelog
5fb7a77
%autochangelog