-
Notifications
You must be signed in to change notification settings - Fork 1
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
Support alpine linux #76
Comments
Hello. I've never tried running this on alpine. The shared object distributed in the package is compiled on a That said, if you're on a mac, a 32 bit distro, ARM arch etc that shared object won't work, so there is an option to provide your own. When we load drafter, we attempt to load system installed library first before falling back to the shared object distributed in the package if one is not found: django-apiblueprint-view/apiblueprint_view/__init__.py Lines 7 to 10 in 011703a
To provide your own library you'll need to compile your own libdrafter on the target platform (alpine), and it needs to be specifically v3.2.7. You'll need python2 (definitely) and gcc/g++ 5 (I think 🤞 ) to build it. Here's the process: wget https://github.com/apiaryio/drafter/releases/download/v3.2.7/drafter-v3.2.7.tar.gz
tar xvzf drafter-v3.2.7.tar.gz
cd drafter-v3.2.7
python2 configure --shared
make libdrafter
cd ..
sudo cp drafter-v3.2.7/build/out/Release/lib.target/libdrafter.so /usr/lib/libdrafter.so # <-- this might not be the right place for alpine? Basically put it where your OS expects to find shared libs
rm -rf drafter-v3.2.7/
rm drafter-v3.2.7.tar.gz Give that a try and see how you get on. |
I'm returning to quite an old issue here. This is not a fix, but I did recently find out why this doesn't work on Alpine 💡 Unlike most distros (which are glibc based), Alpine is musl based which means manylinux binaries won't run on it. Currently PyPI doesn't have a platform tag that allows you to disribute a musl binary so for the moment the only solution is to manually compile. That said, there is currently an open PEP https://www.python.org/dev/peps/pep-0656/ about creating one so in future it might be possible to cross-compile drafter and distribute both glibc and musl wheels. |
Is it possible that this package doesn't work when running on alpine linux because of the special handling of drafter?
I'm getting a
Fatal Python error: Segmentation fault
when trying to render a blueprint.The text was updated successfully, but these errors were encountered: