biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / publicsuffix2 / default.nix
blobc11880a620c36509ac42466d082c6b7534240b7e
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   setuptools,
6 }:
7 let
8   tagVersion = "2.2019-12-21";
9 in
10 buildPythonPackage {
11   pname = "publicsuffix2";
12   # tags have dashes, while the library version does not
13   # see https://github.com/nexB/python-publicsuffix2/issues/12
14   version = lib.replaceStrings [ "-" ] [ "" ] tagVersion;
15   pyproject = true;
17   src = fetchFromGitHub {
18     owner = "nexB";
19     repo = "python-publicsuffix2";
20     rev = "release-${tagVersion}";
21     hash = "sha256-OV0O4LLxQ2LQiEHc1JTvScu35o2IWxo/hgn/COh2e7Y=";
22   };
24   build-system = [ setuptools ];
26   postPatch = ''
27     # only used to update the interal publicsuffix list
28     substituteInPlace setup.py \
29       --replace "'requests >= 2.7.0'," ""
30   '';
32   pythonImportsCheck = [ "publicsuffix2" ];
34   meta = with lib; {
35     description = "Get a public suffix for a domain name using the Public Suffix List";
36     homepage = "https://github.com/nexB/python-publicsuffix2";
37     license = licenses.mpl20;
38     maintainers = [ ];
39   };