feat: switch from setup.cfg to pyproject.toml + hatchling

This commit is contained in:
Lance Edgar 2024-06-10 21:21:19 -05:00
parent 784f75ac3f
commit 6b4280a6aa
6 changed files with 71 additions and 85 deletions

View file

@ -30,16 +30,14 @@ import shutil
from invoke import task
here = os.path.abspath(os.path.dirname(__file__))
exec(open(os.path.join(here, 'rattail_tempmon', '_version.py')).read())
@task
def release(c):
"""
Release a new version of `rattail-tempmon`
"""
if os.path.exists('dist'):
shutil.rmtree('dist')
if os.path.exists('rattail_tempmon.egg-info'):
shutil.rmtree('rattail_tempmon.egg-info')
c.run('python -m build --sdist')
c.run(f'twine upload dist/rattail_tempmon-{__version__}.tar.gz')
c.run('twine upload dist/*')