From fa0a14f083b068ed223cf76f3a32929559e692c4 Mon Sep 17 00:00:00 2001 From: Wayne Werner Date: Fri, 30 Oct 2020 13:55:08 +0000 Subject: [PATCH 1/2] Release 1.2.2 A version bump for uploading to PyPI --- aiosmtpd/smtp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aiosmtpd/smtp.py b/aiosmtpd/smtp.py index b119dee36..007265430 100644 --- a/aiosmtpd/smtp.py +++ b/aiosmtpd/smtp.py @@ -11,7 +11,7 @@ from warnings import warn -__version__ = '1.2+' +__version__ = '1.2.2' __ident__ = 'Python SMTP {}'.format(__version__) log = logging.getLogger('mail.log') From e6cca34514e6ca7f1f12127ba0016f0a04cdbf8b Mon Sep 17 00:00:00 2001 From: Wayne Werner Date: Fri, 30 Oct 2020 14:20:18 +0000 Subject: [PATCH 2/2] Add release helpers --- release.py | 28 ++++++++++++++++++++++++++++ setup.py | 1 + 2 files changed, 29 insertions(+) create mode 100755 release.py diff --git a/release.py b/release.py new file mode 100755 index 000000000..df088ea10 --- /dev/null +++ b/release.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python3 + +import os +import subprocess +import sys + +import aiosmtpd.smtp as smtpd + +version = smtpd.__version__ + +choice = input(f'Release aiosmtpd {version} - correct? [y/N]: ') +if choice.lower() not in ('y', 'yes'): + sys.exit('Release aborted') +else: + # We're probably already in the right place + os.chdir(os.path.dirname(os.path.abspath(__file__))) + # Let's use *this* python to build, please + subprocess.run([sys.executable, "setup.py", "sdist"]) + # Assuming twine is installed. And that we're only building .tar.gz + subprocess.run(["twine", "check", f"dist/aiosmtpd-{version}.tar.gz"]) + # You should have an aiosmtpd bit setup in your ~/.pypirc - for twine + subprocess.run(["twine", "upload", "--config-file", "~/.pypirc", "-r", "aiosmtpd", "dist/aiosmptd-{version}.tar.gz"]) + # Only tag when we've actually built and uploaded. If something goes wrong + # we may need the tag somewhere else! + # The annotation information should come from the changelog + subprocess.run(["git", "tag", "-a", version]) + # And now push the tag, of course. + subprocess.run(["git", "push", "upstream", "--tags"]) diff --git a/setup.py b/setup.py index eacb7b3a3..a9a023235 100644 --- a/setup.py +++ b/setup.py @@ -14,6 +14,7 @@ This is a server for SMTP and related protocols, similar in utility to the standard library's smtpd.py module, but rewritten to be based on asyncio for Python 3.""", + long_description_content_type="text/x-rst", url='http://aiosmtpd.readthedocs.io/', keywords='email', packages=find_packages(),