2021-01-05 17:05:55 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-02-16 17:04:54 +00:00
|
|
|
, fetchFromGitHub
|
2023-10-19 13:55:26 +00:00
|
|
|
, pytest-asyncio
|
2023-02-22 10:55:15 +00:00
|
|
|
, pytest-mock
|
2021-02-16 17:04:54 +00:00
|
|
|
, pytestCheckHook
|
2022-02-20 05:27:41 +00:00
|
|
|
, python-socks
|
2021-01-05 17:05:55 +00:00
|
|
|
, pythonOlder
|
|
|
|
, tldextract
|
2021-10-04 12:37:57 +00:00
|
|
|
, whodap
|
2021-01-05 17:05:55 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "asyncwhois";
|
2023-10-19 13:55:26 +00:00
|
|
|
version = "1.0.8";
|
2022-02-20 05:27:41 +00:00
|
|
|
format = "setuptools";
|
2021-10-04 12:37:57 +00:00
|
|
|
|
2021-02-16 17:04:54 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2021-01-05 17:05:55 +00:00
|
|
|
|
2021-02-16 17:04:54 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pogzyb";
|
2023-10-19 13:55:26 +00:00
|
|
|
repo = "asyncwhois";
|
2023-02-22 10:55:15 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-10-19 13:55:26 +00:00
|
|
|
hash = "sha256-fYXxoS4bGTat5QT98ETmWk/VKXJmg9mtkUu02SZT4Eo=";
|
2021-01-05 17:05:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2022-02-20 05:27:41 +00:00
|
|
|
python-socks
|
2021-01-05 17:05:55 +00:00
|
|
|
tldextract
|
2021-10-04 12:37:57 +00:00
|
|
|
whodap
|
2021-01-05 17:05:55 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-10-19 13:55:26 +00:00
|
|
|
pytest-asyncio
|
2023-02-22 10:55:15 +00:00
|
|
|
pytest-mock
|
2021-02-16 17:04:54 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "python-socks[asyncio]" "python-socks"
|
|
|
|
'';
|
|
|
|
|
2021-02-16 17:04:54 +00:00
|
|
|
disabledTests = [
|
2022-02-20 05:27:41 +00:00
|
|
|
# Tests require network access
|
2021-02-16 17:04:54 +00:00
|
|
|
"test_pywhois_aio_get_hostname_from_ip"
|
|
|
|
"test_pywhois_get_hostname_from_ip"
|
|
|
|
"test_pywhois_aio_lookup_ipv4"
|
|
|
|
"test_not_found"
|
|
|
|
"test_aio_from_whois_cmd"
|
|
|
|
"test_aio_get_hostname_from_ip"
|
|
|
|
"test_from_whois_cmd"
|
|
|
|
"test_get_hostname_from_ip"
|
|
|
|
"test_whois_query_run"
|
2022-02-20 05:27:41 +00:00
|
|
|
"test_whois_query_create_connection"
|
|
|
|
"test_whois_query_send_and_recv"
|
2023-10-19 13:55:26 +00:00
|
|
|
"test_input_parameters_for_domain_query"
|
|
|
|
"test__get_top_level_domain"
|
2021-02-16 17:04:54 +00:00
|
|
|
];
|
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"asyncwhois"
|
|
|
|
];
|
2021-01-05 17:05:55 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python module for retrieving WHOIS information";
|
|
|
|
homepage = "https://github.com/pogzyb/asyncwhois";
|
2023-02-22 10:55:15 +00:00
|
|
|
changelog = "https://github.com/pogzyb/asyncwhois/releases/tag/v${version}";
|
2021-01-05 17:05:55 +00:00
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|