SNEWS2 / snewpy

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

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

Open JostMigenda opened 2 weeks ago

JostMigenda commented 2 weeks 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.