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

This commit is contained in:
Lance Edgar 2024-06-10 21:56:59 -05:00
parent 9378d9b0f8
commit af840fdcd4
6 changed files with 70 additions and 88 deletions

View file

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