diff options
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/big_endian | 33 | ||||
-rw-r--r-- | debian/patches/series | 1 |
2 files changed, 34 insertions, 0 deletions
diff --git a/debian/patches/big_endian b/debian/patches/big_endian new file mode 100644 index 0000000..2f617f0 --- /dev/null +++ b/debian/patches/big_endian @@ -0,0 +1,33 @@ +Author: Michael R. Crusoe <crusoe@debian.org> +Description: Default to pure python parsing on big endian systems +Forwarded: not-needed + +As the cpython code has an endianness bug https://sourceforge.net/p/ruamel-yaml/tickets/360/ + +Thanks to Rebecca N. Palmer for the tip about sys.byteorder! + +Index: ruamel.yaml/main.py +=================================================================== +--- ruamel.yaml.orig/main.py ++++ ruamel.yaml/main.py +@@ -58,7 +58,7 @@ class YAML: + self: Any, + *, + typ: Optional[Union[List[Text], Text]] = None, +- pure: Any = False, ++ pure: Any = None, + output: Any = None, + plug_ins: Any = None, + ) -> None: # input=None, +@@ -75,6 +75,11 @@ class YAML: + """ + + self.typ = ['rt'] if typ is None else (typ if isinstance(typ, list) else [typ]) ++ if pure is None: ++ if sys.byteorder == 'big': ++ pure = True ++ else: ++ pure = False + self.pure = pure + + # self._input = input diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..f79ae58 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +big_endian |