1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pythonAtLeast,
6 flake8,
7 orderedmultidict,
8 pytestCheckHook,
9 six,
10}:
11
12buildPythonPackage rec {
13 pname = "furl";
14 version = "2.1.4";
15 format = "setuptools";
16
17 src = fetchPypi {
18 inherit pname version;
19 sha256 = "sha256-h3ZXUBJmySkmlzn7X1mAU0pBq9a7q8s2fBNtHTsqYBU=";
20 };
21
22 # With python 3.11.4, invalid IPv6 address does throw ValueError
23 # https://github.com/gruns/furl/issues/164#issuecomment-1595637359
24 postPatch = ''
25 substituteInPlace tests/test_furl.py \
26 --replace '[0:0:0:0:0:0:0:1:1:1:1:1:1:1:1:9999999999999]' '[2001:db8::9999]'
27 '';
28
29 propagatedBuildInputs = [
30 orderedmultidict
31 six
32 ];
33
34 nativeCheckInputs = [
35 flake8
36 pytestCheckHook
37 ];
38
39 disabledTests = [
40 # AssertionError: assert '//////path' == '////path'
41 # https://github.com/gruns/furl/issues/176
42 "test_odd_urls"
43 ];
44
45 pythonImportsCheck = [ "furl" ];
46
47 meta = with lib; {
48 description = "Python library that makes parsing and manipulating URLs easy";
49 homepage = "https://github.com/gruns/furl";
50 license = licenses.unlicense;
51 maintainers = with maintainers; [ vanzef ];
52 };
53}