472aeafc57
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
74 lines
1.5 KiB
Nix
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 ];
|
|
|
|
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 ];
|
|
};
|
|
}
|