feat: switch from setup.cfg to pyproject.toml + hatchling
This commit is contained in:
parent
783e5770f1
commit
92285dcbc1
6 changed files with 78 additions and 86 deletions
10
tasks.py
10
tasks.py
|
@ -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/*')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue