depot/third_party/nixpkgs/pkgs/development/python-modules/plumbum/default.nix
Default email 5c370c0b2a Project import generated by Copybara.
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
2024-05-15 17:35:15 +02:00

71 lines
1.3 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, hatchling
, hatch-vcs
, openssh
, ps
, psutil
, pytest-mock
, pytest-timeout
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "plumbum";
version = "1.8.3";
format = "pyproject";
src = fetchFromGitHub {
owner = "tomerfiliba";
repo = "plumbum";
rev = "refs/tags/v${version}";
hash = "sha256-k2H/FBQAWrCN1P587s/OhiCGNasMKEFJYIBIU808rlE=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace '"--cov-config=setup.cfg", ' ""
'';
nativeBuildInputs = [
hatchling
hatch-vcs
];
nativeCheckInputs = [
openssh
ps
psutil
pytest-mock
pytest-timeout
pytestCheckHook
];
preCheck = ''
export HOME=$TMP
'';
disabledTests = [
# broken in nix env
"test_change_env"
"test_dictlike"
"test_local"
# incompatible with pytest 7
"test_incorrect_login"
];
disabledTestPaths = [
# incompatible with pytest7
# https://github.com/tomerfiliba/plumbum/issues/594
"tests/test_remote.py"
];
meta = with lib; {
changelog = "https://github.com/tomerfiliba/plumbum/releases/tag/v${version}";
description = " Plumbum: Shell Combinators ";
homepage = " https://github.com/tomerfiliba/plumbum ";
license = licenses.mit;
maintainers = with maintainers; [ ];
};
}