Changeset 3133:8105847cfdb4 in livinglogic.python.xist

Show
Ignore:
Timestamp:
01/07/08 14:40:18 (12 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Automatically append news section to description.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • setup.py

    r3116 r3133  
    4747""" 
    4848 
    49 DESCRIPTION = "\n".join(textwrap.wrap(DESCRIPTION.strip(), width=64, replace_whitespace=True)) 
     49try: 
     50    news = list(open("NEWS.rst", "r")) 
     51except IOError: 
     52    description = DESCRIPTION.strip() 
     53else: 
     54    underlines = [i for (i, line) in enumerate(news) if line.startswith("---")] 
     55    news = news[underlines[0]-1:underlines[1]-1] 
     56    news = "".join(news) 
     57    description = "%s\n\n\n%s" % (DESCRIPTION.strip(), news) 
    5058 
    5159 
     
    5462    version="3.0", 
    5563    description="An extensible HTML/XML generator", 
    56     long_description=DESCRIPTION, 
     64    long_description=description, 
    5765    author="Walter Doerwald", 
    5866    author_email="walter@livinglogic.de",