From 7afa34ae8a89bbcd0f4b0d0134cca387cb080c86 Mon Sep 17 00:00:00 2001 From: Stephen Weber Date: Fri, 6 Apr 2018 12:38:40 -0700 Subject: Convert README from Markdown to ReStructured Text and use as longdesc (#22330) * Convert README from Markdown to ReStructured Text and use as longdesc Discussion in #13758 led to deciding to switch README to rst and having setup.py consume it as the long_description. * Fix long string in setup.py for pep8 compliance * Open README.rst as read-only * Update usages of root README.md to README.rst Unsure about the file ./packaging/debian/docs as it (only) contains the text README.md. I believe it's referencing ./packaging/debian/README.md but maybe someone who knows debian packaging could review it? * Pick up fixes that had been merged into README.md after the initial conversion to rst --- setup.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'setup.py') diff --git a/setup.py b/setup.py index ba874baf59..44cf7224d6 100644 --- a/setup.py +++ b/setup.py @@ -158,6 +158,17 @@ for extra_requirements_filename in os.listdir(extra_requirements_dir): with open(os.path.join(extra_requirements_dir, extra_requirements_filename)) as extra_requirements_file: extra_requirements[filename_match.group(1)] = extra_requirements_file.read().splitlines() +try: + with open('README.rst', 'r') as readme_file: + longdesc = readme_file.read() +except (IOError, OSError): + longdesc = ('Ansible is a radically simple IT automation system. It handles' + ' configuration-management, application deployment, cloud provisioning, ad-hoc' + ' task-execution, and multinode orchestration - including trivializing things like' + ' zero-downtime rolling updates with load balancers.\n' + '\n' + 'Read the documentation and more at https://ansible.com/' + ) setup( # Use the distutils SDist so that symlinks are not expanded @@ -172,6 +183,7 @@ setup( name='ansible', version=__version__, description='Radically simple IT automation', + long_description=longdesc, author=__author__, author_email='info@ansible.com', url='https://ansible.com/', -- cgit v1.2.1