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

This commit is contained in:
Lance Edgar 2024-06-11 19:00:34 -05:00
parent f78860729c
commit 8100f9bf3b
6 changed files with 57 additions and 77 deletions

View file

@ -2,7 +2,7 @@
################################################################################
#
# Rattail -- Retail Software Framework
# Copyright © 2010-2023 Lance Edgar
# Copyright © 2010-2024 Lance Edgar
#
# This file is part of Rattail.
#
@ -30,22 +30,17 @@ import shutil
from invoke import task
here = os.path.abspath(os.path.dirname(__file__))
exec(open(os.path.join(here, 'tailbone_nationbuilder', '_version.py')).read())
@task
def release(c):
"""
Release a new version of tailbone-nationbuilder
"""
# rebuild local tar.gz file for distribution
# rebuild package
if os.path.exists('dist'):
shutil.rmtree('dist')
if os.path.exists('tailbone_nationbuilder.egg-info'):
shutil.rmtree('tailbone_nationbuilder.egg-info')
c.run('python -m build --sdist')
# filename of built package
filename = f'tailbone-nationbuilder-{__version__}.tar.gz'
# upload to PyPI
c.run(f'twine upload dist/{filename}')
c.run('twine upload dist/*')