Commit 133fa25e authored by Fabian Affolter's avatar Fabian Affolter
Browse files

python311Packages.slack-bolt: add optional-dependencies

parent 5fd650cb
Loading
Loading
Loading
Loading
+39 −15
Original line number Diff line number Diff line
{ buildPythonPackage
{ aiohttp
, bottle
, buildPythonPackage
, chalice
, cherrypy
, django
@@ -7,17 +9,23 @@
, fetchFromGitHub
, flask
, flask-sockets
, gunicorn
, lib
, moto
, numpy
, pyramid
, pytest-asyncio
, pytestCheckHook
, pythonOlder
, sanic
, sanic-testing
, slack-sdk
, starlette
, tornado
, uvicorn
, websocket-client
, websockets
, werkzeug
}:

buildPythonPackage rec {
@@ -25,6 +33,8 @@ buildPythonPackage rec {
  version = "1.18.0";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "slackapi";
    repo = "bolt-python";
@@ -40,7 +50,13 @@ buildPythonPackage rec {

  propagatedBuildInputs = [ slack-sdk ];

  nativeCheckInputs = [
  passthru.optional-dependencies = {
    async = [
      aiohttp
      websockets
    ];
    adapter = [
      bottle
      chalice
      cherrypy
      django
@@ -48,15 +64,23 @@ buildPythonPackage rec {
      fastapi
      flask
      flask-sockets
      gunicorn
      moto
      pyramid
    pytest-asyncio
    pytestCheckHook
      sanic
      sanic-testing
      starlette
      tornado
      uvicorn
      websocket-client
      werkzeug
    ];
  };

  nativeCheckInputs = [
    pytest-asyncio
    pytestCheckHook
  ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);

  # Work around "Read-only file system: '/homeless-shelter'" errors
  preCheck = ''