Merge pull request #294248 from fabaff/ws4py-refactor

python312Packages.ws4py: refactor
This commit is contained in:
Fabian Affolter 2024-03-08 13:28:37 +01:00 committed by GitHub
commit 60810be1ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 67 additions and 22 deletions

View File

@ -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; [ ];
};

View File

@ -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; [ ];
};
}