Merge lp:~lgp171188/soupmatchers/soupmatchers into lp:soupmatchers

Proposed by Guruprasad
Status: Merged
Merged at revision: 65
Proposed branch: lp:~lgp171188/soupmatchers/soupmatchers
Merge into: lp:soupmatchers
Diff against target: 43 lines (+19/-8)
1 file modified
setup.py (+19/-8)
To merge this branch: bzr merge lp:~lgp171188/soupmatchers/soupmatchers
Reviewer Review Type Date Requested Status
Colin Watson Approve
Review via email: mp+415447@code.launchpad.net

Commit message

Set the README.rst contents as the long_description value

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== renamed file 'README' => 'README.rst'
2=== modified file 'setup.py'
3--- setup.py 2018-05-18 16:06:13 +0000
4+++ setup.py 2022-02-11 13:19:29 +0000
5@@ -1,5 +1,22 @@
6 from setuptools import setup
7-from textwrap import dedent
8+
9+
10+# generic helpers primarily for the long_description
11+def generate(*docname_or_string):
12+ marker = '.. pypi description ends here'
13+ res = []
14+ for value in docname_or_string:
15+ if value.endswith('.rst'):
16+ with open(value) as f:
17+ value = f.read()
18+ idx = value.find(marker)
19+ if idx >= 0:
20+ value = value[:idx]
21+ res.append(value)
22+ if not value.endswith('\n'):
23+ res.append('')
24+ return '\n'.join(res)
25+# end generic helpers
26
27
28 setup(
29@@ -9,13 +26,7 @@
30 url='http://launchpad.net/soupmatchers',
31 license='Eclipse Public License',
32 packages=['soupmatchers',],
33- long_description=dedent('''
34- This module allows your testing to be more robust against textual
35- changes by working against the parse tree provided by BeautifulSoup.
36- It provides a powerful language for matching parts of the HTML, giving
37- you endless possibilities for testing. It does this while fitting in
38- to your TestCase hierarchy because it makes use of testtools
39- Matchers.'''),
40+ long_description=generate('README.rst'),
41 setup_requires=['setuptools'],
42 install_requires=['testtools>0.9.3', 'beautifulsoup4'],
43 classifiers=[

Subscribers

People subscribed via source and target branches

to all changes: