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

This commit is contained in:
Theodore Ni 2024-11-09 01:59:22 -08:00 committed by GitHub
commit 996e9d6459
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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" ];