pygame-community / pygame-ce

🐍🎮 pygame - Community Edition is a FOSS Python library for multimedia applications (like games). Built on top of the excellent SDL library.
https://pyga.me
941 stars 156 forks source link

Fix editable install on windows #3117

Closed ankith26 closed 2 months ago

ankith26 commented 2 months ago

An (untested) attempt to making editable installs work on windows.

Basically the idea is to special case the DLL handling code which already exists, to handle editable installs differently. With an editable install no DLL moving happens, so we just have to hunt for the DLLs in the source tree and track the folders.

ankith26 commented 2 months ago

I just tested this on a fresh Windows 11 VM and it seems to work okay

ankith26 commented 2 months ago

While this strategy works, I believe it can be improved further. I'll experiment with this a bit more.

ankith26 commented 2 months ago

Okay, I think this PR should be done from my side.

The new strategy basically makes the meson buildconfig keep track of the DLL dirs in a JSON file, and then at runtime this file can be handled if it is available (in the editable case only)