Unverified Commit 044b008a authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

python3Packages.python-swiftclient: 4.9.0 -> 4.10.0 (#497677)

parents c7802e9c 4c504622
Loading
Loading
Loading
Loading
+55 −25
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchPypi,
  installShellFiles,
  mock,
  openstacksdk,
  fetchFromGitHub,
  pbr,
  setuptools,
  installShellFiles,

  # direct
  python-keystoneclient,

  # tests
  stestrCheckHook,
  versionCheckHook,
  hacking,
  coverage,
  keystoneauth1,
  stestr,
  openstacksdk,

  # docs
  sphinxHook,
  openstackdocstheme,
  sphinxcontrib-apidoc,
}:

buildPythonPackage rec {
buildPythonPackage (finalAttrs: {
  pname = "python-swiftclient";
  version = "4.9.0";
  version = "4.10.0";
  pyproject = true;

  src = fetchPypi {
    pname = "python_swiftclient";
    inherit version;
    hash = "sha256-niB7guwxeG8Q24/vbiBWgcJJl6C2ANKKGU+dFakO13I=";
  };

  nativeBuildInputs = [ installShellFiles ];

  build-system = [
    pbr
    setuptools
  ];

  env.PBR_VERSION = finalAttrs.version;

  src = fetchFromGitHub {
    owner = "openstack";
    repo = "python-swiftclient";
    tag = finalAttrs.version;
    hash = "sha256-G3o9R3+hDQgvSnmle0paZo/KV56OMU38tIXqUJGmUaQ=";
  };

  nativeBuildInputs = [
    openstackdocstheme
    sphinxcontrib-apidoc
    sphinxHook
    installShellFiles
  ];

  sphinxBuilders = [ "man" ];

  dependencies = [
    python-keystoneclient
  ];

  nativeCheckInputs = [
    mock
    stestrCheckHook
    openstacksdk
    hacking
    coverage
    keystoneauth1
    stestr
    openstacksdk
  ];

  nativeInstallCheckInputs = [ versionCheckHook ];
  doInstallCheck = true;

  postInstall = ''
    installShellCompletion --cmd swift \
      --bash tools/swift.bash_completion
    installShellCompletion --cmd swift --bash tools/swift.bash_completion
    installManPage doc/manpages/*
  '';

  checkPhase = ''
    stestr run
  '';

  pythonImportsCheck = [ "swiftclient" ];
  pythonImportsCheck = [
    "swiftclient"
  ];

  meta = {
    homepage = "https://github.com/openstack/python-swiftclient";
    description = "Python bindings to the OpenStack Object Storage API";
    description = "Client library for OpenStack Swift API";
    mainProgram = "swift";
    homepage = "https://docs.openstack.org/python-swiftclient/latest/";
    downloadPage = "https://github.com/openstack/python-swiftclient/releases/tag/${finalAttrs.src.tag}";
    license = lib.licenses.asl20;
    teams = [ lib.teams.openstack ];
  };
}
})