diff --git a/python-capsule-api.diff b/python-capsule-api.diff deleted file mode 100644 index dd568d3..0000000 --- a/python-capsule-api.diff +++ /dev/null @@ -1,43 +0,0 @@ ---- python/header-py.c.orig 2012-04-23 09:13:33.000000000 +0000 -+++ python/header-py.c 2012-04-23 09:14:25.000000000 +0000 -@@ -368,8 +368,8 @@ static PyObject *hdr_new(PyTypeObject *s - - if (obj == NULL) { - h = headerNew(); -- } else if (PyCObject_Check(obj)) { -- h = PyCObject_AsVoidPtr(obj); -+ } else if (CAPSULE_CHECK(obj)) { -+ h = CAPSULE_EXTRACT(obj, "rpm._C_Header"); - } else if (hdrObject_Check(obj)) { - h = headerCopy(((hdrObject*) obj)->h); - } else if (PyBytes_Check(obj)) { ---- python/rpmsystem-py.h.orig 2012-04-23 09:12:49.000000000 +0000 -+++ python/rpmsystem-py.h 2012-04-23 09:13:19.000000000 +0000 -@@ -33,6 +33,16 @@ typedef Py_ssize_t (*lenfunc)(PyObject * - #define PyBytes_AsString PyString_AsString - #endif - -+#if ((PY_MAJOR_VERSION << 8) | (PY_MINOR_VERSION << 0)) >= 0x0207 -+#define CAPSULE_BUILD(ptr,name) PyCapsule_New(ptr, name, NULL) -+#define CAPSULE_CHECK(obj) PyCapsule_CheckExact(obj) -+#define CAPSULE_EXTRACT(obj,name) PyCapsule_GetPointer(obj, name) -+#else -+#define CAPSULE_BUILD(ptr,name) PyCObject_FromVoidPtr(ptr, NULL) -+#define CAPSULE_CHECK(obj) PyCObject_Check(obj) -+#define CAPSULE_EXTRACT(obj,name) PyCObject_AsVoidPtr(obj) -+#endif -+ - /* For Python 3, use the PyLong type throughout in place of PyInt */ - #if PY_MAJOR_VERSION >= 3 - #define PyInt_Check PyLong_Check ---- python/spec-py.c.orig 2012-04-23 09:13:41.000000000 +0000 -+++ python/spec-py.c 2012-04-23 09:14:56.000000000 +0000 -@@ -34,7 +34,7 @@ static PyObject *makeHeader(Header h) - PyObject *rpmmod = PyImport_ImportModuleNoBlock("rpm"); - if (rpmmod == NULL) return NULL; - -- PyObject *ptr = PyCObject_FromVoidPtr(h, NULL); -+ PyObject *ptr = CAPSULE_BUILD(h, "rpm._C_Header"); - PyObject *hdr = PyObject_CallMethod(rpmmod, "hdr", "(O)", ptr); - Py_XDECREF(ptr); - Py_XDECREF(rpmmod); diff --git a/python3-rpm.spec b/python3-rpm.spec index 25367fd..5b826aa 100644 --- a/python3-rpm.spec +++ b/python3-rpm.spec @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: python3-rpm Version: 4.9.1.2 Release: 0 diff --git a/pythonhardlink.diff b/pythonhardlink.diff deleted file mode 100644 index 3fcc8d4..0000000 --- a/pythonhardlink.diff +++ /dev/null @@ -1,13 +0,0 @@ ---- scripts/brp-python-hardlink.orig 2012-04-18 13:33:39.000000000 +0000 -+++ scripts/brp-python-hardlink 2012-04-18 13:34:52.000000000 +0000 -@@ -10,8 +10,8 @@ fi - find "$RPM_BUILD_ROOT" -type f -name "*.pyc" | while read pyc ; do - pyo="${pyc%c}o" - if [ -f "$pyo" ] ; then -- csha="$(sha1sum -b $pyc | cut -d' ' -f 1)" && \ -- osha="$(sha1sum -b $pyo | cut -d' ' -f 1)" && \ -+ csha="$(sha1sum -b "$pyc" | cut -d' ' -f 1)" && \ -+ osha="$(sha1sum -b "$pyo" | cut -d' ' -f 1)" && \ - if [ "$csha" = "$osha" ] ; then - ln -f "$pyc" "$pyo" - fi diff --git a/rpm-python.spec b/rpm-python.spec index b1125b1..c53c2eb 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: rpm-python Version: 4.10.0 Release: 0 diff --git a/rpm.spec b/rpm.spec index 31276c1..970e951 100644 --- a/rpm.spec +++ b/rpm.spec @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: rpm BuildRequires: binutils BuildRequires: bzip2