Closed martinkg closed 1 week ago
with the following changes in the file pyliblo3/_liblo.c, it compiles on Fedora40 and Fedora41.
--- pyliblo3-master/pyliblo3/_liblo.c.orig 2024-08-25 12:44:43.066128982 +0200
+++ pyliblo3-master/pyliblo3/_liblo.c 2024-08-25 12:45:19.302396335 +0200
@@ -9011,7 +9011,7 @@
* else:
* v = None # unhandled data type
*/
- __pyx_t_7 = __Pyx_PyBytes_FromCString(((unsigned char *)lo_blob_dataptr((__pyx_v_argv[__pyx_v_i])))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 273, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyBytes_FromCString((unsigned char *)lo_blob_dataptr(*(struct lo_blob_ **)&__pyx_v_argv[__pyx_v_i])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 274, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 273, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
I don't think the patch will really help, because the _liblo.c file will be recreated and the changes will be lost again. But how can this be solved?
the following patch fix_liblo3.patch should now working.
In the setup.py
I only see a reference to the .pyx
file, so I assume simply deleting the _liblo.c
file would be sufficient, although I have not done cythonization packaging by hand like that. If that doesn't work on the Fedora packaging, either call cython
manually before the build, or wait for the recommendation in #7 to be adopted.
thanks for your respond, that works for me.
%prep
%autosetup -p1 -n %{name}-%{commit0}
# Remove pregenerated Cython C sources and build it again
rm -rf pyliblo3/_liblo.c
cython pyliblo3/_liblo.pxd
# Remove shebang and executable bit from example scripts
%py3_shebang_fix .
chmod -x examples/* COPYING NEWS README.md PKG-INFO
%build
%py3_build
%install
%py3_instal
Please also follow the modern python guidelines, i.e. %pyproject_wheel
etc.
compiles with this changes on F41
.....
%prep
%autosetup -p1 -n pyliblo3-%{commit0}
# Remove pregenerated Cython C sources and build it again
rm -rf pyliblo3/_liblo.c
# Fix permissions (fix for rpmlint warning "spurious-executable-perm")
chmod 644 NEWS README.md COPYING
%generate_buildrequires
%pyproject_buildrequires
%build
cython -I pyliblo3 pyliblo3/_liblo.pyx
%pyproject_wheel
....
Waaait a minute... the initial error in this post is identical with the one we are encountering on the mailing-list where we have run the cython
command. Seems like we have circled back to the beginning on this issue?
I am trying to build pyliblo3 from your repo on Fedora 41 with python-3.13.0 and python3-cython-3.0.11. I've got a build error during compilation: