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