diff --git a/var/spack/repos/builtin/packages/py-flake8/package.py b/var/spack/repos/builtin/packages/py-flake8/package.py index adbdbd32a0..eeb81aa684 100644 --- a/var/spack/repos/builtin/packages/py-flake8/package.py +++ b/var/spack/repos/builtin/packages/py-flake8/package.py @@ -66,3 +66,7 @@ class PyFlake8(PythonPackage): # TODO: Add test dependencies # depends_on('py-nose', type='test') + + def patch(self): + """Filter pytest-runner requirement out of setup.py.""" + filter_file("['pytest-runner']", "[]", 'setup.py', string=True) diff --git a/var/spack/repos/builtin/packages/py-mccabe/package.py b/var/spack/repos/builtin/packages/py-mccabe/package.py index 54b52c6bdd..a7fabb760a 100644 --- a/var/spack/repos/builtin/packages/py-mccabe/package.py +++ b/var/spack/repos/builtin/packages/py-mccabe/package.py @@ -47,3 +47,7 @@ class PyMccabe(PythonPackage): # TODO: Add test dependencies # depends_on('py-pytest', type='test') + + def patch(self): + """Filter pytest-runner requirement out of setup.py.""" + filter_file("['pytest-runner']", "[]", 'setup.py', string=True)