Permalink
Browse files

Fix install on ASCII locales.

  • Loading branch information...
1 parent 95b6c22 commit 9d77739d942044e2147cac3e733ca726b2e23f8c @SimonSapin SimonSapin committed Apr 6, 2012
Showing with 6 additions and 5 deletions.
  1. +3 −3 setup.py
  2. +2 −2 tinycss/__init__.py
  3. +1 −0 tinycss/version.py
View
@@ -39,11 +39,11 @@ def build_extension(self, ext):
ROOT = os.path.dirname(__file__)
-with open(os.path.join(ROOT, 'tinycss', '__init__.py')) as fd:
+with open(os.path.join(ROOT, 'tinycss', 'version.py')) as fd:
VERSION = re.search("VERSION = '([^']+)'", fd.read()).group(1)
-with open(os.path.join(ROOT, 'README.rst')) as fd:
- README = fd.read()
+with open(os.path.join(ROOT, 'README.rst'), 'rb') as fd:
+ README = fd.read().decode('utf8')
def run_setup(with_extension):
View
@@ -11,8 +11,8 @@
import sys
-
-VERSION = '0.1'
+from .version import VERSION
+__version__ = VERSION
def make_parser(*base_classes, **kwargs):
View
@@ -0,0 +1 @@
+VERSION = '0.1'

0 comments on commit 9d77739

Please sign in to comment.