File: 0001-Use-io.open-for-Python3-support.patch

package info (click to toggle)
python-django-ordered-model 3.7.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 592 kB
  • sloc: python: 2,139; sh: 38; makefile: 11
file content (27 lines) | stat: -rw-r--r-- 688 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From: Michael Fladischer <FladischerMichael@fladi.at>
Date: Fri, 12 May 2017 20:47:00 +0200
Subject: Use io.open for Python3 support.

---
 setup.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/setup.py b/setup.py
index 7c6a685..1d4e4ec 100644
--- a/setup.py
+++ b/setup.py
@@ -1,11 +1,12 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
+import io
 from setuptools import setup
 
-with open("requirements.txt") as f:
+with io.open("requirements.txt", encoding="utf-8") as f:
     requires = f.read().splitlines()
 
-with open("README.md", encoding="utf-8") as f:
+with io.open("README.md", encoding="utf-8") as f:
     long_description = f.read()
 
 setup(