1{ lib
2, buildPythonPackage
3, dnspython
4, fetchPypi
5, filelock
6, idna
7, platformdirs
8, pytestCheckHook
9, pythonOlder
10, uritools
11}:
12
13buildPythonPackage rec {
14 pname = "urlextract";
15 version = "1.7.1";
16 format = "setuptools";
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchPypi {
21 inherit pname version;
22 hash = "sha256-DYg7Wd5Th4c+o4JeYrNDWDMTE1rGZMP1wNVfF7Kzv30=";
23 };
24
25 propagatedBuildInputs = [
26 filelock
27 idna
28 platformdirs
29 uritools
30 ];
31
32 checkInputs = [
33 dnspython
34 pytestCheckHook
35 ];
36
37 disabledTests = [
38 # fails with dns.resolver.NoResolverConfiguration due to network sandboxing
39 "test_check_dns_enabled"
40 "test_check_dns_find_urls"
41 "test_dns_cache_init"
42 "test_dns_cache_negative"
43 "test_dns_cache_reuse"
44 ];
45
46 pythonImportsCheck = [
47 "urlextract"
48 ];
49
50 meta = with lib; {
51 description = "Collects and extracts URLs from given text";
52 homepage = "https://github.com/lipoja/URLExtract";
53 license = licenses.mit;
54 maintainers = with maintainers; [ ilkecan ];
55 };
56}