1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 protobuf,
7 googleapis-common-protos,
8 pytestCheckHook,
9 pytz,
10}:
11
12buildPythonPackage rec {
13 pname = "proto-plus";
14 version = "1.26.1";
15 pyproject = true;
16
17 src = fetchFromGitHub {
18 owner = "googleapis";
19 repo = "proto-plus-python";
20 tag = "v${version}";
21 hash = "sha256-7FonHHXpgJC0vg9Y26bqz0g1NmLWwaZWyFZ0kv7PjY8=";
22 };
23
24 build-system = [ setuptools ];
25
26 dependencies = [ protobuf ];
27
28 nativeCheckInputs = [
29 pytestCheckHook
30 pytz
31 googleapis-common-protos
32 ];
33
34 pytestFlags = [
35 # pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
36 "-Wignore::DeprecationWarning"
37 # float_precision option is deprecated for json_format error with latest protobuf
38 "-Wignore:float_precision:UserWarning"
39 ];
40
41 pythonImportsCheck = [ "proto" ];
42
43 meta = with lib; {
44 description = "Beautiful, idiomatic protocol buffers in Python";
45 homepage = "https://github.com/googleapis/proto-plus-python";
46 license = licenses.asl20;
47 maintainers = with maintainers; [ ruuda ];
48 };
49}