From: zooko Date: Sun, 16 Jan 2011 17:52:49 +0000 (+0530) Subject: setup: if there is a utf-8 "BOM" at the beginning on README.rst, strip it before... X-Git-Url: https://git.rkrishnan.org/components/com_hotproperty/simplejson/frontends/(%5B%5E?a=commitdiff_plain;h=205d46538bd9b7fec9dc6d745231d58bbecda775;p=tahoe-lafs%2Fzfec.git setup: if there is a utf-8 "BOM" at the beginning on README.rst, strip it before passing the contents of the file to setup() Ignore-this: f06876029ceb9f60801017b98045343 darcs-hash:7024c4a6059b59767fd03609e33c4b35bfb4fbf6 --- diff --git a/zfec/setup.py b/zfec/setup.py index a9bd4d8..ba28995 100755 --- a/zfec/setup.py +++ b/zfec/setup.py @@ -140,6 +140,11 @@ data_fnames=[ 'COPYING.GPL', 'changelog', 'COPYING.TGPPL.html', 'TODO', 'README. doc_loc = "share/doc/" + PKG data_files = [(doc_loc, data_fnames)] +readmetext = open('README.rst').read() +if readmetext[:3] == '\xef\xbb\xbf': + # utf-8 "BOM" + readmetext = readmetext[3:] + setup(name=PKG, version=verstr, description='a fast erasure codec which can be used with the command-line, C, Python, or Haskell',