2021-06-28 23:13:55 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, dnspython
|
2023-03-15 16:39:30 +00:00
|
|
|
, fetchFromGitHub
|
2021-06-28 23:13:55 +00:00
|
|
|
, idna
|
|
|
|
, pytestCheckHook
|
2023-03-15 16:39:30 +00:00
|
|
|
, pythonOlder
|
2021-06-28 23:13:55 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2020-12-07 07:45:13 +00:00
|
|
|
pname = "email-validator";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "1.3.1";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "JoshData";
|
|
|
|
repo = "python-${pname}";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-JW6Yrotm3HjUOUtNFxRorkrJKjzuwIXwjpUuMWEyLV0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
dnspython
|
|
|
|
idna
|
2021-06-28 23:13:55 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-06-28 23:13:55 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# fails with dns.resolver.NoResolverConfiguration due to network sandboxing
|
|
|
|
"test_deliverability_no_records"
|
|
|
|
"test_deliverability_found"
|
|
|
|
"test_deliverability_fails"
|
|
|
|
"test_deliverability_dns_timeout"
|
2022-08-12 12:06:08 +00:00
|
|
|
"test_email_example_reserved_domain"
|
2021-06-28 23:13:55 +00:00
|
|
|
"test_main_single_good_input"
|
|
|
|
"test_main_multi_input"
|
|
|
|
"test_main_input_shim"
|
|
|
|
"test_validate_email__with_caching_resolver"
|
|
|
|
"test_validate_email__with_configured_resolver"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"email_validator"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2023-03-15 16:39:30 +00:00
|
|
|
description = "Email syntax and deliverability validation library";
|
|
|
|
homepage = "https://github.com/JoshData/python-email-validator";
|
|
|
|
changelog = "https://github.com/JoshData/python-email-validator/releases/tag/v${version}";
|
|
|
|
license = licenses.cc0;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ siddharthist ];
|
|
|
|
};
|
|
|
|
}
|