I have a python script using a cython module I wrote. I want to publish it, and in order to save users the trouble of compiling the cython stuff (especially complex on Windows), I want to provide pre-compiled extensions.
However, I will need one version for 32 bits and another for 64. I thought about including the two files as mymodule32.pyd and mymodule64.pyd, and then, mymodule.py doing the following:
if bits == 32:
from mymodule32 import *
elif bits == 64:
from mymodule64 import *
But this feels a litle clumsy. What if the user decides to compile the module himself producing mymodule.pyd?
My impression is that this is part of how you package your module and publishing it on pypi, not about how you import it.
The import is supposed not to care about your architecture, is the module installation and package that needs to know about this.
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