]> git.rkrishnan.org Git - tahoe-lafs/zfec.git/commitdiff
setup: if there is a utf-8 "BOM" at the beginning on README.rst, strip it before...
authorzooko <zooko@zooko.com>
Sun, 16 Jan 2011 17:52:49 +0000 (23:22 +0530)
committerzooko <zooko@zooko.com>
Sun, 16 Jan 2011 17:52:49 +0000 (23:22 +0530)
Ignore-this: f06876029ceb9f60801017b98045343

darcs-hash:7024c4a6059b59767fd03609e33c4b35bfb4fbf6

zfec/setup.py

index a9bd4d830e3f2eec5328744766acdaee7085b9a7..ba28995985745d125cc62b36cae2cd698c067060 100755 (executable)
@@ -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',