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
767 stars 120 forks source link

Deprecate `setup.py sdist`, suggest and use replacement pypa/build based command #2875

Closed ankith26 closed 1 month ago

ankith26 commented 1 month ago

We can use pypa/build to make an sdist file, now that we have the meson buildconfig.

I added a .gitattributes file, to skip a few files and ensure that the generated sdist is identical* to the one generated by setup.py sdist

* There is one point of difference, the docs/generated folder is included in the sdist generated by setup.py sdist, but not the pypa/build sdist. This is one of the things that will be taken care due to #2853 being merged.

PS: this PR also fixes a little bug in #2853 (so this is a sort of a successor PR to that)

Starbuck5 commented 1 month ago

If that's merged, how does it need taking care of? I don't understand.

I ran this locally and saw the generated docs weren't in the sdist.

ankith26 commented 1 month ago

I ran this locally and saw the generated docs weren't in the sdist.

Yes, that's intended. And the purpose of #2853 is to ensure that the setup docs command runs atleast once as part of the build process itself (and therefore, runs when the sdist is installed on the user side) so in the end, the user still has the generated docs as before.