From 9477ae4cf9edfa4126b51513b1208977b1d29899efce30a380e6c5bf19056e26 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Thu, 9 Dec 2021 07:19:59 +0000 Subject: [PATCH] Accepting request 937375 from home:StevenK:branches:GNOME:Factory Also support pyparsing 2.4.7 with the new patch. OBS-URL: https://build.opensuse.org/request/show/937375 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/flatpak?expand=0&rev=149 --- flatpak.changes | 2 +- support-new-pyparsing.patch | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/flatpak.changes b/flatpak.changes index 46e8f0c..fadcee7 100644 --- a/flatpak.changes +++ b/flatpak.changes @@ -1,5 +1,5 @@ ------------------------------------------------------------------- -Wed Dec 8 07:33:39 UTC 2021 - Steve Kowalik +Thu Dec 9 04:29:19 UTC 2021 - Steve Kowalik - Add patch support-new-pyparsing.patch: * Support pyparsing >= 3.0.4. diff --git a/support-new-pyparsing.patch b/support-new-pyparsing.patch index 432c7be..0c1d204 100644 --- a/support-new-pyparsing.patch +++ b/support-new-pyparsing.patch @@ -2,12 +2,20 @@ Index: flatpak-1.12.2/subprojects/variant-schema-compiler/variant-schema-compile =================================================================== --- flatpak-1.12.2.orig/subprojects/variant-schema-compiler/variant-schema-compiler +++ flatpak-1.12.2/subprojects/variant-schema-compiler/variant-schema-compiler -@@ -1740,7 +1740,7 @@ def handleNameableType(toks): - add_named_type(typename_prefix + name, type) +@@ -4,6 +4,7 @@ import argparse + import sys + import os + from pyparsing import * ++pyparsing_version = tuple(int(x) for x in __version__.split('.')) + + typename_prefix = "" + funcname_prefix = "" +@@ -1741,6 +1742,8 @@ def handleNameableType(toks): return type --nameableType = (Optional((Suppress("'") + ident).leaveWhitespace()) + (arrayType ^ maybeType ^ dictType ^ structType)).setParseAction(handleNameableType) -+nameableType = (Optional((Suppress("'") + ident)) + (arrayType ^ maybeType ^ dictType ^ structType)).setParseAction(handleNameableType) + nameableType = (Optional((Suppress("'") + ident).leaveWhitespace()) + (arrayType ^ maybeType ^ dictType ^ structType)).setParseAction(handleNameableType) ++if pyparsing_version >= (3, 0, 4): ++ nameableType = (Optional((Suppress("'") + ident)) + (arrayType ^ maybeType ^ dictType ^ structType)).setParseAction(handleNameableType) typeSpec <<= basicType ^ variantType ^ namedType ^ nameableType