depot/third_party/nixpkgs/pkgs/development/python-modules/mockfs/default.nix
Default email e7ec2969af Project import generated by Copybara.
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
2024-01-13 09:15:51 +01:00

48 lines
939 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools
, setuptools-scm
, importlib-metadata
, 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
'';
nativeBuildInputs = [
setuptools
setuptools-scm
];
propagatedBuildInputs = [
importlib-metadata
];
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; [ ];
};
}