First code, as generated by Rattail

This commit is contained in:
Lance Edgar 2023-05-05 13:33:41 -05:00
commit 4004342497
8 changed files with 117 additions and 0 deletions

33
tasks.py Normal file
View file

@ -0,0 +1,33 @@
# -*- coding: utf-8; -*-
"""
Tasks for rattail-nationbuilder
"""
import os
import shutil
from invoke import task
here = os.path.abspath(os.path.dirname(__file__))
exec(open(os.path.join(here, 'rattail_nationbuilder', '_version.py')).read())
@task
def release(c):
"""
Release a new version of rattail-nationbuilder
"""
# rebuild local tar.gz file for distribution
if os.path.exists('rattail_nationbuilder.egg-info'):
shutil.rmtree('rattail_nationbuilder.egg-info')
c.run('python -m build --sdist')
# filename of built package
filename = 'rattail-nationbuilder-{}.tar.gz'.format(__version__)
# TODO: uncomment and update these details, to upload to private PyPI
#c.run('scp dist/{} rattail@pypi.example.com:/srv/pypi/rattail-nationbuilder/'.format(filename))
# TODO: or, uncomment this to upload to *public* PyPI
#c.run('twine upload dist/{}'.format(filename))