2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
2024-07-27 06:49:29 +00:00
|
|
|
pythonAtLeast,
|
2024-06-05 15:53:02 +00:00
|
|
|
flake8,
|
|
|
|
orderedmultidict,
|
|
|
|
pytestCheckHook,
|
|
|
|
six,
|
2021-03-09 03:18:52 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "furl";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "2.1.3";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "5a6188fe2666c484a12159c18be97a1977a71d632ef5bb867ef15f54af39cc4e";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
# 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]'
|
|
|
|
'';
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
orderedmultidict
|
|
|
|
six
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-03-09 03:18:52 +00:00
|
|
|
flake8
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
disabledTests = lib.optionals (pythonAtLeast "3.12") [
|
|
|
|
# AssertionError: assert '//////path' == '////path'
|
|
|
|
"test_odd_urls"
|
|
|
|
];
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
pythonImportsCheck = [ "furl" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-03-09 03:18:52 +00:00
|
|
|
description = "Python library that makes parsing and manipulating URLs easy";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/gruns/furl";
|
|
|
|
license = licenses.unlicense;
|
|
|
|
maintainers = with maintainers; [ vanzef ];
|
|
|
|
};
|
|
|
|
}
|