From 0756066b1b5d9d4d7a4da2fcc157a07ef4bc3c6d Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Tue, 8 Jan 2019 00:02:12 -0500 Subject: [PATCH] pythonPackages.pyristent: add pytestrunner, fix build --- .../python-modules/pyrsistent/default.nix | 9 +++++---- .../no-setup-requires-pytestrunner.patch | 15 +++++++++++++++ 2 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 pkgs/development/python-modules/pyrsistent/no-setup-requires-pytestrunner.patch diff --git a/pkgs/development/python-modules/pyrsistent/default.nix b/pkgs/development/python-modules/pyrsistent/default.nix index 0c32c4ef386..ceb0d718a40 100644 --- a/pkgs/development/python-modules/pyrsistent/default.nix +++ b/pkgs/development/python-modules/pyrsistent/default.nix @@ -4,6 +4,7 @@ , six , pytest , hypothesis +, pytestrunner }: buildPythonPackage rec { @@ -16,11 +17,11 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ six ]; - buildInputs = [ pytest hypothesis ]; - checkPhase = '' - py.test - ''; + checkInputs = [ pytestrunner pytest hypothesis ]; + + # pytestrunner is only needed to run tests + patches = [ ./no-setup-requires-pytestrunner.patch ]; meta = with stdenv.lib; { homepage = https://github.com/tobgu/pyrsistent/; diff --git a/pkgs/development/python-modules/pyrsistent/no-setup-requires-pytestrunner.patch b/pkgs/development/python-modules/pyrsistent/no-setup-requires-pytestrunner.patch new file mode 100644 index 00000000000..74d85dc4293 --- /dev/null +++ b/pkgs/development/python-modules/pyrsistent/no-setup-requires-pytestrunner.patch @@ -0,0 +1,15 @@ +diff --git a/setup.py b/setup.py +index 90a39a5..7bf444f 100644 +--- a/setup.py ++++ b/setup.py +@@ -77,9 +77,8 @@ setup( + 'Programming Language :: Python :: Implementation :: PyPy', + ], + test_suite='tests', +- tests_require=['pytest','hypothesis'], ++ tests_require=['pytest-runner', 'pytest','hypothesis'], + scripts=[], +- setup_requires=['pytest-runner'], + ext_modules=extensions, + cmdclass={'build_ext': custom_build_ext}, + install_requires=['six'],