about summary refs log tree commit diff
path: root/pkgs/development/python-modules/urlpy/default.nix
blob: fda5519701faa094e2fb7ae02924e6d64d2aa2b4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{
  lib,
  fetchFromGitHub,
  buildPythonPackage,
  publicsuffix2,
  pytestCheckHook,
  pythonAtLeast,
}:
buildPythonPackage rec {
  pname = "urlpy";
  version = "0.5.0";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "nexB";
    repo = "urlpy";
    rev = "v${version}";
    sha256 = "962jLyx+/GS8wrDPzG2ONnHvtUG5Pqe6l1Z5ml63Cmg=";
  };

  dontConfigure = true;

  propagatedBuildInputs = [ publicsuffix2 ];

  nativeCheckInputs = [ pytestCheckHook ];

  disabledTests = lib.optionals (pythonAtLeast "3.9") [
    # Fails with "AssertionError: assert 'unknown' == ''"
    "test_unknown_protocol"
  ];

  pythonImportsCheck = [ "urlpy" ];

  meta = with lib; {
    description = "Simple URL parsing, canonicalization and equivalence";
    homepage = "https://github.com/nexB/urlpy";
    license = licenses.mit;
    maintainers = [ ];
  };
}