Skip to content

Commit 7b3e341

Browse files
committed
Add CHANGES to setup.py long_description
This adds the CHANGES to the long_description so it shows up in PyPI on the package page. This surfaces warnings for backwards-incompatible changes there where users might be looking. Fixes #180
1 parent 8f541fa commit 7b3e341

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

README.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,5 @@ The simplest way to use Bleach is:
101101
.. _GitHub: https://github.com/mozilla/bleach
102102
.. _ReadTheDocs: http://bleach.readthedocs.org/
103103
.. _PyPI: http://pypi.python.org/pypi/bleach
104+
105+

setup.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,18 @@
1414
# https://github.com/html5lib/html5lib-python/pull/177)
1515
install_requires.append('ordereddict')
1616

17+
18+
def get_long_desc():
19+
desc = open('README.rst').read()
20+
desc += open('CHANGES').read()
21+
return desc
22+
23+
1724
setup(
1825
name='bleach',
1926
version='1.4.2',
2027
description='An easy whitelist-based HTML-sanitizing tool.',
21-
long_description=open('README.rst').read(),
28+
long_description=get_long_desc(),
2229
maintainer='Jannis Leidel, Will Kahn-Greene',
2330
url='http://github.com/mozilla/bleach',
2431
license='Apache Software License',

0 commit comments

Comments
 (0)