From 6126062fb16cbfcbcc63aa8547a0a06f728ce659 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sun, 26 Sep 2021 22:33:12 -0400 Subject: gnu: Add python-proto-matcher. * gnu/packages/python-xyz.scm (python-proto-matcher): New variable. --- gnu/packages/python-xyz.scm | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index dcf93382c1..4f5cb10b62 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -180,6 +180,7 @@ #:use-module (gnu packages perl) #:use-module (gnu packages photo) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages protobuf) #:use-module (gnu packages python) #:use-module (gnu packages python-build) #:use-module (gnu packages python-check) @@ -5895,6 +5896,43 @@ convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc. (define-public python2-colorspacious (package-with-python2 python-colorspacious)) +(define-public python-proto-matcher + (package + (name "python-proto-matcher") + (version "0.0.3") + (source + (origin + (method url-fetch) + (uri (pypi-uri "proto_matcher" version)) + (sha256 + (base32 "1644x0hrl398ji3281n44ymfgc3cspzfagjckhqjn4nja5nlikxg")))) + (build-system python-build-system) + (propagated-inputs + `(("python-protobuf" ,python-protobuf) + ("python-pyhamcrest" ,python-pyhamcrest))) + (home-page "https://github.com/dayfine/proto-matcher") + (synopsis "PyHamcrest test matchers for protocol buffers") + (description "This package provides the following PyHamcrest test +matchers, that enable matching a protocol buffer message: +@table @code +@item equals_proto +Test the argument equals the given protobuf message. +@item approximately +Test the argument equals the given protobuf message, while comparing any float +field using approximation. +@item ignoring_field_paths +Test the argument equals the given protobuf message, while ignoring those +fields specified in the field paths. +@item ignoring_repeated_field_ordering +Test the argument equals the given protobuf message, ignoring the ordering of +any repeated field. +@item partially +Test the argument partially equals the given protobuf message, i.e. if a field +is in the argument but not in the expected message, it's ignored in the +comparison. +@end table") + (license license:asl2.0))) + (define-public python-matplotlib (package (name "python-matplotlib") -- cgit v1.2.3