Skip to content

Commit 669315c

Browse files
committed
Add changelog in long package description and documentation. Fixes #165.
1 parent e601df4 commit 669315c

File tree

6 files changed

+27
-3
lines changed

6 files changed

+27
-3
lines changed

CHANGELOG.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
=========
2+
Changelog
3+
=========
4+
5+
.. towncrier release notes start
6+
7+
18
pluggy 0.7.1 (2018-07-28)
29
=========================
310

README.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
====================================================
12
pluggy - A minimalist production ready plugin system
23
====================================================
34

@@ -8,7 +9,7 @@ This is the core framework used by the `pytest`_, `tox`_, and `devpi`_ projects.
89
Please `read the docs`_ to learn more!
910

1011
A definitive example
11-
********************
12+
====================
1213
.. code-block:: python
1314
1415
import pluggy

changelog/165.trivial.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add changelog in long package description and documentation.

docs/changelog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.. include:: ../CHANGELOG.rst

docs/index.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -854,6 +854,17 @@ in your project you should thus use a dependency restriction like
854854
``"pluggy>=0.1.0,<1.0"`` to avoid surprises.
855855

856856

857+
Table of contents
858+
*****************
859+
860+
.. toctree::
861+
:maxdepth: 2
862+
863+
api_reference
864+
changelog
865+
866+
867+
857868
.. hyperlinks
858869
.. _@contextlib.contextmanager:
859870
https://docs.python.org/3.6/library/contextlib.html#contextlib.contextmanager

setup.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@
1515
('Programming Language :: Python :: %s' % x) for x in
1616
'2 2.7 3 3.4 3.5 3.6'.split()]
1717

18-
with open('README.rst') as fd:
19-
long_description = fd.read()
18+
with open('README.rst', 'rb') as fd:
19+
long_description = fd.read().decode('utf-8')
20+
21+
with open('CHANGELOG.rst', 'rb') as fd:
22+
long_description += "\n\n" + fd.read().decode('utf-8')
2023

2124

2225
def main():

0 commit comments

Comments
 (0)