python311Packages.mockfs: init at 1.1.4

Packaged for pyatv tests.
This commit is contained in:
Martin Weinelt 2023-09-20 19:43:15 +02:00
parent 00e2c926b4
commit e4d383983d
2 changed files with 49 additions and 0 deletions

View file

@ -0,0 +1,47 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools
, setuptools-scm
, wheel
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "mockfs";
version = "1.1.4";
format = "pyproject";
src = fetchFromGitHub {
owner = "mockfs";
repo = "mockfs";
rev = "v${version}";
hash = "sha256-JwSkOI0dz9ZetfE0ZL3CthvcCSXGFYX+yQZy/oC6VBk=";
};
postPatch = ''
sed -i '/addopts/d' pytest.ini
'';
env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
nativeBuildInputs = [
setuptools
setuptools-scm
wheel
];
pythonImportsCheck = [ "mockfs" ];
nativeCheckInputs = [
pytestCheckHook
];
meta = with lib; {
description = "A simple mock filesystem for use in unit tests";
homepage = "https://github.com/mockfs/mockfs";
changelog = "https://github.com/mockfs/mockfs/blob/${src.rev}/CHANGES.rst";
license = licenses.mit;
maintainers = with maintainers; [ ];
};
}

View file

@ -6824,6 +6824,8 @@ self: super: with self; {
mock = callPackage ../development/python-modules/mock { };
mockfs = callPackage ../development/python-modules/mockfs { };
mockito = callPackage ../development/python-modules/mockito { };
mock-open = callPackage ../development/python-modules/mock-open { };