tobac icon indicating copy to clipboard operation
tobac copied to clipboard

Add `pyproject.toml` for package setup

Open w-k-jones opened this issue 1 year ago • 2 comments
trafficstars

As using a pyproject.toml file has become standard for python packages, and pip is starting to complain about installing using a setup.py file directly, we should update tobac to the new standard. This shouldn't be too complex, as we can keep the existing setup.py if we are installing using setuptools: https://packaging.python.org/en/latest/guides/modernize-setup-py-project/

w-k-jones avatar Aug 12 '24 11:08 w-k-jones

Thanks for raising this, @w-k-jones. I think this should be a high priority to get out with 1.6. Given the noise around Anaconda, we may want to consider making tobac available on PiPy at the same time.

freemansw1 avatar Aug 12 '24 15:08 freemansw1

I agree, it would be nice to add tobac to PiPy. I think we can then automate publishing new releases, as you can automate pushing from github to PiPy, and from PiPy to conda-forge.

For the pyproject.toml file, we could start just by adding the most minimal example, and then migrating metadata from setup.py with future releases:

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

w-k-jones avatar Aug 13 '24 14:08 w-k-jones

@w-k-jones what are your thoughts on integrating Hatch or something similar into our packaging workflow? I heard good things at SciPy and also got pointed to this guide: https://www.pyopensci.org/python-package-guide/ that also suggests using hatch.

freemansw1 avatar Jul 17 '25 21:07 freemansw1