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
This commit is contained in:
Stephen Weber 2018-04-06 12:38:40 -07:00 committed by Toshio Kuratomi
parent f1b63f435e
commit 7afa34ae8a
7 changed files with 120 additions and 60 deletions

View file

@ -1,6 +1,6 @@
prune ticket_stubs
prune hacking
include README.md COPYING
include README.rst COPYING
include SYMLINK_CACHE.json
include requirements.txt
include .coveragerc

View file

@ -1,56 +0,0 @@
[![PyPI version](https://img.shields.io/pypi/v/ansible.svg)](https://pypi.python.org/pypi/ansible)
[![Build Status](https://api.shippable.com/projects/573f79d02a8192902e20e34b/badge?branch=devel)](https://app.shippable.com/projects/573f79d02a8192902e20e34b)
Ansible
=======
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.
Read the documentation and more at https://ansible.com/
You can find installation instructions [here](https://docs.ansible.com/ansible/intro_installation.html) for a variety of platforms. Most users should probably install a released version of Ansible from `pip`, a package manager or our [release repository](https://releases.ansible.com/ansible/). [Officially supported](https://www.ansible.com/ansible-engine) builds of Ansible are also available. Some power users run directly from the development branch - while significant efforts are made to ensure that `devel` is reasonably stable, you're more likely to encounter breaking changes when running Ansible this way.
Design Principles
=================
* Have a dead simple setup process and a minimal learning curve
* Manage machines very quickly and in parallel
* Avoid custom-agents and additional open ports, be agentless by leveraging the existing SSH daemon
* Describe infrastructure in a language that is both machine and human friendly
* Focus on security and easy auditability/review/rewriting of content
* Manage new remote machines instantly, without bootstrapping any software
* Allow module development in any dynamic language, not just Python
* Be usable as non-root
* Be the easiest IT automation system to use, ever.
Get Involved
============
* Read [Community Information](https://docs.ansible.com/community.html) for all kinds of ways to contribute to and interact with the project, including mailing list information and how to submit bug reports and code to Ansible.
* All code submissions are done through pull requests. Take care to make sure no merge commits are in the submission, and use `git rebase` vs `git merge` for this reason. If submitting a large code change (other than modules), it's probably a good idea to join ansible-devel and talk about what you would like to do or add first and to avoid duplicate efforts. This not only helps everyone know what's going on, it also helps save time and effort if we decide some changes are needed.
* Users list: [ansible-project](https://groups.google.com/group/ansible-project)
* Development list: [ansible-devel](https://groups.google.com/group/ansible-devel)
* Announcement list: [ansible-announce](https://groups.google.com/group/ansible-announce) - read only
* irc.freenode.net: #ansible
Branch Info
===========
* Releases are named after Led Zeppelin songs. (Releases prior to 2.0 were named after Van Halen songs.)
* The devel branch corresponds to the release actively under development.
* Various release-X.Y branches exist for previous releases.
* We'd love to have your contributions, read [Community Information](https://docs.ansible.com/community.html) for notes on how to get started.
Authors
=======
Ansible was created by [Michael DeHaan](https://github.com/mpdehaan) (michael.dehaan/gmail/com) and has contributions from over 1000 users (and growing). Thanks everyone!
Ansible is sponsored by [Ansible, Inc](https://ansible.com)
License
=======
GNU General Public License v3.0
See [COPYING](COPYING) to see the full text.

104
README.rst Normal file
View file

@ -0,0 +1,104 @@
|PyPI version| |Build Status|
*******
Ansible
*******
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.
Read the documentation and more at https://ansible.com/
You can find installation instructions
`here <https://docs.ansible.com/intro_getting_started.html>`_ for a
variety of platforms.
Most users should probably install a released version of Ansible from ``pip``, a package manager or
our `release repository <https://releases.ansible.com/ansible/>`_. `Officially supported
<https://www.ansible.com/ansible-engine>`_ builds of Ansible are also available. Some power users
run directly from the development branch - while significant efforts are made to ensure that
``devel`` is reasonably stable, you're more likely to encounter breaking changes when running
Ansible this way.
If you want to download a tarball of a release, go to
`releases.ansible.com <https://releases.ansible.com/ansible>`_, though
most users use ``yum`` (using the EPEL instructions linked above),
``apt`` (using the PPA instructions linked above), or
``pip install ansible``.
Design Principles
=================
* Have a dead simple setup process and a minimal learning curve
* Manage machines very quickly and in parallel
* Avoid custom-agents and additional open ports, be agentless by
leveraging the existing SSH daemon
* Describe infrastructure in a language that is both machine and human
friendly
* Focus on security and easy auditability/review/rewriting of content
* Manage new remote machines instantly, without bootstrapping any
software
* Allow module development in any dynamic language, not just Python
* Be usable as non-root
* Be the easiest IT automation system to use, ever.
Get Involved
============
* Read `Community
Information <https://docs.ansible.com/community.html>`_ for all
kinds of ways to contribute to and interact with the project,
including mailing list information and how to submit bug reports and
code to Ansible.
* All code submissions are done through pull requests. Take care to
make sure no merge commits are in the submission, and use
``git rebase`` vs ``git merge`` for this reason. If submitting a
large code change (other than modules), it's probably a good idea to
join ansible-devel and talk about what you would like to do or add
first and to avoid duplicate efforts. This not only helps everyone
know what's going on, it also helps save time and effort if we decide
some changes are needed.
* Users list:
`ansible-project <https://groups.google.com/group/ansible-project>`_
* Development list:
`ansible-devel <https://groups.google.com/group/ansible-devel>`_
* Announcement list:
`ansible-announce <https://groups.google.com/group/ansible-announce>`_
-- read only
* irc.freenode.net: #ansible
Branch Info
===========
* Releases are named after Led Zeppelin songs. (Releases prior to 2.0
were named after Van Halen songs.)
* The devel branch corresponds to the release actively under
development.
* Various release-X.Y branches exist for previous releases.
* We'd love to have your contributions, read `Community
Information <https://docs.ansible.com/community.html>`_ for notes on
how to get started.
Authors
=======
Ansible was created by `Michael DeHaan <https://github.com/mpdehaan>`_
(michael.dehaan/gmail/com) and has contributions from over 1000 users
(and growing). Thanks everyone!
Ansible is sponsored by `Ansible, Inc <https://ansible.com>`_
Licence
=======
GNU General Public License v3.0
See `COPYING <COPYING>`_ to see the full text.
.. |PyPI version| image:: https://img.shields.io/pypi/v/ansible.svg
:target: https://pypi.python.org/pypi/ansible
.. |Build Status| image:: https://api.shippable.com/projects/573f79d02a8192902e20e34b/badge?branch=devel
:target: https://app.shippable.com/projects/573f79d02a8192902e20e34b

View file

@ -47,7 +47,7 @@ package() {
install -Dm644 examples/ansible.cfg $pkgdir/etc/ansible/ansible.cfg
install -Dm644 README.md $pkgdir/usr/share/doc/ansible/README.md
install -Dm644 README.rst $pkgdir/usr/share/doc/ansible/README.rst
install -Dm644 COPYING $pkgdir/usr/share/doc/ansible/COPYING
install -Dm644 CHANGELOG.md $pkgdir/usr/share/doc/ansible/CHANGELOG.md

View file

@ -45,7 +45,7 @@ patch {
post-destroot {
# documentation and examples
xinstall -m 644 -W ${worksrcpath} README.md CHANGELOG.md CONTRIBUTING.md COPYING \
xinstall -m 644 -W ${worksrcpath} README.rst CHANGELOG.md CONTRIBUTING.md COPYING \
${destroot}${prefix}/share/doc/${name}
xinstall -m 755 -d ${destroot}${prefix}/share/doc/examples

View file

@ -131,7 +131,7 @@ rm -rf %{buildroot}
%{_bindir}/ansible*
%dir %{_datadir}/ansible
%config(noreplace) %{_sysconfdir}/ansible
%doc README.md PKG-INFO COPYING CHANGELOG.md
%doc README.rst PKG-INFO COPYING CHANGELOG.md
%doc %{_mandir}/man1/ansible*
%changelog

View file

@ -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/',