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

This commit is contained in:
Lance Edgar 2024-06-10 21:07:33 -05:00
parent 21d448340f
commit 8b2320ebc1
6 changed files with 98 additions and 100 deletions

View file

@ -2,7 +2,7 @@
################################################################################
#
# Rattail -- Retail Software Framework
# Copyright © 2010-2020 Lance Edgar
# Copyright © 2010-2024 Lance Edgar
#
# This file is part of Rattail.
#
@ -30,16 +30,14 @@ import shutil
from invoke import task
here = os.path.abspath(os.path.dirname(__file__))
exec(open(os.path.join(here, 'theo', '_version.py')).read())
@task
def release(ctx):
def release(c):
"""
Release a new version of 'tailbone-theo'
"""
shutil.rmtree('tailbone_theo.egg-info')
ctx.run('python setup.py sdist --formats=gztar')
filename = 'tailbone-theo-{}.tar.gz'.format(__version__)
ctx.run('twine upload dist/{}'.format(filename))
if os.path.exists('dist'):
shutil.rmtree('dist')
if os.path.exists('tailbone_theo.egg-info'):
shutil.rmtree('tailbone_theo.egg-info')
c.run('python -m build --sdist')
c.run('twine upload dist/*')