Unverified Commit 996e9d64 authored by Theodore Ni's avatar Theodore Ni Committed by GitHub
Browse files

python311Packages.pysnow: fix deps and tests, unbreak (#354464)

parents 5f8f11ff 226843be
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@
  poetry-core,
  python-magic,
  pytz,
  six,
  pytestCheckHook,
  requests-oauthlib,
}:
@@ -25,6 +26,8 @@ buildPythonPackage rec {
    hash = "sha256-nKOPCkS2b3ObmBnk/7FTv4o4vwUX+tOtZI5OQQ4HSTY=";
  };

  pythonRelaxDeps = [ "requests-oauthlib" ];

  nativeBuildInputs = [ poetry-core ];

  propagatedBuildInputs = [
@@ -32,6 +35,7 @@ buildPythonPackage rec {
    ijson
    python-magic
    pytz
    six
    requests-oauthlib
  ];

@@ -54,6 +58,10 @@ buildPythonPackage rec {
      --replace 'ijson = "^2.5.1"' 'ijson = "*"' \
      --replace 'pytz = "^2019.3"' 'pytz = "*"' \
      --replace 'oauthlib = "^3.1.0"' 'oauthlib = "*"'

    # https://github.com/rbw/pysnow/pull/201 doesn't apply via fetchpatch, so we recreate it
    substituteInPlace tests/test_client.py tests/test_oauth_client.py tests/test_params_builder.py tests/test_resource.py \
      --replace-fail "self.assertEquals" "self.assertEqual"
  '';

  pythonImportsCheck = [ "pysnow" ];