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