Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / tldextract / default.nix
blobd5b257abedf524319fe79b3315ad15e22289b1b9
1 { lib
2 , buildPythonPackage
3 , fetchPypi
4 , filelock
5 , idna
6 , pytest-mock
7 , pytestCheckHook
8 , pythonOlder
9 , requests
10 , requests-file
11 , responses
12 , setuptools-scm
15 buildPythonPackage rec {
16   pname   = "tldextract";
17   version = "3.1.0";
18   disabled = pythonOlder "3.6";
20   src = fetchPypi {
21     inherit pname version;
22     sha256 = "cfae9bc8bda37c3e8c7c8639711ad20e95dc85b207a256b60b0b23d7ff5540ea";
23   };
25   nativeBuildInputs = [ setuptools-scm ];
27   propagatedBuildInputs = [
28     filelock
29     idna
30     requests
31     requests-file
32   ];
34   checkInputs = [
35     pytest-mock
36     pytestCheckHook
37     responses
38   ];
40   postPatch = ''
41     substituteInPlace pytest.ini --replace " --pylint" ""
42   '';
44   pythonImportsCheck = [ "tldextract" ];
46   meta = with lib; {
47     description = "Python module to accurately separate the TLD from the domain of an URL";
48     longDescription = ''
49       tldextract accurately separates the gTLD or ccTLD (generic or country code top-level domain)
50       from the registered domain and subdomains of a URL.
51     '';
52     homepage = "https://github.com/john-kurkowski/tldextract";
53     license = with licenses; [ bsd3 ];
54     maintainers = with maintainers; [ fab ];
55   };