1{ lib 2, buildPythonPackage 3, fetchPypi 4, pytestCheckHook 5, pythonAtLeast 6, pythonOlder 7}: 8 9buildPythonPackage rec { 10 pname = "w3lib"; 11 version = "2.1.2"; 12 format = "setuptools"; 13 14 disabled = pythonOlder "3.7"; 15 16 src = fetchPypi { 17 inherit pname version; 18 hash = "sha256-7Vt06ZfuoqvjwTIfkW40QUTujpBypvM0Y+6OV/hYpLE="; 19 }; 20 21 nativeCheckInputs = [ 22 pytestCheckHook 23 ]; 24 25 pythonImportsCheck = [ 26 "w3lib" 27 ]; 28 29 disabledTests = lib.optionals (pythonAtLeast "3.11") [ 30 # regressed on Python 3.11.4 31 # https://github.com/scrapy/w3lib/issues/212 32 "test_safe_url_string_url" 33 ]; 34 35 meta = with lib; { 36 description = "Library of web-related functions"; 37 homepage = "https://github.com/scrapy/w3lib"; 38 changelog = "https://github.com/scrapy/w3lib/blob/v${version}/NEWS"; 39 license = licenses.bsd3; 40 maintainers = with maintainers; [ ]; 41 }; 42}