From bbca52fd9960a8f776ed664720f7a92977cf029e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 20 Jun 2025 18:02:32 -0700 Subject: [PATCH] python3Packages.furl: modernize --- .../python-modules/furl/default.nix | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/pkgs/development/python-modules/furl/default.nix b/pkgs/development/python-modules/furl/default.nix index b61b51976e1a..9d136aa97c10 100644 --- a/pkgs/development/python-modules/furl/default.nix +++ b/pkgs/development/python-modules/furl/default.nix @@ -1,38 +1,40 @@ { lib, buildPythonPackage, - fetchPypi, - pythonAtLeast, - flake8, + fetchFromGitHub, orderedmultidict, pytestCheckHook, + setuptools, six, }: buildPythonPackage rec { pname = "furl"; version = "2.1.4"; - format = "setuptools"; + pyproject = true; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-h3ZXUBJmySkmlzn7X1mAU0pBq9a7q8s2fBNtHTsqYBU="; + src = fetchFromGitHub { + owner = "gruns"; + repo = "furl"; + tag = "v${version}"; + hash = "sha256-NRkOJlluZjscM4ZhxHoXIzV2A0+mrkaw7rcxfklGCHs="; }; # 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]' + --replace-fail '[0:0:0:0:0:0:0:1:1:1:1:1:1:1:1:9999999999999]' '[2001:db8::9999]' ''; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ orderedmultidict six ]; nativeCheckInputs = [ - flake8 pytestCheckHook ]; @@ -44,10 +46,11 @@ buildPythonPackage rec { pythonImportsCheck = [ "furl" ]; - meta = with lib; { + meta = { + changelog = "https://github.com/gruns/furl/releases/tag/${src.tag}"; description = "Python library that makes parsing and manipulating URLs easy"; homepage = "https://github.com/gruns/furl"; - license = licenses.unlicense; - maintainers = with maintainers; [ vanzef ]; + license = lib.licenses.unlicense; + maintainers = with lib.maintainers; [ vanzef ]; }; }