From 84743f937b4f9cf75b2122029263b92bb4513e3f Mon Sep 17 00:00:00 2001 From: schlatterbeck Date: Wed, 20 Apr 2011 13:12:53 +0000 Subject: [PATCH] test that announcement.txt is pure ASCII, required at least up to python2.5 by distutils. (Note tht doc/announcement.txt is the *old* announcement from the last release, I've changed it so that setup.py will work for now and to illustrate what needed to be changed). git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4601 57a73879-2fb5-44c3-a270-3262357dd7e2 --- doc/announcement.txt | 4 ++-- setup.py | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/doc/announcement.txt b/doc/announcement.txt index a66665e..14e7529 100644 --- a/doc/announcement.txt +++ b/doc/announcement.txt @@ -22,7 +22,7 @@ Fixed: - fixed reporting of source missing warnings - relevant tests made locale independent, issue2550660 (thanks - Benni Bärmann for reporting). + Benni Baermann for reporting). - fix for incorrect except: syntax, issue2550661 (thanks Jakub Wilk) - No longer use the root logger, use a logger with prefix "roundup", see http://thread.gmane.org/gmane.comp.bug-tracking.roundup.devel/5356 @@ -38,7 +38,7 @@ Fixed: which roundup interprets as a Reject exception. Fixes issue2550667. Added regression tests for message/rfc822 attachments with and without configured unpacking (mailgw unpack_rfc822, see Features above) - Thanks to Benni Bärmann for reporting. + Thanks to Benni Baermann for reporting. - Allow search_popup macro to work with all db classes, issue2550567 (thanks John Kristensen) - lower memory footprint for (journal-) import diff --git a/setup.py b/setup.py index 0d94693..3426b80 100644 --- a/setup.py +++ b/setup.py @@ -94,6 +94,14 @@ def main(): # perform the setup action from roundup import __version__ + long_description=open('doc/announcement.txt').read().decode('utf8') + try: + long_description.encode('ascii') + except UnicodeEncodeError, cause: + print >> sys.stderr, "doc/announcement.txt contains non-ascii: %s" \ + % cause + sys.exit(42) + setup(name='roundup', version=__version__, author="Richard Jones", @@ -101,7 +109,7 @@ def main(): description="A simple-to-use and -install issue-tracking system" " with command-line, web and e-mail interfaces. Highly" " customisable.", - long_description=open('doc/announcement.txt').read().decode('utf8'), + long_description=long_description, url='http://www.roundup-tracker.org', download_url='http://pypi.python.org/pypi/roundup', classifiers=['Development Status :: 5 - Production/Stable', -- 2.30.2