2022-01-19 23:45:15 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2022-03-05 16:20:37 +00:00
|
|
|
, ftfy
|
2022-01-19 23:45:15 +00:00
|
|
|
, mailchecker
|
2022-07-18 16:21:45 +00:00
|
|
|
, orjson
|
2022-01-19 23:45:15 +00:00
|
|
|
, phonenumbers
|
2022-03-05 16:20:37 +00:00
|
|
|
, pytestCheckHook
|
2022-01-19 23:45:15 +00:00
|
|
|
, python-dateutil
|
|
|
|
, python-fsutil
|
2022-03-05 16:20:37 +00:00
|
|
|
, pythonOlder
|
2022-01-19 23:45:15 +00:00
|
|
|
, python-slugify
|
|
|
|
, pyyaml
|
|
|
|
, requests
|
|
|
|
, six
|
|
|
|
, toml
|
|
|
|
, xmltodict
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-benedict";
|
2022-07-18 16:21:45 +00:00
|
|
|
version = "0.25.2";
|
2022-01-19 23:45:15 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "fabiocaccamo";
|
|
|
|
repo = pname;
|
2022-04-27 09:35:20 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2022-07-18 16:21:45 +00:00
|
|
|
hash = "sha256-WSsT+p23VctVt9A+WFKNHcgUHFijfT775eMF3RzaXDA=";
|
2022-01-19 23:45:15 +00:00
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "mailchecker >= 4.1.0, < 5.0.0" "mailchecker >= 4.1.0"
|
|
|
|
'';
|
|
|
|
|
2022-01-19 23:45:15 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
mailchecker
|
|
|
|
phonenumbers
|
|
|
|
python-dateutil
|
|
|
|
python-fsutil
|
|
|
|
python-slugify
|
|
|
|
pyyaml
|
|
|
|
ftfy
|
2022-07-18 16:21:45 +00:00
|
|
|
orjson
|
2022-01-19 23:45:15 +00:00
|
|
|
requests
|
|
|
|
six
|
|
|
|
toml
|
|
|
|
xmltodict
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Tests require network access
|
|
|
|
"test_from_base64_with_valid_url_valid_content"
|
|
|
|
"test_from_json_with_valid_url_valid_content"
|
|
|
|
"test_from_pickle_with_valid_url_valid_content"
|
|
|
|
"test_from_plist_with_valid_url_valid_content"
|
|
|
|
"test_from_query_string_with_valid_url_valid_content"
|
|
|
|
"test_from_toml_with_valid_url_valid_content"
|
|
|
|
"test_from_xml_with_valid_url_valid_content"
|
|
|
|
"test_from_yaml_with_valid_url_valid_content"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"benedict"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Module with keylist/keypath support";
|
|
|
|
homepage = "https://github.com/fabiocaccamo/python-benedict";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|