From 205d46538bd9b7fec9dc6d745231d58bbecda775 Mon Sep 17 00:00:00 2001
From: zooko <zooko@zooko.com>
Date: Sun, 16 Jan 2011 23:22:49 +0530
Subject: [PATCH] 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
---
 zfec/setup.py | 5 +++++
 1 file changed, 5 insertions(+)

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',
-- 
2.45.2