From 669315c8351f367a1f748cf35489964eda9c244b Mon Sep 17 00:00:00 2001 From: Florian Schulze Date: Mon, 30 Jul 2018 07:50:50 +0200 Subject: [PATCH] Add changelog in long package description and documentation. Fixes #165. --- CHANGELOG.rst | 7 +++++++ README.rst | 3 ++- changelog/165.trivial.rst | 1 + docs/changelog.rst | 1 + docs/index.rst | 11 +++++++++++ setup.py | 7 +++++-- 6 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 changelog/165.trivial.rst create mode 100644 docs/changelog.rst diff --git a/CHANGELOG.rst b/CHANGELOG.rst index df8f41f3..ac23c35f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,3 +1,10 @@ +========= +Changelog +========= + +.. towncrier release notes start + + pluggy 0.7.1 (2018-07-28) ========================= diff --git a/README.rst b/README.rst index 7b53954d..9d984296 100644 --- a/README.rst +++ b/README.rst @@ -1,3 +1,4 @@ +==================================================== pluggy - A minimalist production ready plugin system ==================================================== @@ -8,7 +9,7 @@ This is the core framework used by the `pytest`_, `tox`_, and `devpi`_ projects. Please `read the docs`_ to learn more! A definitive example -******************** +==================== .. code-block:: python import pluggy diff --git a/changelog/165.trivial.rst b/changelog/165.trivial.rst new file mode 100644 index 00000000..df4066fe --- /dev/null +++ b/changelog/165.trivial.rst @@ -0,0 +1 @@ +Add changelog in long package description and documentation. \ No newline at end of file diff --git a/docs/changelog.rst b/docs/changelog.rst new file mode 100644 index 00000000..565b0521 --- /dev/null +++ b/docs/changelog.rst @@ -0,0 +1 @@ +.. include:: ../CHANGELOG.rst diff --git a/docs/index.rst b/docs/index.rst index 53482561..2dfdd6cb 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -854,6 +854,17 @@ in your project you should thus use a dependency restriction like ``"pluggy>=0.1.0,<1.0"`` to avoid surprises. +Table of contents +***************** + +.. toctree:: + :maxdepth: 2 + + api_reference + changelog + + + .. hyperlinks .. _@contextlib.contextmanager: https://docs.python.org/3.6/library/contextlib.html#contextlib.contextmanager diff --git a/setup.py b/setup.py index b4b0224a..e31d021a 100644 --- a/setup.py +++ b/setup.py @@ -15,8 +15,11 @@ ('Programming Language :: Python :: %s' % x) for x in '2 2.7 3 3.4 3.5 3.6'.split()] -with open('README.rst') as fd: - long_description = fd.read() +with open('README.rst', 'rb') as fd: + long_description = fd.read().decode('utf-8') + +with open('CHANGELOG.rst', 'rb') as fd: + long_description += "\n\n" + fd.read().decode('utf-8') def main():