depot/third_party/nixpkgs/pkgs/development/python-modules/pushbullet-py/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

56 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
fetchPypi,
setuptools,
requests,
websocket-client,
python-magic,
cryptography,
pytestCheckHook,
pythonAtLeast,
}:
buildPythonPackage rec {
pname = "pushbullet-py";
version = "0.12.0";
pyproject = true;
src = fetchPypi {
inherit pname version;
sha256 = "917883e1af4a0c979ce46076b391e0243eb8fe0a81c086544bcfa10f53e5ae64";
};
nativeBuildInputs = [ setuptools ];
propagatedBuildInputs = [
cryptography
python-magic
requests
websocket-client
];
preCheck = ''
export PUSHBULLET_API_KEY=""
'';
nativeCheckInputs = [ pytestCheckHook ];
disabledTests =
[
"test_auth_fail"
"test_auth_success"
"test_decryption"
]
++ lib.optionals (pythonAtLeast "3.12") [
# AttributeError: 'called_once_with' is not a valid assertion. Use a spec for the mock if 'called_once_with' is meant to be an attribute.. Did you mean: 'assert_called_once_with'?
"test_new_device_ok"
"test_new_chat_ok"
];
meta = with lib; {
description = "Simple python client for pushbullet.com";
homepage = "https://github.com/randomchars/pushbullet.py";
license = licenses.mit;
};
}