From aa8ff56401728ac23c074b2b027e2f44a1111d51 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Mon, 12 Nov 2018 18:12:13 -0500 Subject: [PATCH] python3Packages.async_generator: fix build on python3.5 --- pkgs/development/python-modules/async_generator/default.nix | 5 ++++- pkgs/development/python-modules/pytest-asyncio/default.nix | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/async_generator/default.nix b/pkgs/development/python-modules/async_generator/default.nix index 6bf77ecd75e..b8ec2f54476 100644 --- a/pkgs/development/python-modules/async_generator/default.nix +++ b/pkgs/development/python-modules/async_generator/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchPypi, pythonOlder, pytest, pytest-asyncio }: +{ lib, buildPythonPackage, fetchPypi, pythonOlder, isPy35, pytest, pytest-asyncio }: buildPythonPackage rec { pname = "async_generator"; @@ -17,6 +17,9 @@ buildPythonPackage rec { pytest -W error -ra -v --pyargs async_generator ''; + # disable tests on python3.5 to avoid circular dependency with pytest-asyncio + doCheck = !isPy35; + meta = with lib; { description = "Async generators and context managers for Python 3.5+"; homepage = https://github.com/python-trio/async_generator; diff --git a/pkgs/development/python-modules/pytest-asyncio/default.nix b/pkgs/development/python-modules/pytest-asyncio/default.nix index 6b4ce6f6123..24602c52260 100644 --- a/pkgs/development/python-modules/pytest-asyncio/default.nix +++ b/pkgs/development/python-modules/pytest-asyncio/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPythonPackage, fetchPypi, pytest, isPy3k }: +{ stdenv, buildPythonPackage, fetchPypi, pytest, isPy3k, isPy35, async_generator }: buildPythonPackage rec { pname = "pytest-asyncio"; version = "0.9.0"; @@ -10,7 +10,8 @@ buildPythonPackage rec { sha256 = "fbd92c067c16111174a1286bfb253660f1e564e5146b39eeed1133315cf2c2cf"; }; - buildInputs = [ pytest ]; + buildInputs = [ pytest ] + ++ stdenv.lib.optionals isPy35 [ async_generator ]; # No tests in archive doCheck = false;