Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

UnicodeDecodeError in setup.py (closes #475)

  • Loading branch information...
commit f55961063f5b0114ef8030c06430929007ecfb29 1 parent 542df32
@pennersr authored
Showing with 12 additions and 7 deletions.
  1. +12 −7 setup.py
View
19 setup.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+import io
import os
import sys
from fnmatch import fnmatchcase
@@ -15,10 +16,11 @@
"./example"
]
+
# Copied from paste/util/finddata.py
def find_package_data(where=".", package="", exclude=standard_exclude,
- exclude_directories=standard_exclude_directories,
- only_in_packages=True, show_ignored=False):
+ exclude_directories=standard_exclude_directories,
+ only_in_packages=True, show_ignored=False):
"""
Return a dictionary suitable for use in ``package_data``
in a distutils ``setup.py`` file.
@@ -56,7 +58,7 @@ def find_package_data(where=".", package="", exclude=standard_exclude,
bad_name = False
for pattern in exclude_directories:
if (fnmatchcase(name, pattern)
- or fn.lower() == pattern.lower()):
+ or fn.lower() == pattern.lower()):
bad_name = True
if show_ignored:
print >> sys.stderr, (
@@ -66,20 +68,21 @@ def find_package_data(where=".", package="", exclude=standard_exclude,
if bad_name:
continue
if (os.path.isfile(os.path.join(fn, "__init__.py"))
- and not prefix):
+ and not prefix):
if not package:
new_package = name
else:
new_package = package + "." + name
stack.append((fn, "", new_package, False))
else:
- stack.append((fn, prefix + name + "/", package, only_in_packages))
+ stack.append((fn, prefix + name + "/", package,
+ only_in_packages))
elif package or not only_in_packages:
# is a file
bad_name = False
for pattern in exclude:
if (fnmatchcase(name, pattern)
- or fn.lower() == pattern.lower()):
+ or fn.lower() == pattern.lower()):
bad_name = True
if show_ignored:
print >> sys.stderr, (
@@ -103,6 +106,8 @@ def find_package_data(where=".", package="", exclude=standard_exclude,
else:
openid_package = 'python3-openid >= 3.0.1'
+long_description = io.open('README.rst', encoding='utf-8').read()
+
METADATA = dict(
name='django-allauth',
version='0.15.1-dev',
@@ -111,7 +116,7 @@ def find_package_data(where=".", package="", exclude=standard_exclude,
description='Integrated set of Django applications addressing'
' authentication, registration, account management as well as'
' 3rd party (social) account authentication.',
- long_description=open('README.rst').read(),
+ long_description=long_description,
url='http://github.com/pennersr/django-allauth',
keywords='django auth account social openid twitter facebook oauth'
' registration',
Please sign in to comment.
Something went wrong with that request. Please try again.