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

This commit is contained in:
Lance Edgar 2024-06-11 18:43:49 -05:00
parent d789305e56
commit bbfa0a3529
6 changed files with 57 additions and 69 deletions

View file

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