Dependency Cleanup for WASM environments #2804
Merged
+20
−13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some of this is likely temporary.
First off, pymunk has been made optional, and can be installed with
pip install arcade[extras]. It will not be installed by default. Trying to use the PymunkPhysicsEngine will result in an error if it is not installed, and the detailed hitbox algorithm will fallback to the simple one with a warning printed to the console.This change is largely because there is no sane way to install pymunk in WASM environments right now. PyPi doesn't support WASM wheels yet, and while pymunk does have a WASM wheel distributed on the GitHub release, installing the wheel directly from github doesn't work due to CORS problems, so as of right now if you want pymunk in a browser, you'll have to figure out hosting for the wheel and install it with micropip manually. If that is done, arcade should pick it up and it should work, but there's no sane way for us to handle the dependency automatically probably until the wheel can just be on pypi.
The other change which is less impactful, is that I've downgraded the minimum PIL version to 11.3.0, as there are no differences which impact Arcade between 11.3 and 12.0, and pyodide is still bundling 12.0. This can be bumped back up to 12.0 minimum when pyodide upgrades.