2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonAtLeast,
|
|
|
|
pythonOlder,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "w3lib";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "2.1.2";
|
2022-12-28 21:21:41 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-7Vt06ZfuoqvjwTIfkW40QUTujpBypvM0Y+6OV/hYpLE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "w3lib" ];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
disabledTests = lib.optionals (pythonAtLeast "3.11") [
|
|
|
|
# regressed on Python 3.11.4
|
|
|
|
# https://github.com/scrapy/w3lib/issues/212
|
|
|
|
"test_safe_url_string_url"
|
2021-03-09 03:18:52 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-12-28 21:21:41 +00:00
|
|
|
description = "Library of web-related functions";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/scrapy/w3lib";
|
2022-12-28 21:21:41 +00:00
|
|
|
changelog = "https://github.com/scrapy/w3lib/blob/v${version}/NEWS";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
2022-07-14 12:49:19 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|