1{ lib 2, buildPythonPackage 3, fetchPypi 4, html5lib 5, pytestCheckHook 6, pythonOlder 7, setuptools 8}: 9 10buildPythonPackage rec { 11 pname = "mechanize"; 12 version = "0.4.9"; 13 pyproject = true; 14 15 disabled = pythonOlder "3.7"; 16 17 src = fetchPypi { 18 inherit pname version; 19 hash = "sha256-aaXtsJYvkh6LEINzaMIkLYrQSfC5H/aZzn9gG/xDFSE="; 20 }; 21 22 nativeBuildInputs = [ 23 setuptools 24 ]; 25 26 propagatedBuildInputs = [ 27 html5lib 28 ]; 29 30 nativeCheckInputs = [ 31 pytestCheckHook 32 ]; 33 34 pythonImportsCheck = [ 35 "mechanize" 36 ]; 37 38 disabledTestPaths = [ 39 # Tests require network access 40 "test/test_urllib2_localnet.py" 41 "test/test_functional.py" 42 ]; 43 44 disabledTests = [ 45 # Tests require network access 46 "test_pickling" 47 "test_password_manager" 48 ]; 49 50 meta = with lib; { 51 description = "Stateful programmatic web browsing in Python"; 52 homepage = "https://github.com/python-mechanize/mechanize"; 53 changelog = "https://github.com/python-mechanize/mechanize/blob/v${version}/ChangeLog"; 54 license = licenses.bsd3; 55 maintainers = with maintainers; [ ]; 56 }; 57}