-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
Clean up setup.py #49
Comments
Quick workaround:
This ensures that That fixes the issue for me, though I still wonder why compiling from source did not work properly. |
Actually, I think the more important issue is that installing the module didn't fail; it would have been better if this were an install-time failure, rather than a runtime failure. |
I see the error you're getting but I'm also not sure what would cause it. It might be something simple like needing to run ldconfig after compiling the library. Because shared libs are resolved at runtime in general, there's no reasonable way to make this an install failure instead of a runtime one. |
Sorry to bother you with this; I think now that I was simply running out of memory during the compilation phase. But I'm still unsure why the build completed successfully without finding mecab. Wouldn't it be beneficial to raise an error at the end of |
I guess, but I'm not sure because that means you couldn't ever run setup.py without a working installation. |
Sorry to bother you with this if this seems like a silly issue 😅
Exactly. Maybe I want it to be more black-boxy than you intended, but the way I expect |
Fugashi already functions this way IMO, this is a bug in the installation process. In theory, all routes seen in It seems broken however, and it looks like |
Some notes after digging into this issue:
So
And finally, In my mind, there are two issues here:
|
Honestly I think the solution to this is just to remove all three of these rarely-used codepaths and simply have users install mecab with their system package manager if installing the package from source. For For It should be theoretically possible to fix |
For the record, these were all added in #8, so that may be helpful reference. It's true that some of these are rarely used. What we can do is cut out most of these and leave the responsibility for installing mecab up to the user. As part of that, if no working configuration can be found, we can throw an exception instead of returning empty lists. My concern with |
Test release with these changes is up as 1.1.2a4. |
If the automation aspect is removed from fugashi, I think it would be a good idea to update the readme with more detailed install instructions (minimum |
Fugashi will still install automatically for the vast, vast majority of users, to be clear, at least once the Python 3.10 wheels are pushed to PyPI. That said, probably still not a terrible idea to have at least some mention of the install failure state and an example of installing mecab, like Nate mentions. |
Found an issue with the new change - it breaks the sdist upload. Creating an sdist uses setup.py but doesn't require a working MeCab env. So I'll need to hack a workaround for that. |
Hey, I am back working on this again. I should be able to resolve the sdist issues and make a release soon. One extra issue that came up is getting support for OSX arm64 / M1 processors. I made a test build but I don't have any way of testing it myself; if either of you does, it'd be a big help if you could take a look at #55 and give it a quick test. |
Sorry, I only have old Macs :( Thank you for working on this, though! |
Changed the title of this issue to reflect what actually ended up happening. The latest release, 1.1.2, incorporates the changes discussed here, so I'll close this, but if I forgot anything let me know. |
Also, for the record, you still can't run |
Hi,
this might be the same as #42 and #44, but the platform is different. I'm unable to load the .so file through fugashi when running from the base Docker image for Python 3.10. Minimal breaking example below:
Dockerfile:
Output of running
docker build 2>&1 .
.If you know a quick workaround for this, I'd be happy to use that for now. I'd be happy to help if you need a hand with this, as well.
The text was updated successfully, but these errors were encountered: