taichi-dev / taichi

Productive, portable, and performant GPU programming in Python.
https://taichi-lang.org
Apache License 2.0
25.07k stars 2.26k forks source link

[PyPI] [Blender] Make a platform independent wheel package by download-on-fly? #1987

Open archibate opened 3 years ago

archibate commented 3 years ago

Concisely describe the proposed feature I found it extremely hard to distribute a platform independent ZIP bundle for Taichi Blend. For now I have to release 9 ZIP files for every combination of (win/linux/osx, 36/37/38), due to the fact that Blender doesn't have pip. So I'd like to create a taichi package that doesn't have platform specifications. (Actually we've been on this before?)

Describe the solution you'd like (if any) When started for the first time, the Python module taichi found that taichi_core.so is missing. Then it should download the corresponding so file according to the detected platform information (win/linux/osx, 36/37/38). Of course, the platform dependent packages should still be released. We just need to add an extra taichi-none.whl and I'll download that file in my Taichi Blend build script.

Additional comments Another reason is that why taichi is as large as > 50 MiB is mainly due to the taichi_core.so. Download-on-fly could also helps ease the size-limit policy restricted by PyPI, if we're going to grow this size further.

yuanming-hu commented 3 years ago

Sounds like a good idea! I guess the easy way to do this, is by downloading one out of the nine wheels from PyPI based on platform information and then extract the wheel (which is essentially a zip IIRC). Then we get the taichi_core shared object. It's fine to download the Python files multiple times since they are small anyway.

This does sound like a useful feature to have, so I added it to the v0.8 roadmap.

frostming commented 2 years ago

I just came across this issue in the backlog and will take a look. But I will not be likely to start working until #4624 is merged.