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