Fixed readme decoding.

Closes #85.
This commit is contained in:
Jakub Roztocil 2012-08-16 03:11:15 +02:00
parent a5522b8233
commit 8bf7f8219c

View File

@ -1,6 +1,7 @@
import os import os
import sys import sys
import re import re
import codecs
from setuptools import setup from setuptools import setup
import httpie import httpie
@ -25,7 +26,7 @@ if 'win32' in str(sys.platform).lower():
def long_description(): def long_description():
"""Pre-process the README so that PyPi can render it properly.""" """Pre-process the README so that PyPi can render it properly."""
with open('README.rst') as f: with codecs.open('README.rst', encoding='utf8') as f:
rst = f.read() rst = f.read()
code_block = '(:\n\n)?\.\. code-block::.*' code_block = '(:\n\n)?\.\. code-block::.*'
rst = re.sub(code_block, '::', rst) rst = re.sub(code_block, '::', rst)