Use twine to upload released package to PyPI
This commit is contained in:
parent
ba313b211e
commit
68a0781795
12
tasks.py
12
tasks.py
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Rattail -- Retail Software Framework
|
# Rattail -- Retail Software Framework
|
||||||
# Copyright © 2010-2018 Lance Edgar
|
# Copyright © 2010-2020 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Rattail.
|
# This file is part of Rattail.
|
||||||
#
|
#
|
||||||
|
@ -24,17 +24,21 @@
|
||||||
Tasks for rattail-corepos
|
Tasks for rattail-corepos
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import unicode_literals, absolute_import
|
import os
|
||||||
|
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
from invoke import task
|
from invoke import task
|
||||||
|
|
||||||
|
|
||||||
|
here = os.path.abspath(os.path.dirname(__file__))
|
||||||
|
exec(open(os.path.join(here, 'rattail_corepos', '_version.py')).read())
|
||||||
|
|
||||||
|
|
||||||
@task
|
@task
|
||||||
def release(ctx):
|
def release(ctx):
|
||||||
"""
|
"""
|
||||||
Release a new version of 'rattail-corepos'.
|
Release a new version of 'rattail-corepos'.
|
||||||
"""
|
"""
|
||||||
shutil.rmtree('rattail_corepos.egg-info')
|
shutil.rmtree('rattail_corepos.egg-info')
|
||||||
ctx.run('python setup.py sdist --formats=gztar upload')
|
ctx.run('python setup.py sdist --formats=gztar')
|
||||||
|
ctx.run('twine upload dist/rattail_corepos-{}.tar.gz'.format(__version__))
|
||||||
|
|
Loading…
Reference in a new issue