mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 21:09:03 +02:00

Copy the core components of the patchtest-oe repo into meta/lib/patchtest in oe-core. (From OE-Core rev: 257f64f4e4414b78981104aec132b067beb5a92a) Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
23 lines
761 B
Python
23 lines
761 B
Python
# signed-off-by pyparsing definition
|
|
#
|
|
# Copyright (C) 2016 Intel Corporation
|
|
#
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
|
|
import pyparsing
|
|
import common
|
|
|
|
name = pyparsing.Regex('\S+.*(?= <)')
|
|
username = pyparsing.OneOrMore(common.worddot)
|
|
domain = pyparsing.OneOrMore(common.worddot)
|
|
|
|
# taken from https://pyparsing-public.wikispaces.com/Helpful+Expressions
|
|
email = pyparsing.Regex(r"(?P<user>[A-Za-z0-9._%+-]+)@(?P<hostname>[A-Za-z0-9.-]+)\.(?P<domain>[A-Za-z]{2,})")
|
|
|
|
email_enclosed = common.lessthan + email + common.greaterthan
|
|
|
|
signed_off_by_mark = pyparsing.Literal("Signed-off-by:")
|
|
signed_off_by = pyparsing.AtLineStart(signed_off_by_mark + name + email_enclosed)
|
|
patch_signed_off_by = pyparsing.AtLineStart("+" + signed_off_by_mark + name + email_enclosed)
|