Git Product home page Git Product logo

Comments (7)

anthrotype avatar anthrotype commented on April 28, 2024

Yes, .so is the correct extension for Python extension modules on OS X. On "win32" the extension would be .pyd.
distutils gets it from sysconfig:

import sysconfig
print(sysconfig.get_config_var('SO'))

from brotli.

anthrotype avatar anthrotype commented on April 28, 2024

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

from brotli.

shawncao-zz avatar shawncao-zz commented on April 28, 2024

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... ?

from brotli.

anthrotype avatar anthrotype commented on April 28, 2024

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.

from brotli.

eustas avatar eustas commented on April 28, 2024

According to the StackOverflow .so and .dylib are almost interchangable in modern versions on OSX.

from brotli.

nitram509 avatar nitram509 commented on April 28, 2024

@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)?

from brotli.

eustas avatar eustas commented on April 28, 2024

Soon it will be possible to compile dylib with xcode: see PR #382

from brotli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.