1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 pythonOlder,
6 fetchFromGitHub,
7 setuptools,
8 setuptools-scm,
9 more-itertools,
10 beautifulsoup4,
11 mechanize,
12 keyring,
13 requests,
14 feedparser,
15 icmplib,
16 jaraco-text,
17 jaraco-logging,
18 jaraco-email,
19 jaraco-functools,
20 jaraco-collections,
21 path,
22 python-dateutil,
23 pathvalidate,
24 jsonpickle,
25 ifconfig-parser,
26 pytestCheckHook,
27 cherrypy,
28 importlib-resources,
29 pyparsing,
30 requests-mock,
31 nettools,
32}:
33
34buildPythonPackage rec {
35 pname = "jaraco-net";
36 version = "10.2.0";
37
38 disabled = pythonOlder "3.7";
39
40 format = "pyproject";
41
42 src = fetchFromGitHub {
43 owner = "jaraco";
44 repo = "jaraco.net";
45 rev = "refs/tags/v${version}";
46 hash = "sha256-z9+gz6Sos0uluU5icXJN9OMmWFErVrJXBvoBcKv6Wwg=";
47 };
48
49 nativeBuildInputs = [
50 setuptools
51 setuptools-scm
52 ];
53
54 propagatedBuildInputs = [
55 more-itertools
56 beautifulsoup4
57 mechanize
58 keyring
59 requests
60 feedparser
61 icmplib
62 jaraco-text
63 jaraco-logging
64 jaraco-email
65 jaraco-functools
66 jaraco-collections
67 path
68 python-dateutil
69 pathvalidate
70 jsonpickle
71 ] ++ lib.optionals stdenv.isDarwin [ ifconfig-parser ];
72
73 pythonImportsCheck = [ "jaraco.net" ];
74
75 nativeCheckInputs = [
76 pytestCheckHook
77 cherrypy
78 importlib-resources
79 pyparsing
80 requests-mock
81 ] ++ lib.optionals stdenv.isDarwin [ nettools ];
82
83 disabledTestPaths = [
84 # doesn't actually contain tests
85 "fabfile.py"
86 # require networking
87 "jaraco/net/ntp.py"
88 "jaraco/net/scanner.py"
89 "tests/test_cookies.py"
90 ];
91
92 # cherrypy does not support Python 3.11
93 doCheck = pythonOlder "3.11";
94
95 meta = {
96 changelog = "https://github.com/jaraco/jaraco.net/blob/${src.rev}/CHANGES.rst";
97 description = "Networking tools by jaraco";
98 homepage = "https://github.com/jaraco/jaraco.net";
99 license = lib.licenses.mit;
100 maintainers = with lib.maintainers; [ dotlambda ];
101 };
102}