1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 py,
6 pytest,
7}:
8
9buildPythonPackage rec {
10 pname = "pytest-raisesregexp";
11 version = "2.1";
12 format = "setuptools";
13
14 src = fetchPypi {
15 inherit pname version;
16 sha256 = "b54372494fc1f11388b1b9348aeb36b69609699eb8f46e0e010afc733d78236a";
17 };
18
19 buildInputs = [
20 py
21 pytest
22 ];
23
24 # https://github.com/kissgyorgy/pytest-raisesregexp/pull/3
25 prePatch = ''
26 sed -i '3i\import io' setup.py
27 substituteInPlace setup.py --replace "long_description=open('README.rst').read()," "long_description=io.open('README.rst', encoding='utf-8').read(),"
28 '';
29
30 meta = with lib; {
31 description = "Simple pytest plugin to look for regex in Exceptions";
32 homepage = "https://github.com/Walkman/pytest_raisesregexp";
33 license = with licenses; [ mit ];
34 };
35}