build-bazel-package: added rm of extra local folders for toolchain configuration...
[NixPkgs.git] / pkgs / development / python-modules / python-swiftclient / default.nix
blob9f4fca6cc4382f6d46b983256b684ace07944735
2   lib,
3   buildPythonPackage,
4   fetchPypi,
5   installShellFiles,
6   mock,
7   openstacksdk,
8   pbr,
9   python-keystoneclient,
10   pythonOlder,
11   stestr,
14 buildPythonPackage rec {
15   pname = "python-swiftclient";
16   version = "4.6.0";
17   format = "setuptools";
19   disabled = pythonOlder "3.6";
21   src = fetchPypi {
22     inherit pname version;
23     hash = "sha256-1NGFQEE4k/wWrYd5HXQPgj92NDXoIS5o61PWDaJjgjM=";
24   };
26   # remove duplicate script that will be created by setuptools from the
27   # entry_points section of setup.cfg
28   postPatch = ''
29     sed -i '/^scripts =/d' setup.cfg
30     sed -i '/bin\/swift/d' setup.cfg
31   '';
33   nativeBuildInputs = [ installShellFiles ];
35   propagatedBuildInputs = [
36     pbr
37     python-keystoneclient
38   ];
40   nativeCheckInputs = [
41     mock
42     openstacksdk
43     stestr
44   ];
46   postInstall = ''
47     installShellCompletion --cmd swift \
48       --bash tools/swift.bash_completion
49     installManPage doc/manpages/*
50   '';
52   checkPhase = ''
53     stestr run
54   '';
56   pythonImportsCheck = [ "swiftclient" ];
58   meta = with lib; {
59     homepage = "https://github.com/openstack/python-swiftclient";
60     description = "Python bindings to the OpenStack Object Storage API";
61     mainProgram = "swift";
62     license = licenses.asl20;
63     maintainers = teams.openstack.members;
64   };