2021-06-19 11:39:49 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, dnspython
|
2023-01-30 13:30:51 +00:00
|
|
|
, fetchFromGitHub
|
2021-06-19 11:39:49 +00:00
|
|
|
, idna
|
|
|
|
, pytestCheckHook
|
2023-01-30 13:30:51 +00:00
|
|
|
, pythonOlder
|
2021-06-19 11:39:49 +00:00
|
|
|
}:
|
2017-07-03 23:30:58 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2020-11-29 17:24:49 +00:00
|
|
|
pname = "email-validator";
|
2023-01-30 13:30:51 +00:00
|
|
|
version = "1.3.1";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2017-07-03 23:30:58 +00:00
|
|
|
|
2021-06-19 11:39:49 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "JoshData";
|
|
|
|
repo = "python-${pname}";
|
2022-07-16 10:59:06 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-01-30 13:30:51 +00:00
|
|
|
hash = "sha256-JW6Yrotm3HjUOUtNFxRorkrJKjzuwIXwjpUuMWEyLV0=";
|
2017-07-03 23:30:58 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2017-12-10 02:15:45 +00:00
|
|
|
dnspython
|
2017-07-03 23:30:58 +00:00
|
|
|
idna
|
2021-06-19 11:39:49 +00:00
|
|
|
];
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2021-06-19 11:39:49 +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-07-16 10:59:06 +00:00
|
|
|
"test_email_example_reserved_domain"
|
2021-06-19 11:39:49 +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"
|
|
|
|
];
|
2017-07-03 23:30:58 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2023-01-30 13:30:51 +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;
|
2017-07-03 23:30:58 +00:00
|
|
|
maintainers = with maintainers; [ siddharthist ];
|
|
|
|
};
|
|
|
|
}
|