| 1 |
# pypi.py - Automation around PyPI |
| 2 |
# |
| 3 |
# Copyright 2019 Gregory Szorc <[email protected]> |
| 4 |
# |
| 5 |
# This software may be used and distributed according to the terms of the |
| 6 |
# GNU General Public License version 2 or any later version. |
| 7 |
|
| 8 |
# no-check-code because Python 3 native. |
| 9 |
|
| 10 |
from twine.commands.upload import upload as twine_upload |
| 11 |
from twine.settings import Settings |
| 12 |
|
| 13 |
|
| 14 |
def upload(paths): |
| 15 |
"""Upload files to PyPI. |
| 16 |
|
| 17 |
`paths` is an iterable of `pathlib.Path`. |
| 18 |
""" |
| 19 |
settings = Settings() |
| 20 |
|
| 21 |
twine_upload(settings, [str(p) for p in paths]) |