2022-06-16 17:23:12 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2021-09-18 10:52:07 +00:00
|
|
|
, buildPythonPackage
|
2022-03-30 09:31:56 +00:00
|
|
|
, fetchFromGitHub
|
2021-09-18 10:52:07 +00:00
|
|
|
, cliff
|
|
|
|
, oslo-i18n
|
|
|
|
, oslo-utils
|
|
|
|
, openstacksdk
|
|
|
|
, pbr
|
|
|
|
, requests-mock
|
|
|
|
, simplejson
|
|
|
|
, stestr
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "osc-lib";
|
2022-03-30 09:31:56 +00:00
|
|
|
version = "unstable-2022-03-09";
|
2021-09-18 10:52:07 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "openstack";
|
|
|
|
repo = "osc-lib";
|
|
|
|
rev = "65c73fd5030276e34f3d52c03ddb9d27cd8ec6f5";
|
|
|
|
sha256 = "sha256-CLE9lrMMlvVrihe+N4wvIKe8t9IZ1TpHHVdn2dnvAOI=";
|
2021-09-18 10:52:07 +00:00
|
|
|
};
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
# fake version to make pbr.packaging happy and not reject it...
|
|
|
|
PBR_VERSION = "2.5.0";
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pbr
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
cliff
|
|
|
|
openstacksdk
|
|
|
|
oslo-i18n
|
|
|
|
oslo-utils
|
|
|
|
simplejson
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
requests-mock
|
|
|
|
stestr
|
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
2022-04-15 01:41:22 +00:00
|
|
|
# tests parse cli output which slightly changed
|
|
|
|
stestr run -e <(echo "
|
|
|
|
osc_lib.tests.utils.test_tags.TestTagHelps.test_add_tag_filtering_option_to_parser
|
|
|
|
osc_lib.tests.utils.test_tags.TestTagHelps.test_add_tag_option_to_parser_for_create
|
|
|
|
osc_lib.tests.utils.test_tags.TestTagHelps.test_add_tag_option_to_parser_for_set
|
|
|
|
osc_lib.tests.utils.test_tags.TestTagHelps.test_add_tag_option_to_parser_for_unset
|
|
|
|
")
|
2021-09-18 10:52:07 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "osc_lib" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2021-09-18 10:52:07 +00:00
|
|
|
description = "OpenStackClient Library";
|
|
|
|
homepage = "https://github.com/openstack/osc-lib";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = teams.openstack.members;
|
|
|
|
};
|
|
|
|
}
|