[Python-modules-commits] [django-oauth-toolkit] 04/07: Use io.open to read UTF-8 encoded files.
Michael Fladischer
fladi at moszumanska.debian.org
Fri Mar 10 08:01:25 UTC 2017
This is an automated email from the git hooks/post-receive script.
fladi pushed a commit to branch experimental
in repository django-oauth-toolkit.
commit 1d96ba2494d11305796cec603e397dd9b1cd3f00
Author: Michael Fladischer <FladischerMichael at fladi.at>
Date: Wed Dec 7 17:14:14 2016 +0100
Use io.open to read UTF-8 encoded files.
---
setup.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/setup.py b/setup.py
index a0b6689..aabd973 100644
--- a/setup.py
+++ b/setup.py
@@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
+import io
import os
import re
@@ -10,14 +11,14 @@ def get_version(package):
"""
Return package version as listed in `__version__` in `init.py`.
"""
- init_py = open(os.path.join(package, '__init__.py')).read()
+ init_py = io.open(os.path.join(package, '__init__.py'), encoding='utf-8').read()
return re.match("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1)
version = get_version('oauth2_provider')
-LONG_DESCRIPTION = open('README.rst').read()
+LONG_DESCRIPTION = io.open('README.rst', encoding='utf-8').read()
setup(
name="django-oauth-toolkit",
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/django-oauth-toolkit.git
More information about the Python-modules-commits
mailing list