2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
coreutils,
|
|
|
|
setuptools,
|
|
|
|
pbr,
|
|
|
|
prettytable,
|
|
|
|
keystoneauth1,
|
|
|
|
requests,
|
|
|
|
warlock,
|
|
|
|
oslo-utils,
|
|
|
|
oslo-i18n,
|
|
|
|
wrapt,
|
|
|
|
pyopenssl,
|
|
|
|
pythonOlder,
|
|
|
|
stestr,
|
|
|
|
testscenarios,
|
|
|
|
ddt,
|
|
|
|
requests-mock,
|
|
|
|
writeText,
|
2021-09-22 15:38:15 +00:00
|
|
|
}:
|
2024-05-15 15:35:15 +00:00
|
|
|
let
|
2021-09-22 15:38:15 +00:00
|
|
|
pname = "python-glanceclient";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "4.7.0";
|
2024-05-15 15:35:15 +00:00
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
"test_http_chunked_response"
|
|
|
|
"test_v1_download_has_no_stray_output_to_stdout"
|
|
|
|
"test_v2_requests_valid_cert_verification"
|
|
|
|
"test_download_has_no_stray_output_to_stdout"
|
|
|
|
"test_v2_download_has_no_stray_output_to_stdout"
|
|
|
|
"test_v2_requests_valid_cert_verification_no_compression"
|
|
|
|
"test_log_request_id_once"
|
|
|
|
];
|
|
|
|
in
|
|
|
|
buildPythonPackage {
|
|
|
|
inherit pname version;
|
|
|
|
pyproject = true;
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
2021-09-22 15:38:15 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-wZRS7xLaPEhLadIqiIznp0kQvbh4O76RJIxg76U3iBA=";
|
2021-09-22 15:38:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace glanceclient/tests/unit/v1/test_shell.py \
|
2024-05-15 15:35:15 +00:00
|
|
|
--replace-fail "/bin/echo" "${lib.getExe' coreutils "echo"}"
|
2021-09-22 15:38:15 +00:00
|
|
|
'';
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
|
|
|
|
2021-09-22 15:38:15 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
pbr
|
|
|
|
prettytable
|
|
|
|
keystoneauth1
|
|
|
|
requests
|
|
|
|
warlock
|
|
|
|
oslo-utils
|
|
|
|
oslo-i18n
|
|
|
|
wrapt
|
|
|
|
pyopenssl
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-09-22 15:38:15 +00:00
|
|
|
stestr
|
|
|
|
testscenarios
|
|
|
|
ddt
|
|
|
|
requests-mock
|
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
2024-05-15 15:35:15 +00:00
|
|
|
runHook preCheck
|
|
|
|
stestr run -e ${writeText "disabled-tests" (lib.concatStringsSep "\n" disabledTests)}
|
|
|
|
runHook postCheck
|
2021-09-22 15:38:15 +00:00
|
|
|
'';
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
pythonImportsCheck = [ "glanceclient" ];
|
2021-09-22 15:38:15 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python bindings for the OpenStack Images API";
|
|
|
|
homepage = "https://github.com/openstack/python-glanceclient/";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = teams.openstack.members;
|
|
|
|
};
|
|
|
|
}
|