mirror of
https://github.com/google/brotli.git
synced 2026-07-09 02:08:06 +00:00
build the lib on Mac #53
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @shawncao-zz on GitHub (Oct 8, 2015).
Hi.
I'm trying to build the lib using "python setup.py build" and I can see lib is placed at "build/lib.macosx-10.10-intel-2.7/brotli.so", however, I think .so file is not usable in MacOS, I expect to see a .dylib file, is this a problem? how to solve it please?
Thanks a lot!
@anthrotype commented on GitHub (Oct 8, 2015):
Yes,
.sois the correct extension for Python extension modules on OS X. On "win32" the extension would be.pyd.distutils gets it from sysconfig:
@anthrotype commented on GitHub (Oct 8, 2015):
Of course the setup.py script is only meant to build and install the Python bindings. If you are looking to build a shared library to link with other non-Python code, that's not the one to use.
In that case you can try https://github.com/bagder/libbrotli
@shawncao-zz commented on GitHub (Oct 8, 2015):
Thanks @anthrotype , however, this .so file is working for me when I load it in Java via JNI interface (on Mac laptop). I was a little surprised, but it's working fine to compress my java bytes in memory. According to this, I guess this brotli.so is a "shared library". Anything misunderstood here... ?
@anthrotype commented on GitHub (Oct 8, 2015):
I am surprised it works.. Though that's not the intended purpose of a Python extension module. I'm sure others more knowledgeable of C/C++ or Java than me could suggest a better approach for what you're trying to do.
@eustas commented on GitHub (Nov 6, 2015):
According to the StackOverflow .so and .dylib are almost interchangable in modern versions on OSX.
@nitram509 commented on GitHub (Nov 15, 2015):
@shawncao
You got brotli.so compiled under Mac OSX and running it in Java? Cool.
How do you managed to use the .so file from Java?
Would you please provide some sources (e.g. via Github ghist)?
@eustas commented on GitHub (Jun 20, 2016):
Soon it will be possible to compile dylib with xcode: see PR #382