feat: switch from setup.cfg to pyproject.toml + hatchling
This commit is contained in:
parent
a8107b6ab1
commit
63b7bd3742
6 changed files with 91 additions and 72 deletions
17
tasks.py
17
tasks.py
|
@ -9,18 +9,17 @@ import shutil
|
|||
from invoke import task
|
||||
|
||||
|
||||
here = os.path.abspath(os.path.dirname(__file__))
|
||||
exec(open(os.path.join(here, 'corporal', '_version.py')).read())
|
||||
|
||||
|
||||
@task
|
||||
def release(ctx):
|
||||
def release(c):
|
||||
"""
|
||||
Release a new version of Corporal
|
||||
"""
|
||||
# rebuild local tar.gz file for distribution
|
||||
shutil.rmtree('Corporal.egg-info')
|
||||
ctx.run('python -m build --sdist')
|
||||
# rebuild package
|
||||
if os.path.exists('dist'):
|
||||
shutil.rmtree('dist')
|
||||
if os.path.exists('Corporal.egg-info'):
|
||||
shutil.rmtree('Corporal.egg-info')
|
||||
c.run('python -m build --sdist')
|
||||
|
||||
# upload to public PyPI
|
||||
ctx.run('twine upload dist/corporal-{}.tar.gz'.format(__version__))
|
||||
c.run('twine upload dist/*')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue