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

This commit is contained in:
Lance Edgar 2024-06-10 22:04:05 -05:00
parent 2ab7cf04c6
commit 7089ced72b
6 changed files with 70 additions and 82 deletions

View file

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