at master 1.3 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchpatch, 5 fetchPypi, 6 html5lib, 7 pytestCheckHook, 8 pythonOlder, 9 setuptools, 10}: 11 12buildPythonPackage rec { 13 pname = "mechanize"; 14 version = "0.4.10"; 15 pyproject = true; 16 17 disabled = pythonOlder "3.7"; 18 19 src = fetchPypi { 20 inherit pname version; 21 hash = "sha256-HeqUf5vn6gq2EPe7xKTja0XWv9/O6imtPTiaiKGVfd8="; 22 }; 23 24 patches = [ 25 (fetchpatch { 26 name = "fix-cookietests-python3.13.patch"; 27 url = "https://github.com/python-mechanize/mechanize/commit/0c1cd4b65697dee4e4192902c9a2965d94700502.patch"; 28 hash = "sha256-Xlx8ZwHkFbJqeWs+/fllYZt3CZRu9rD8bMHHPuUlRv4="; 29 }) 30 ]; 31 32 build-system = [ setuptools ]; 33 34 dependencies = [ html5lib ]; 35 36 nativeCheckInputs = [ pytestCheckHook ]; 37 38 pythonImportsCheck = [ "mechanize" ]; 39 40 disabledTestPaths = [ 41 # Tests require network access 42 "test/test_urllib2_localnet.py" 43 "test/test_functional.py" 44 ]; 45 46 disabledTests = [ 47 # Tests require network access 48 "test_pickling" 49 "test_password_manager" 50 ]; 51 52 meta = with lib; { 53 description = "Stateful programmatic web browsing in Python"; 54 homepage = "https://github.com/python-mechanize/mechanize"; 55 changelog = "https://github.com/python-mechanize/mechanize/blob/v${version}/ChangeLog"; 56 license = licenses.bsd3; 57 maintainers = [ ]; 58 }; 59}