depot/third_party/nixpkgs/pkgs/development/python-modules/podman/default.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

74 lines
1.5 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
fixtures,
pytestCheckHook,
pythonOlder,
requests,
requests-mock,
rich,
setuptools,
tomli,
urllib3,
}:
buildPythonPackage rec {
pname = "podman";
version = "5.2.0";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "containers";
repo = "podman-py";
rev = "refs/tags/v${version}";
hash = "sha256-2NsF00jaW2wl99sTxTQ5xJkqNOYh9RaecmBMcWP3TI8=";
};
build-system = [ setuptools ];
dependencies = [
requests
urllib3
] ++ lib.optionals (pythonOlder "3.11") [ tomli ];
passthru.optional-dependencies = {
progress_bar = [ rich ];
};
nativeCheckInputs = [
fixtures
pytestCheckHook
requests-mock
];
preCheck = ''
export HOME=$(mktemp -d)
'';
pythonImportsCheck = [ "podman" ];
disabledTests = [
# Integration tests require a running container setup
"AdapterIntegrationTest"
"ContainersIntegrationTest"
"ContainersExecIntegrationTests"
"ImagesIntegrationTest"
"ManifestsIntegrationTest"
"NetworksIntegrationTest"
"PodsIntegrationTest"
"SecretsIntegrationTest"
"SystemIntegrationTest"
"VolumesIntegrationTest"
];
meta = with lib; {
description = "Python bindings for Podman's RESTful API";
homepage = "https://github.com/containers/podman-py";
changelog = "https://github.com/containers/podman-py/releases/tag/v${version}";
license = licenses.asl20;
maintainers = with maintainers; [ fab ];
};
}