diff --git a/Fix-Need-lvalue-for-increment-and-decrement-operand.patch b/Fix-Need-lvalue-for-increment-and-decrement-operand.patch new file mode 100644 index 0000000000000000000000000000000000000000..f95032ba3b85839a20b9154edcc12453e84d0375 --- /dev/null +++ b/Fix-Need-lvalue-for-increment-and-decrement-operand.patch @@ -0,0 +1,42 @@ +diff --git a/_ruamel_yaml.c b/_ruamel_yaml.c +index c81694a..587853c 100644 +--- a/_ruamel_yaml.c ++++ b/_ruamel_yaml.c +@@ -496,6 +496,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { + #ifndef PySet_CheckExact + #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) + #endif ++#if PY_VERSION_HEX >= 0x030900A4 ++ #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) ++ #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) ++#else ++ #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj) =(refcnt) ++ #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj) = (size) ++#endif + #if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) + #else +@@ -23874,9 +23881,9 @@ static void __pyx_tp_dealloc_12_ruamel_yaml_CParser(PyObject *o) { + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); +- ++Py_REFCNT(o); ++ __Pyx_SET_REFCNT(o, PyREFCNT(o) + 1); + __pyx_pw_12_ruamel_yaml_7CParser_3__dealloc__(o); +- --Py_REFCNT(o); ++ __Pyx_SET_REFCNT(o, PyREFCNT(o) - 1); + PyErr_Restore(etype, eval, etb); + } + Py_CLEAR(p->stream); +@@ -24047,9 +24054,9 @@ static void __pyx_tp_dealloc_12_ruamel_yaml_CEmitter(PyObject *o) { + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); +- ++Py_REFCNT(o); ++ __Pyx_SET_REFCNT(o, PyREFCNT(o) + 1); + __pyx_pw_12_ruamel_yaml_8CEmitter_3__dealloc__(o); +- --Py_REFCNT(o); ++ __Pyx_SET_REFCNT(o, PyREFCNT(o) - 1); + PyErr_Restore(etype, eval, etb); + } + Py_CLEAR(p->stream); diff --git a/python-ruamel-yaml-clib.spec b/python-ruamel-yaml-clib.spec index 2605b3013e7395abb59278bb64249366d4ebc653..5ec0e378d3d89bef9913177254f85cd533424dfe 100644 --- a/python-ruamel-yaml-clib.spec +++ b/python-ruamel-yaml-clib.spec @@ -3,12 +3,15 @@ Name: python-%{pname} Version: 0.1.2 -Release: 1 +Release: 2 Summary: C version of reader, parser and emitter for ruamel.yaml derived from libyaml License: MIT URL: https://bitbucket.org/ruamel/yaml.clib Source0: %{pypi_source} +#https://github.com/ruamel/yaml.clib/commit/4777d4333f17c16f40 +Patch0: Fix-Need-lvalue-for-increment-and-decrement-operand.patch + BuildRequires: gcc libyaml-devel python3-devel python3-setuptools %description @@ -35,12 +38,15 @@ It is the C based reader/scanner and emitter for ruamel.yaml. %files -n python3-%{pname} %license LICENSE %{python3_sitearch}/_ruamel_yaml.cpython-* -%{python3_sitearch}/%{pypi_name}-%{version}-py?.?.egg-info +%{python3_sitearch}/%{pypi_name}-%{version}-py*.egg-info %files help %defattr(-,root,root) %doc README.rst %changelog +* Mon Mar 28 2022 xu_ping - 0.1.2-2 +- Fix need Lvalue for increment and decrement operand + * Mon Mar 2 2020 openEuler Buildteam - 0.1.2-1 - Package init