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