SNEWS2 / snewpy

A Python package for working with supernova neutrinos
https://snewpy.readthedocs.io
BSD 3-Clause "New" or "Revised" License
27 stars 22 forks source link

Stop deprecated usage of `setup.py` in builds #346

Open JostMigenda opened 5 months ago

JostMigenda commented 5 months ago

Python packaging documentation explicitly warns that commands like python setup.py sdist bdist_wheel are deprecated and “MUST NOT be run anymore”. Yet we use exactly that command in our publishing workflow.

The recommended replacement is the build module. This also ensures more reproducible builds by requiring build dependencies to be explicitly declared (in a pyproject.toml file) and building the project in an isolated virtual environment.

I’ve moved sntools over to build last year and found it worked very well and was a bit cleaner, too. [Edit: See SNEWS2/BEMEWS#4 for another example.]