I’ve been thinking about this problem for a while too.

I copied Jonesmartinze three options here and numbered them for easier 
reference.

1\. create a source distribution of .py and .c files. The end user builds this 
so it matches their system architecture/OS.

2\. and/or create platform specific wheels for the most obvious platforms from 
.py and .so/.pyd

3\. and/or create general wheel from .py and .pyx files, with a cython 
dependancy.

Number 1 is out because nim c code is platform dependent.

Number two is possible and numpy does it. I haven’t found a simple package to 
use as a pattern though.

If I’m understanding correctly, juancarlospaco is pointing out a fourth option:

4\. generate c code for the target platforms ahead of time. Include each set of 
c files in the python package and at install time compile the correct set for 
the target platform.

However, the yglukhov nimpy wiki example referred to only shows one platform, 
ubuntu-latest, not Windows and Mac ... like I was expecting. What am I missing?

Assuming 4 works, which is better 2 or 4? 

Reply via email to