1{ lib
2, buildPythonPackage
3, fetchPypi
4, installShellFiles
5, mock
6, openstacksdk
7, pbr
8, python-keystoneclient
9, pythonOlder
10, stestr
11}:
12
13buildPythonPackage rec {
14 pname = "python-swiftclient";
15 version = "4.1.0";
16 format = "setuptools";
17
18 disabled = pythonOlder "3.6";
19
20 src = fetchPypi {
21 inherit pname version;
22 hash = "sha256-+CKY5KSPfL3WgPJjjIXRynrhp27b4wA20htM16KcCes=";
23 };
24
25 nativeBuildInputs = [
26 installShellFiles
27 ];
28
29 propagatedBuildInputs = [
30 pbr
31 python-keystoneclient
32 ];
33
34 checkInputs = [
35 mock
36 openstacksdk
37 stestr
38 ];
39
40 postInstall = ''
41 installShellCompletion --cmd swift \
42 --bash tools/swift.bash_completion
43 installManPage doc/manpages/*
44 '';
45
46 checkPhase = ''
47 stestr run
48 '';
49
50 pythonImportsCheck = [
51 "swiftclient"
52 ];
53
54 meta = with lib; {
55 homepage = "https://github.com/openstack/python-swiftclient";
56 description = "Python bindings to the OpenStack Object Storage API";
57 license = licenses.asl20;
58 maintainers = teams.openstack.members;
59 };
60}