nixpkgs/pkgs/development/python-modules/mockfs/default.nix
Martin Weinelt e4d383983d python311Packages.mockfs: init at 1.1.4
Packaged for pyatv tests.
2023-09-27 15:34:46 +02:00

47 lines
928 B
Nix

{ 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; [ ];
};
}