feat: switch from setup.cfg to pyproject.toml + hatchling
This commit is contained in:
parent
95f34f366d
commit
ca6eb6fd91
6 changed files with 57 additions and 70 deletions
18
tasks.py
18
tasks.py
|
@ -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,17 +30,15 @@ import shutil
|
|||
from invoke import task
|
||||
|
||||
|
||||
here = os.path.abspath(os.path.dirname(__file__))
|
||||
exec(open(os.path.join(here, 'tailbone_mailchimp', '_version.py')).read())
|
||||
|
||||
|
||||
@task
|
||||
def release(ctx):
|
||||
def release(c):
|
||||
"""
|
||||
Release a new version of 'tailbone-mailchimp'.
|
||||
"""
|
||||
shutil.rmtree('tailbone_mailchimp.egg-info')
|
||||
ctx.run('python setup.py sdist --formats=gztar')
|
||||
if os.path.exists('dist'):
|
||||
shutil.rmtree('dist')
|
||||
if os.path.exists('tailbone_mailchimp.egg-info'):
|
||||
shutil.rmtree('tailbone_mailchimp.egg-info')
|
||||
c.run('python -m build --sdist')
|
||||
|
||||
filename = 'tailbone-mailchimp-{}.tar.gz'.format(__version__)
|
||||
ctx.run('twine upload dist/{}'.format(filename))
|
||||
c.run('twine upload dist/*')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue