Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / pytest-raisesregexp / default.nix
blob78b99714378f67074e8fee058f8d5b41892883e8
1 { lib, buildPythonPackage, fetchPypi
2 , py, pytest }:
4 buildPythonPackage rec {
5   pname = "pytest-raisesregexp";
6   version = "2.1";
8   src = fetchPypi {
9     inherit pname version;
10     sha256 = "b54372494fc1f11388b1b9348aeb36b69609699eb8f46e0e010afc733d78236a";
11   };
13   buildInputs = [ py pytest ];
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   '';
21   meta = with 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   };