about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/furl/default.nix
blob: 3c9592c37d0d4d2dfec9174d51f292b85a947cde (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
41
42
43
44
{ lib
, buildPythonPackage
, fetchPypi
, flake8
, orderedmultidict
, pytestCheckHook
, six
}:

buildPythonPackage rec {
  pname = "furl";
  version = "2.1.3";

  src = fetchPypi {
    inherit pname version;
    sha256 = "5a6188fe2666c484a12159c18be97a1977a71d632ef5bb867ef15f54af39cc4e";
  };

  # With python 3.11.4, invalid IPv6 address does throw ValueError
  # https://github.com/gruns/furl/issues/164#issuecomment-1595637359
  postPatch = ''
    substituteInPlace tests/test_furl.py \
      --replace '[0:0:0:0:0:0:0:1:1:1:1:1:1:1:1:9999999999999]' '[2001:db8::9999]'
  '';

  propagatedBuildInputs = [
    orderedmultidict
    six
  ];

  nativeCheckInputs = [
    flake8
    pytestCheckHook
  ];

  pythonImportsCheck = [ "furl" ];

  meta = with lib; {
    description = "Python library that makes parsing and manipulating URLs easy";
    homepage = "https://github.com/gruns/furl";
    license = licenses.unlicense;
    maintainers = with maintainers; [ vanzef ];
  };
}