googlefonts / compreffor

A CFF table subroutinizer for FontTools
Apache License 2.0
23 stars 22 forks source link

Fails to build with Cython 3 #150

Closed musicinmybrain closed 1 year ago

musicinmybrain commented 1 year ago

Cython 3.0.0 was recently released, and compreffor is not compatible.

python3 -m build
[...]
running build_ext
building 'compreffor._compreffor' extension
error: unknown file type '.pyx' (from 'src/cython/_compreffor.pyx')

ERROR Backend subprocess exited when trying to invoke build_wheel

I will open a PR to pin cython<3 for now, but it would be better to fix this properly.

anthrotype commented 1 year ago

thanks for reporting

unknown file type '.pyx'

that's unexpected.. pyx is the cython file extension 🤔

musicinmybrain commented 1 year ago

that's unexpected.. pyx is the cython file extension 🤔

I agree. My first guess would be that it is a weird side effect of the reworking of build_ext, but I tried the obvious workaround of from Cython.Distutils import old_build_ext as build_ext, and that didn’t seem to help. I haven’t had a chance to look into it more closely.

musicinmybrain commented 1 year ago

According to https://github.com/cython/cython/issues/5305, https://github.com/libusb/hidapi has a similar problem.