Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / python-swiftclient / default.nix
blob4e7c02371071bd7b9d57d7f350534b5fbdd23003
1 { lib
2 , buildPythonPackage
3 , fetchPypi
4 , installShellFiles
5 , mock
6 , openstacksdk
7 , pbr
8 , python-keystoneclient
9 , pythonOlder
10 , stestr
13 buildPythonPackage rec {
14   pname = "python-swiftclient";
15   version = "4.5.0";
16   format = "setuptools";
18   disabled = pythonOlder "3.6";
20   src = fetchPypi {
21     inherit pname version;
22     hash = "sha256-8qCIflo5KXq8BDJRrj+QiRTOFEei+NLcpWcWGGCBQr0=";
23   };
25   # remove duplicate script that will be created by setuptools from the
26   # entry_points section of setup.cfg
27   postPatch = ''
28     sed -i '/^scripts =/d' setup.cfg
29     sed -i '/bin\/swift/d' setup.cfg
30   '';
32   nativeBuildInputs = [
33     installShellFiles
34   ];
36   propagatedBuildInputs = [
37     pbr
38     python-keystoneclient
39   ];
41   nativeCheckInputs = [
42     mock
43     openstacksdk
44     stestr
45   ];
47   postInstall = ''
48     installShellCompletion --cmd swift \
49       --bash tools/swift.bash_completion
50     installManPage doc/manpages/*
51   '';
53   checkPhase = ''
54     stestr run
55   '';
57   pythonImportsCheck = [
58     "swiftclient"
59   ];
61   meta = with lib; {
62     homepage = "https://github.com/openstack/python-swiftclient";
63     description = "Python bindings to the OpenStack Object Storage API";
64     mainProgram = "swift";
65     license = licenses.asl20;
66     maintainers = teams.openstack.members;
67   };