From b78b4fd17873ea54b917a105fc9224d0412e4947 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 8 Oct 2021 23:40:33 -0700 Subject: [PATCH 1/2] python3Packages.yarl: 1.6.3 -> 1.7.0 --- .../python-modules/yarl/default.nix | 46 +++++++++++++------ 1 file changed, 33 insertions(+), 13 deletions(-) diff --git a/pkgs/development/python-modules/yarl/default.nix b/pkgs/development/python-modules/yarl/default.nix index 66d219f9348e..a5aab308eab6 100644 --- a/pkgs/development/python-modules/yarl/default.nix +++ b/pkgs/development/python-modules/yarl/default.nix @@ -1,32 +1,52 @@ { lib -, fetchPypi , buildPythonPackage +, fetchPypi +, python , pythonOlder -, multidict -, pytest-runner -, pytest -, typing-extensions , idna +, multidict +, typing-extensions +, pytestCheckHook }: buildPythonPackage rec { pname = "yarl"; - version = "1.6.3"; + version = "1.7.0"; src = fetchPypi { inherit pname version; - sha256 = "8a9066529240171b68893d60dca86a763eae2139dd42f42106b03cf4b426bf10"; + sha256 = "8e7ebaf62e19c2feb097ffb7c94deb0f0c9fab52590784c8cd679d30ab009162"; }; - checkInputs = [ pytest pytest-runner ]; - propagatedBuildInputs = [ multidict idna ] - ++ lib.optionals (pythonOlder "3.8") [ - typing-extensions - ]; + postPatch = '' + sed -i '/^addopts/d' setup.cfg + ''; + + propagatedBuildInputs = [ + idna + multidict + ] ++ lib.optionals (pythonOlder "3.8") [ + typing-extensions + ]; + + preCheck = '' + # don't import yarl from ./ so the C extension is available + pushd tests + ''; + + checkInputs = [ + pytestCheckHook + ]; + + postCheck = '' + popd + ''; + + pythonImportsCheck = [ "yarl" ]; meta = with lib; { description = "Yet another URL library"; - homepage = "https://github.com/aio-libs/yarl/"; + homepage = "https://github.com/aio-libs/yarl"; license = licenses.asl20; maintainers = with maintainers; [ dotlambda ]; }; From 7a6f97d33b998d740fc04f7e9de5ee25bace9f3b Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sat, 9 Oct 2021 13:13:08 +0200 Subject: [PATCH 2/2] home-assistant: relax yarl constraint --- pkgs/servers/home-assistant/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index 57f753439fd2..13d8f941b001 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -178,7 +178,8 @@ in with py.pkgs; buildPythonApplication rec { --replace "pip>=8.0.3,<20.3" "pip" \ --replace "requests==2.25.1" "requests>=2.25.1" \ --replace "ruamel.yaml==0.15.100" "ruamel.yaml" \ - --replace "voluptuous==0.12.1" "voluptuous==0.12.2" + --replace "voluptuous==0.12.1" "voluptuous==0.12.2" \ + --replace "yarl==1.6.3" "yarl==1.7.0" substituteInPlace tests/test_config.py --replace '"/usr"' '"/build/media"' '';