depot/third_party/nixpkgs/pkgs/development/python-modules/posthog/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

61 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
# build inputs
requests,
six,
monotonic,
backoff,
python-dateutil,
# check inputs
pytestCheckHook,
mock,
freezegun,
}:
let
pname = "posthog";
version = "3.5.0";
in
buildPythonPackage {
inherit pname version;
format = "setuptools";
src = fetchFromGitHub {
owner = "PostHog";
repo = "posthog-python";
rev = "refs/tags/v${version}";
hash = "sha256-+nYMQxqI9RZ5vVL6KgiRLcx0JHWJTs/rZ6U6jIuaz+w=";
};
propagatedBuildInputs = [
requests
six
monotonic
backoff
python-dateutil
];
nativeCheckInputs = [
pytestCheckHook
mock
freezegun
];
pythonImportsCheck = [ "posthog" ];
disabledTests = [
"test_load_feature_flags_wrong_key"
# Tests require network access
"test_request"
"test_upload"
];
meta = with lib; {
description = "Official PostHog python library";
homepage = "https://github.com/PostHog/posthog-python";
changelog = "https://github.com/PostHog/posthog-python/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ happysalada ];
};
}