diff --git a/pkgs/development/python-modules/pylxd/default.nix b/pkgs/development/python-modules/pylxd/default.nix index ee860eb6f105..3d94d0db3599 100644 --- a/pkgs/development/python-modules/pylxd/default.nix +++ b/pkgs/development/python-modules/pylxd/default.nix @@ -1,35 +1,51 @@ { lib , buildPythonPackage -, fetchFromGitHub , cryptography -, python-dateutil -, requests -, requests-toolbelt -, requests-unixsocket -, ws4py , ddt +, fetchFromGitHub , mock-services , pytestCheckHook +, python-dateutil +, pythonOlder +, requests +, urllib3 +, pythonRelaxDepsHook +, requests-toolbelt +, requests-unixsocket +, setuptools +, ws4py }: 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; [ ]; }; diff --git a/pkgs/development/python-modules/ws4py/default.nix b/pkgs/development/python-modules/ws4py/default.nix index 6a1cde0a1a90..59dab76820c9 100644 --- a/pkgs/development/python-modules/ws4py/default.nix +++ b/pkgs/development/python-modules/ws4py/default.nix @@ -1,27 +1,53 @@ -{ lib, buildPythonPackage, fetchPypi, pytest, mock, git -, cherrypy, gevent, tornado }: +{ lib +, buildPythonPackage +, cherrypy +, fetchPypi +, gevent +, git +, mock +, pytestCheckHook +, pythonOlder +, setuptools +, tornado +}: buildPythonPackage rec { pname = "ws4py"; version = "0.5.1"; - format = "setuptools"; + pyproject = true; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "29d073d7f2e006373e6a848b1d00951a1107eb81f3742952be905429dc5a5483"; + hash = "sha256-KdBz1/LgBjc+aoSLHQCVGhEH64HzdClSvpBUKdxaVIM="; }; - nativeCheckInputs = [ pytest mock git ]; - propagatedBuildInputs = [ cherrypy gevent tornado ]; + nativeBuildInputs = [ + setuptools + ]; - checkPhase = '' - pytest - ''; + propagatedBuildInputs = [ + cherrypy + gevent + tornado + ]; + + nativeCheckInputs = [ + git + mock + pytestCheckHook + ]; + + pythonImportsCheck = [ + "ws4py" + ]; meta = with lib; { - homepage = "https://ws4py.readthedocs.org"; description = "A WebSocket package for Python"; - maintainers = []; + homepage = "https://ws4py.readthedocs.org"; + changelog = "https://github.com/Lawouach/WebSocket-for-Python/blob/${version}/CHANGELOG.md"; license = licenses.bsd3; + maintainers = with maintainers; [ ]; }; }