depot/third_party/nixpkgs/pkgs/development/python-modules/mockfs/default.nix
Default email 2c76a4cb41 Project import generated by Copybara.
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
2023-11-16 04:20:00 +00: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; [ ];
};
}