Code

test that announcement.txt is pure ASCII, required at least up to
authorschlatterbeck <schlatterbeck@57a73879-2fb5-44c3-a270-3262357dd7e2>
Wed, 20 Apr 2011 13:12:53 +0000 (13:12 +0000)
committerschlatterbeck <schlatterbeck@57a73879-2fb5-44c3-a270-3262357dd7e2>
Wed, 20 Apr 2011 13:12:53 +0000 (13:12 +0000)
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
setup.py

index a66665e999353626c87aaaf2a441787194a9e687..14e7529eee6d7ecc1143bc0e5e2b34b140e7a955 100644 (file)
@@ -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
index 0d94693caff75ace4e1f8cd708fd178590864cb6..3426b80d1671d0098c609a58e5c4fb5091e3741a 100644 (file)
--- 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',