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

This commit is contained in:
Lance Edgar 2024-06-10 21:29:46 -05:00
parent 783e5770f1
commit 92285dcbc1
6 changed files with 78 additions and 86 deletions

View file

@ -9,19 +9,17 @@ import shutil
from invoke import task
here = os.path.abspath(os.path.dirname(__file__))
exec(open(os.path.join(here, 'messkit', '_version.py')).read())
@task
def release(c):
"""
Release a new version of Messkit
"""
# rebuild local tar.gz file for distribution
# rebuild package
if os.path.exists('dist'):
shutil.rmtree('dist')
if os.path.exists('Messkit.egg-info'):
shutil.rmtree('Messkit.egg-info')
c.run('python -m build --sdist')
# upload to public PyPI
c.run('twine upload dist/Messkit-{}.tar.gz'.format(__version__))
c.run('twine upload dist/*')