|
|
|
@ -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(), |
|
|
|
|