Commit 991d80f1 authored by Fabian Affolter's avatar Fabian Affolter Committed by Weijia Wang
Browse files

python311Packages.pylxd: refactor

parent 6a90ca76
Loading
Loading
Loading
Loading
+28 −9
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchFromGitHub
, cryptography
, ddt
, fetchFromGitHub
, mock-services
, pytestCheckHook
, python-dateutil
, pythonOlder
, requests
, urllib3
, pythonRelaxDepsHook
, requests-toolbelt
, requests-unixsocket
, setuptools
, ws4py
, ddt
, mock-services
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "pylxd";
  version = "2.3.2";
  format = "setuptools";
  pyproject = true;

  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "lxc";
    owner = "canonica";
    repo = "pylxd";
    rev = "refs/tags/${version}";
    hash = "sha256-Q4GMz7HFpJNPYlYgLhE0a7mVCwNpdbw4XVcUGQ2gUJ0=";
  };

  pythonRelaxDeps = [
    "urllib3"
  ];

  nativeBuildInputs = [
    pythonRelaxDepsHook
    setuptools
  ];

  propagatedBuildInputs = [
    cryptography
    python-dateutil
    requests
    requests-toolbelt
    requests-unixsocket
    urllib3
    ws4py
  ];

@@ -44,11 +60,14 @@ buildPythonPackage rec {
    "migration"
  ];

  pythonImportsCheck = [ "pylxd" ];
  pythonImportsCheck = [
    "pylxd"
  ];

  meta = with lib; {
    description = "A Python library for interacting with the LXD REST API";
    homepage = "https://pylxd.readthedocs.io/en/latest/";
    description = "Library for interacting with the LXD REST API";
    homepage = "https://pylxd.readthedocs.io/";
    changelog = "https://github.com/canonical/pylxd/releases/tag/${version}";
    license = licenses.asl20;
    maintainers = with maintainers; [ ];
  };