Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / pytest-raisesregexp / default.nix
blobedca8cbaa97dd75d6618b24fa78ee344e42d827a
1 { lib, buildPythonPackage, fetchPypi
2 , py, pytest }:
4 buildPythonPackage rec {
5   pname = "pytest-raisesregexp";
6   version = "2.1";
7   format = "setuptools";
9   src = fetchPypi {
10     inherit pname version;
11     sha256 = "b54372494fc1f11388b1b9348aeb36b69609699eb8f46e0e010afc733d78236a";
12   };
14   buildInputs = [ py pytest ];
16   # https://github.com/kissgyorgy/pytest-raisesregexp/pull/3
17   prePatch = ''
18     sed -i '3i\import io' setup.py
19     substituteInPlace setup.py --replace "long_description=open('README.rst').read()," "long_description=io.open('README.rst', encoding='utf-8').read(),"
20   '';
22   meta = with lib; {
23     description = "Simple pytest plugin to look for regex in Exceptions";
24     homepage = "https://github.com/Walkman/pytest_raisesregexp";
25     license = with licenses; [ mit ];
26   };