diff --git a/pkgs/development/python-modules/python-socketio/4.nix b/pkgs/development/python-modules/python-socketio/4.nix new file mode 100644 index 000000000000..3a6f5d87fdd4 --- /dev/null +++ b/pkgs/development/python-modules/python-socketio/4.nix @@ -0,0 +1,47 @@ +{ lib +, bidict +, buildPythonPackage +, fetchFromGitHub +, mock +, pytestCheckHook +, python-engineio_3 +}: + +buildPythonPackage rec { + pname = "python-socketio"; + version = "4.6.1"; + + src = fetchFromGitHub { + owner = "miguelgrinberg"; + repo = "python-socketio"; + rev = "v${version}"; + sha256 = "14dijag17v84v0pp9qi89h5awb4h4i9rj0ppkixqv6is9z9lflw5"; + }; + + propagatedBuildInputs = [ + bidict + python-engineio_3 + ]; + + checkInputs = [ + mock + pytestCheckHook + ]; + + pythonImportsCheck = [ "socketio" ]; + + # pytestCheckHook seems to change the default log level to WARNING, but the + # tests assert it is ERROR + disabledTests = [ "test_logger" ]; + + meta = with lib; { + description = "Python Socket.IO server and client 4.x"; + longDescription = '' + Socket.IO is a lightweight transport protocol that enables real-time + bidirectional event-based communication between clients and a server. + ''; + homepage = "https://github.com/miguelgrinberg/python-socketio/"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ graham33 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b37c12ba1ec9..a8358e9f327b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6449,6 +6449,8 @@ in { python-socketio = callPackage ../development/python-modules/python-socketio { }; + python-socketio_4 = callPackage ../development/python-modules/python-socketio/4.nix { }; + python-sql = callPackage ../development/python-modules/python-sql { }; python_statsd = callPackage ../development/python-modules/python_statsd { };