Use python build module for release task

This commit is contained in:
Lance Edgar 2022-12-28 16:09:49 -06:00
parent d3f017b5c2
commit 664ca0f169

View file

@ -14,13 +14,13 @@ exec(open(os.path.join(here, 'messkit', '_version.py')).read())
@task
def release(ctx):
def release(c):
"""
Release a new version of Messkit
"""
# rebuild local tar.gz file for distribution
shutil.rmtree('Messkit.egg-info')
ctx.run('python setup.py sdist --formats=gztar')
c.run('python -m build --sdist')
# upload to public PyPI
ctx.run('twine upload dist/Messkit-{}.tar.gz'.format(__version__))
c.run('twine upload dist/Messkit-{}.tar.gz'.format(__version__))