In Tcl, there is a concept of stubs, where you can have a C extension that works with any compatible version of Tcl. Is there a comparable concept for Python?
I'd like to distribute a binary module that would run on Ubuntu 8.04 (python 2.5), Ubuntu 10.04 (python 2.6), and Centos 5 (python 2.4). I'd like to only have to distribute a 32 bit and a 64 bit version for Linux that would be compatible with all 3. I'd redistribute libstdc++ and compile for glib 2.7 which is forward compatible with glib 2.11.
If you distribute your module as source, it can be compiled as necessary.
This problem occurs a lot with Windows, for which modules are normally distributed as binaries. PEP 384 proposes a solution (a limited interface which is guaranteed to exist for all Python 3 versions) and is implemented in Python 3.2. Until then, you're stuck.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With