view contrib/automation/hgautomation/pypi.py @ 43076:2372284d9457

formatting: blacken the codebase This is using my patch to black (https://github.com/psf/black/pull/826) so we don't un-wrap collection literals. Done with: hg files 'set:**.py - mercurial/thirdparty/** - "contrib/python-zstandard/**"' | xargs black -S # skip-blame mass-reformatting only # no-check-commit reformats foo_bar functions Differential Revision: https://phab.mercurial-scm.org/D6971
author Augie Fackler <augie@google.com>
date Sun, 06 Oct 2019 09:45:02 -0400
parents 92593d72e10b
children
line wrap: on
line source

# pypi.py - Automation around PyPI
#
# Copyright 2019 Gregory Szorc <gregory.szorc@gmail.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.

# no-check-code because Python 3 native.

from twine.commands.upload import upload as twine_upload
from twine.settings import Settings


def upload(paths):
    """Upload files to PyPI.

    `paths` is an iterable of `pathlib.Path`.
    """
    settings = Settings()

    twine_upload(settings, [str(p) for p in paths])