2021-09-18 10:52:07 +00:00
|
|
|
{ lib
|
2022-10-30 15:09:59 +00:00
|
|
|
, buildPythonPackage
|
2021-09-18 10:52:07 +00:00
|
|
|
, fetchPypi
|
2022-07-14 12:49:19 +00:00
|
|
|
, installShellFiles
|
2021-09-18 10:52:07 +00:00
|
|
|
, mock
|
|
|
|
, openstacksdk
|
|
|
|
, pbr
|
|
|
|
, python-keystoneclient
|
2022-06-16 17:23:12 +00:00
|
|
|
, pythonOlder
|
2021-09-18 10:52:07 +00:00
|
|
|
, stestr
|
|
|
|
}:
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
buildPythonPackage rec {
|
2021-09-18 10:52:07 +00:00
|
|
|
pname = "python-swiftclient";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "4.5.0";
|
2022-06-16 17:23:12 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-8qCIflo5KXq8BDJRrj+QiRTOFEei+NLcpWcWGGCBQr0=";
|
2021-09-18 10:52:07 +00:00
|
|
|
};
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
# remove duplicate script that will be created by setuptools from the
|
|
|
|
# entry_points section of setup.cfg
|
|
|
|
postPatch = ''
|
|
|
|
sed -i '/^scripts =/d' setup.cfg
|
|
|
|
sed -i '/bin\/swift/d' setup.cfg
|
|
|
|
'';
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
installShellFiles
|
|
|
|
];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
pbr
|
|
|
|
python-keystoneclient
|
|
|
|
];
|
2021-09-18 10:52:07 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-09-18 10:52:07 +00:00
|
|
|
mock
|
|
|
|
openstacksdk
|
|
|
|
stestr
|
|
|
|
];
|
|
|
|
|
2021-10-01 09:20:50 +00:00
|
|
|
postInstall = ''
|
2022-07-14 12:49:19 +00:00
|
|
|
installShellCompletion --cmd swift \
|
|
|
|
--bash tools/swift.bash_completion
|
|
|
|
installManPage doc/manpages/*
|
2021-10-01 09:20:50 +00:00
|
|
|
'';
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
checkPhase = ''
|
|
|
|
stestr run
|
|
|
|
'';
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"swiftclient"
|
|
|
|
];
|
2021-09-22 15:38:15 +00:00
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/openstack/python-swiftclient";
|
|
|
|
description = "Python bindings to the OpenStack Object Storage API";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "swift";
|
2021-09-18 10:52:07 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = teams.openstack.members;
|
|
|
|
};
|
|
|
|
}
|