Unverified Commit 4da2ae6f authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

Merge pull request #322997 from fabaff/slackclient-remove

python312Packages.slackclient: rename
parents 766a29d7 1cd6c81d
Loading
Loading
Loading
Loading
+60 −16
Original line number Diff line number Diff line
{ lib, fetchFromGitHub, python3Packages }:
{
  lib,
  fetchFromGitHub,
  python3Packages,
}:

python3Packages.buildPythonPackage rec {
  pname = "opsdroid";
  version = "0.25.0";
  version = "0.30.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "opsdroid";
    repo = "opsdroid";
    rev = "v${version}";
    sha256 = "0f32jf2rds9543akysxinf3hsgzr0w880xwcrcm1r2r0nhp8b8s5";
    rev = "refs/tags/v${version}";
    hash = "sha256-7H44wdhJD4Z6OP1sUmSGlepuvx+LlwKLq7iR8cwqR24=";
  };

  disabled = !python3Packages.isPy3k;
  build-system = with python3Packages; [ setuptools ];

  # tests folder is not included in release
  doCheck = false;

  propagatedBuildInputs = with python3Packages; [
    click babel opsdroid-get-image-size slackclient webexteamssdk bleach
    parse emoji puremagic yamale nbformat websockets pycron nbconvert
    aiohttp matrix-api-async aioredis aiosqlite arrow pyyaml motor regex
    mattermostdriver setuptools voluptuous ibm-watson tailer multidict
    watchgod get-video-properties appdirs bitstring matrix-nio
  ] ++ matrix-nio.optional-dependencies.e2e;
  dependencies =
    with python3Packages;
    [
      aiohttp
      aiohttp-middlewares
      aioredis
      aiosqlite
      appdirs
      arrow
      babel
      bitstring
      bleach
      # botbuilder-core, connector for teams
      certifi
      click
      # dialogflow, connector for Dialogflow
      dnspython
      emoji
      get-video-properties
      ibm-watson
      matrix-nio
      mattermostdriver
      motor
      multidict
      nbconvert
      nbformat
      opsdroid-get-image-size
      parse
      puremagic
      pycron
      python-olm
      pyyaml
      regex
      rich
      slack-sdk
      tailer
      voluptuous
      watchgod
      webexteamssdk
      wrapt
    ]
    ++ matrix-nio.optional-dependencies.e2e;

  passthru.python = python3Packages.python;

  # Tests are not included in releases
  doCheck = false;

  meta = with lib; {
    description = "Open source chat-ops bot framework";
    homepage = "https://opsdroid.dev";
    maintainers = with maintainers; [ globin willibutz ];
    changelog = "https://github.com/opsdroid/opsdroid/releases/tag/v${version}";
    license = licenses.asl20;
    maintainers = with maintainers; [
      globin
      willibutz
    ];
    platforms = platforms.unix;
    mainProgram = "opsdroid";
  };
+54 −0
Original line number Diff line number Diff line
{
  lib,
  aiohttp,
  async-timeout,
  buildPythonPackage,
  fetchFromGitHub,
  poetry-core,
  pytest-aiohttp,
  pytestCheckHook,
  pythonOlder,
  yarl,
}:

buildPythonPackage rec {
  pname = "aiohttp-middlewares";
  version = "2.3.0";
  pyproject = true;

  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "playpauseandstop";
    repo = "aiohttp-middlewares";
    rev = "refs/tags/v${version}";
    hash = "sha256-/xij16JUtq5T5KYinduEP+o4XxFQPyL7pfwvZnS96+U=";
  };

  postPatch = ''
    sed -i "/addopts/d" pyproject.toml
  '';

  build-system = [ poetry-core ];

  dependencies = [
    aiohttp
    async-timeout
    yarl
  ];

  nativeCheckInputs = [
    pytest-aiohttp
    pytestCheckHook
  ];

  pythonImportsCheck = [ "aiohttp_middlewares" ];

  meta = with lib; {
    description = "Collection of useful middlewares for aiohttp.web applications";
    homepage = "https://github.com/playpauseandstop/aiohttp-middlewares";
    changelog = "https://github.com/playpauseandstop/aiohttp-middlewares/blob/${version}/CHANGELOG.rst";
    license = licenses.bsd3;
    maintainers = with maintainers; [ fab ];
  };
}
+0 −94
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  aiohttp,
  boto3,
  buildPythonPackage,
  fetchFromGitHub,
  flask,
  flask-sockets,
  pythonOlder,
  mock,
  moto,
  psutil,
  pytest-mock,
  pytestCheckHook,
  requests,
  responses,
  sqlalchemy,
  websockets,
  websocket-client,
}:

buildPythonPackage rec {
  pname = "slackclient";
  version = "3.29.0";
  format = "setuptools";

  disabled = pythonOlder "3.6";

  src = fetchFromGitHub {
    owner = "slackapi";
    repo = "python-slack-sdk";
    rev = "refs/tags/v${version}";
    hash = "sha256-49dSRg0nrTXuXfnrC2/3p/zYMxouXO9FLqSBSxg4TcU=";
  };

  propagatedBuildInputs = [
    aiohttp
    websocket-client
    requests
  ];

  nativeCheckInputs = [
    boto3
    flask
    flask-sockets
    mock
    moto
    psutil
    pytest-mock
    pytestCheckHook
    responses
    sqlalchemy
    websockets
  ];

  pytestFlagsArray = [
    # Exclude tests that requires network features
    "--ignore=integration_tests"
  ];

  preCheck = ''
    export HOME=$(mktemp -d)
  '';

  disabledTests =
    [
      "test_start_raises_an_error_if_rtm_ws_url_is_not_returned"
      "test_interactions"
      "test_send_message_while_disconnection"
    ]
    ++ lib.optionals stdenv.isDarwin [
      # these fail with `ConnectionResetError: [Errno 54] Connection reset by peer`
      "test_issue_690_oauth_access"
      "test_issue_690_oauth_v2_access"
      "test_send"
      "test_send_attachments"
      "test_send_blocks"
      "test_send_dict"
    ];

  pythonImportsCheck = [ "slack" ];

  meta = with lib; {
    description = "Client for Slack, which supports the Slack Web API and Real Time Messaging (RTM) API";
    homepage = "https://github.com/slackapi/python-slackclient";
    changelog = "https://github.com/slackapi/python-slack-sdk/releases/tag/v${version}";
    license = licenses.mit;
    maintainers = with maintainers; [
      flokli
      psyanticy
    ];
  };
}
+1 −1
Original line number Diff line number Diff line
@@ -4094,7 +4094,7 @@
      ha-ffmpeg
    ];
    "slack" = ps: with ps; [
      slackclient
      slack-sdk
    ];
    "sleepiq" = ps: with ps; [
      asyncsleepiq
+16 −0
Original line number Diff line number Diff line
@@ -441,6 +441,22 @@ let
        ];
      };

      slack-sdk = super.slack-sdk.overridePythonAttrs (oldAttrs: rec {
        version = "2.5.0";
        src = fetchFromGitHub {
          owner = "slackapi";
          repo = "python-slackclient";
          rev = "refs/tags/${version}";
          hash = "sha256-U//HUe6e41wOOzoaDl4yXPnEASCzpGBIScHStWMN8tk=";
        };
        postPatch = ''
          substituteInPlace setup.py \
            --replace-fail "pytest-runner" ""
        '';
        pythonImportsCheck = [ "slack" ];
        doCheck = false; # Tests changed a lot for > 3
      });

      tuf = super.tuf.overridePythonAttrs rec {
        version = "2.1.0";
        src = fetchFromGitHub {
Loading