From a1d2217604fad7ec8c3fccc73f7d6e892071eeb3 Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Mon, 30 Sep 2019 10:17:50 -0700 Subject: [PATCH 1/4] Fix/hack README rendering so that pypi's markdown handling libs are happy --- README.md | 4 ++-- setup.py | 36 +++++++++++++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7124b20..83f0bd1 100644 --- a/README.md +++ b/README.md @@ -90,8 +90,8 @@ Now that we have something to tell OctoDNS about our providers & zones we need t ttl: 60 type: A values: - - 1.2.3.4 - - 1.2.3.5 + - 1.2.3.4 + - 1.2.3.5 ``` Further information can be found in [Records Documentation](/docs/records.md). diff --git a/setup.py b/setup.py index 75a39d7..5cb741b 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,6 @@ #!/usr/bin/env python +from StringIO import StringIO from os.path import dirname, join import octodns @@ -21,6 +22,39 @@ console_scripts = { for name in cmds } + +def long_description(): + buf = StringIO() + yaml_block = False + supported_providers = False + with open('README.md') as fh: + for line in fh: + if line == '```yaml\n': + yaml_block = True + continue + elif yaml_block and line == '---\n': + # skip the line + continue + elif yaml_block and line == '```\n': + yaml_block = False + continue + elif supported_providers: + if line.startswith('## '): + supported_providers = False + # write this line out, no continue + else: + # We're ignoring this one + continue + elif line == '## Supported providers\n': + supported_providers = True + continue + buf.write(line) + buf = buf.getvalue() + with open('/tmp/mod', 'w') as fh: + fh.write(buf) + return buf + + setup( author='Ross McFarland', author_email='rwmcfa1@gmail.com', @@ -40,7 +74,7 @@ setup( 'requests>=2.20.0' ], license='MIT', - long_description=open('README.md').read(), + long_description=long_description(), long_description_content_type='text/markdown', name='octodns', packages=find_packages(), From e3ad57d15b055db9a441d0a5d7a7b924ff8600d5 Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Mon, 30 Sep 2019 10:18:35 -0700 Subject: [PATCH 2/4] twine check before upload --- script/release | 1 + 1 file changed, 1 insertion(+) diff --git a/script/release b/script/release index dd3e1b1..f2c90bf 100755 --- a/script/release +++ b/script/release @@ -22,5 +22,6 @@ git tag -s "v$VERSION" -m "Release $VERSION" git push origin "v$VERSION" echo "Tagged and pushed v$VERSION" python setup.py sdist +twine check dist/*$VERSION.tar.gz twine upload dist/*$VERSION.tar.gz echo "Uploaded $VERSION" From 659a60de46ad0bb75811266691e57b44e58b46ff Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Mon, 30 Sep 2019 10:18:53 -0700 Subject: [PATCH 3/4] v0.9.8 version bump and CHANGELOG updates --- CHANGELOG.md | 4 ++++ octodns/__init__.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d80a48f..76ff8b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## v0.9.8 - 2019-09-30 - One with no changes b/c PyPi description problems + +* No material changes + ## v0.9.7 - 2019-09-30 - It's about time * AkamaiProvider, ConstellixProvider, MythicBeastsProvider, SelectelProvider, diff --git a/octodns/__init__.py b/octodns/__init__.py index 57300de..71b5b1a 100644 --- a/octodns/__init__.py +++ b/octodns/__init__.py @@ -3,4 +3,4 @@ from __future__ import absolute_import, division, print_function, \ unicode_literals -__VERSION__ = '0.9.7' +__VERSION__ = '0.9.8' From 3296b55aa62ccbe558dff22fd465d95cd0b7cfb1 Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Mon, 30 Sep 2019 10:22:05 -0700 Subject: [PATCH 4/4] Include readme_renderer[md] in dev requirements --- requirements-dev.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements-dev.txt b/requirements-dev.txt index 77dd50c..a2833ae 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -5,5 +5,6 @@ pycodestyle==2.4.0 pycountry>=18.12.8 pycountry_convert>=0.7.2 pyflakes==1.6.0 +readme_renderer[md]==24.0 requests_mock twine==1.13.0