From 40b518ff4bea4203280cf8feb0824aa69cafe83a Mon Sep 17 00:00:00 2001 From: Sergey Cherevko Date: Tue, 12 Dec 2023 12:28:41 +0300 Subject: [PATCH] Fixed syntax for cython version --- ...Sphere-fix-syntax-for-cython-version.patch | 81 +++++++++++++++++++ SPECS/python-gbinder.spec | 8 +- 2 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 SOURCES/0001-MSVSphere-fix-syntax-for-cython-version.patch diff --git a/SOURCES/0001-MSVSphere-fix-syntax-for-cython-version.patch b/SOURCES/0001-MSVSphere-fix-syntax-for-cython-version.patch new file mode 100644 index 0000000..f5e955a --- /dev/null +++ b/SOURCES/0001-MSVSphere-fix-syntax-for-cython-version.patch @@ -0,0 +1,81 @@ +From cf4407f0062ca28b8ac54fd47afbfafc89b184fe Mon Sep 17 00:00:00 2001 +From: Sergey Cherevko +Date: Tue, 12 Dec 2023 12:21:43 +0300 +Subject: [PATCH] MSVSphere fix syntax for cython version + +--- + gbinder.pyx | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +diff --git a/gbinder.pyx b/gbinder.pyx +index 7d5a952..ac81053 100644 +--- a/gbinder.pyx ++++ b/gbinder.pyx +@@ -65,7 +65,7 @@ cdef class RemoteObject: + if self._object is not NULL: + cgbinder.gbinder_remote_object_remove_handler(self._object, id) + +-cdef void remote_object_local_notify_func(cgbinder.GBinderRemoteObject* obj, void* user_data) noexcept with gil: ++cdef void remote_object_local_notify_func(cgbinder.GBinderRemoteObject* obj, void* user_data) with gil: + (user_data).notify_func_callback() + + cdef class RemoteReply: +@@ -202,12 +202,12 @@ cdef class Client: + def cancel(self, unsigned long id): + return cgbinder.gbinder_client_cancel(self._client, id) + +-cdef void client_reply_func(cgbinder.GBinderClient* client, cgbinder.GBinderRemoteReply* c_reply, int status, void* user_data) noexcept with gil: ++cdef void client_reply_func(cgbinder.GBinderClient* client, cgbinder.GBinderRemoteReply* c_reply, int status, void* user_data) with gil: + reply = RemoteReply() + reply.set_c_reply(c_reply) + (user_data).reply_func_callback(reply, status) + +-cdef void local_destroy_notif(void* user_data) noexcept with gil: ++cdef void local_destroy_notif(void* user_data) with gil: + (user_data).destroy_notif_callback() + + cdef class LocalRequest: +@@ -514,7 +514,7 @@ cdef class LocalObject: + reply.set_c_reply(c_reply) + return reply + +-cdef cgbinder.GBinderLocalReply* local_transact_callback(cgbinder.GBinderLocalObject* obj, cgbinder.GBinderRemoteRequest* c_req, unsigned int code, unsigned int flags, int* status, void* user_data) noexcept with gil: ++cdef cgbinder.GBinderLocalReply* local_transact_callback(cgbinder.GBinderLocalObject* obj, cgbinder.GBinderRemoteRequest* c_req, unsigned int code, unsigned int flags, int* status, void* user_data) with gil: + req = RemoteRequest() + req.set_c_req(c_req) + reply, status_ret = (user_data).callback(req, code, flags) +@@ -671,12 +671,12 @@ cdef class ServiceManager: + else: + free(ids) + +-cdef void service_manager_get_service_func(cgbinder.GBinderServiceManager* sm, cgbinder.GBinderRemoteObject* c_object, int status, void* user_data) noexcept with gil: ++cdef void service_manager_get_service_func(cgbinder.GBinderServiceManager* sm, cgbinder.GBinderRemoteObject* c_object, int status, void* user_data) with gil: + remote = RemoteObject() + remote.set_c_object(c_object) + (user_data).get_service_func_callback(remote, status) + +-cdef bint service_manager_list_func(cgbinder.GBinderServiceManager* sm, char** services, void* user_data) noexcept with gil: ++cdef bint service_manager_list_func(cgbinder.GBinderServiceManager* sm, char** services, void* user_data) with gil: + services_list = [] + if services == NULL: + return services_list +@@ -687,13 +687,13 @@ cdef bint service_manager_list_func(cgbinder.GBinderServiceManager* sm, char** s + i += 1 + return (user_data).list_func_callback(services_list) + +-cdef void service_manager_add_service_func(cgbinder.GBinderServiceManager* sm, int status, void* user_data) noexcept with gil: ++cdef void service_manager_add_service_func(cgbinder.GBinderServiceManager* sm, int status, void* user_data) with gil: + (user_data).add_service_func_callback(status) + +-cdef void service_manager_func(cgbinder.GBinderServiceManager* sm, void* user_data) noexcept with gil: ++cdef void service_manager_func(cgbinder.GBinderServiceManager* sm, void* user_data) with gil: + (user_data).func_callback() + +-cdef void service_manager_registration_func(cgbinder.GBinderServiceManager* sm, const char* name, void* user_data) noexcept with gil: ++cdef void service_manager_registration_func(cgbinder.GBinderServiceManager* sm, const char* name, void* user_data) with gil: + (user_data).registration_func_callback(name) + + cdef class Buffer: +-- +2.39.3 + diff --git a/SPECS/python-gbinder.spec b/SPECS/python-gbinder.spec index d20d62e..5e57f55 100644 --- a/SPECS/python-gbinder.spec +++ b/SPECS/python-gbinder.spec @@ -2,12 +2,14 @@ Name: python-gbinder Version: 1.1.2 -Release: 1%{?dist} +Release: 1%{?dist}.inferit Summary: Python bindings for libgbinder License: GPL-3.0-only URL: https://github.com/erfanoabdi/%{proj_name} Source: %{url}/archive/%{version}/%{proj_name}-%{version}.tar.gz +# MSVSphere +Patch100: 0001-MSVSphere-fix-syntax-for-cython-version.patch %global libgbinder_version 1.1.20 BuildRequires: python3-devel @@ -44,6 +46,10 @@ sed -i "/^USE_CYTHON =/s/False/True/" setup.py %files -n python3-gbinder -f %{pyproject_files} %changelog +* Tue Dec 12 2023 Sergey Cherevko - 1.1.2-1.inferit +- Fixed syntax for cython version +- Rebuilt for MSVSphere 9.3 + * Sat Sep 16 2023 Alessandro Astone - 1.1.2-1 - Update to 1.1.2