1{ lib
2, buildPythonApplication
3, fetchPypi
4, mock
5, openstacksdk
6, pbr
7, python-keystoneclient
8, stestr
9}:
10
11buildPythonApplication rec {
12 pname = "python-swiftclient";
13 version = "3.12.0";
14
15 src = fetchPypi {
16 inherit pname version;
17 sha256 = "sha256-MTtEShTQ+bYoy/PoxS8sQnFlj56KM9QiKFHC5PD3t6A=";
18 };
19
20 propagatedBuildInputs = [ pbr python-keystoneclient ];
21
22 checkInputs = [
23 mock
24 openstacksdk
25 stestr
26 ];
27
28 postInstall = ''
29 install -Dm644 tools/swift.bash_completion $out/share/bash_completion.d/swift
30 '';
31
32 checkPhase = ''
33 stestr run
34 '';
35
36 pythonImportsCheck = [ "swiftclient" ];
37
38 meta = with lib; {
39 homepage = "https://github.com/openstack/python-swiftclient";
40 description = "Python bindings to the OpenStack Object Storage API";
41 license = licenses.asl20;
42 maintainers = teams.openstack.members;
43 };
44}