comparison setup.py @ 4495:53e438d1ca19 1.4.17

fix long_description again: we can't build a windows-installer on Linux if the description is unicode, see http://bugs.python.org/issue10945 (also python 2.6 builds roundup-1.4.17.linux-i686.exe when building bdist_wininst where python 2.5 produces roundup-1.4.17.win32.exe, I'm building the windows binary distro with 2.5 now)
author Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net>
date Fri, 13 May 2011 09:15:46 +0000
parents 5d43b2a5eb69
children 85dfe17c182e
comparison
equal deleted inserted replaced
4494:41ea7d838c82 4495:53e438d1ca19
92 data_files.append(include('share/doc/roundup/html', '*')) 92 data_files.append(include('share/doc/roundup/html', '*'))
93 93
94 # perform the setup action 94 # perform the setup action
95 from roundup import __version__ 95 from roundup import __version__
96 96
97 # long_description may not contain non-ascii characters. Distutils
98 # will produce an non-installable installer on linux *and* we can't
99 # run the bdist_wininst on Linux if there are non-ascii characters
100 # because the distutils installer will try to use the mbcs codec
101 # which isn't available on non-windows platforms. See also
102 # http://bugs.python.org/issue10945
97 long_description=open('doc/announcement.txt').read().decode('utf8') 103 long_description=open('doc/announcement.txt').read().decode('utf8')
98 try: 104 try:
99 long_description.encode('ascii') 105 long_description = long_description.encode('ascii')
100 except UnicodeEncodeError, cause: 106 except UnicodeEncodeError, cause:
101 print >> sys.stderr, "doc/announcement.txt contains non-ascii: %s" \ 107 print >> sys.stderr, "doc/announcement.txt contains non-ascii: %s" \
102 % cause 108 % cause
103 sys.exit(42) 109 sys.exit(42)
104 110

Roundup Issue Tracker: http://roundup-tracker.org/