-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build compatibility with Cython 3.0 #55
Comments
I can confirm that this happen to older version of cython as well. (I use Cython 0.29.21 ) Test in newly created Ubuntu jammy on wsl2 as well, result in the same error. |
@Lycoris52 Did you specify I asked this question because cython 0.29.35 worked for me. Nevertheless, this behavior is very confusing, and I don't think this is a desirable one. |
@Z-H-Sun |
Known-Good Solution
With
Python==3.10
,MSVC==14.3
(VS 2022), andCython<3.0
(e.g.,cython==0.29.35
), I was able to successfully buildpyopenjtalk
on Windows 11 usingpip install pyopenjtalk --no-build-isolation
to installv0.3.0
,pip install git+https://github.com/r9y9/pyopenjtalk.git --no-build-isolation
to install a nightly buildSymptom
However, with the official release of
Cython 3.0
9 hours ago, the build will fail without the--no-build-isolation
option (i.e., using the latestCython
by default, rather than the current available version), with the following error message:FYI, Line 13 is
from openjtalk.mecab cimport Mecab, Mecab_initialize, ...
Basically,
Cython
was unable to include the path<...>/pyopenjtalk/pyopenjtalk
and thus unable to find theopenjtalk/*.pyx
andhtsengine/*.pyx
submodules.Possible Workarounds
If I copy the folder
pyopenjtalk/pyopenjtalk/openjtalk
andpyopenjtalk/pyopenjtalk/htsengine
(which contain all thepyx
files) to their parent folder (i.e., intopyopenjtalk/openjtalk
andpyopenjtalk/htsengine
respectively), the build is OK with the latestCython
version. But in doing so, one has to make the corresponding changes and then build locally.Of course, as I mentioned in the first section, downgrading the
cython
version and adding the--no-build-isolation
option can be another much easier workaround.I have minimum experience with
Cython
, so I can't determine whether this is an intended change or just a bug of the latest version ofCython
. So I am posting my experience here in the hope of helping other coders who might run into this problem in the future. Ideally, of course, it's best if the author could kindly update the package for Cython 3.0 compatibility or point out this known issue in the README.The text was updated successfully, but these errors were encountered: