diff options
Diffstat (limited to 'pkgs/development/python-modules/yarl/default.nix')
-rw-r--r-- | pkgs/development/python-modules/yarl/default.nix | 44 |
1 files changed, 32 insertions, 12 deletions
diff --git a/pkgs/development/python-modules/yarl/default.nix b/pkgs/development/python-modules/yarl/default.nix index 66d219f9348..a5aab308eab 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 +, idna , multidict -, pytest-runner -, pytest , typing-extensions -, idna +, 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 ]; }; |