mlc-ai / xgrammar

Efficient, Flexible and Portable Structured Generation
https://xgrammar.mlc.ai/
Apache License 2.0
380 stars 18 forks source link

[Package] Build once for each Python version #62

Closed MasterJH5574 closed 1 week ago

MasterJH5574 commented 1 week ago

PyBind is Python-version-depended. Previously we only build XGrammar once (where PyBind is built only once as well) and then build the wheel for each Python version, which causes Python version error.

This PR updates the build scripts to build XGrammar once for each Python version.