File: 0001-Use-io.open-to-read-UTF-8-README.rst-file.patch

package info (click to toggle)
python-scrapy-djangoitem 1.1.1-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 148 kB
  • sloc: python: 171; sh: 6; makefile: 3
file content (28 lines) | stat: -rw-r--r-- 883 bytes parent folder | download | duplicates (4)
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
28
From: Michael Fladischer <FladischerMichael@fladi.at>
Date: Thu, 2 Feb 2017 20:14:47 +0100
Subject: Use io.open to read UTF-8 README.rst file.

Otherwise we would not be able to use setup.py with Python3.
---
 setup.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/setup.py b/setup.py
index 2aa7bb8..b654e0f 100644
--- a/setup.py
+++ b/setup.py
@@ -1,12 +1,13 @@
 from setuptools import setup, find_packages
 
+import io
 
 setup(
     name='scrapy-djangoitem',
     version='1.1.1',
     url='https://github.com/scrapy-plugins/scrapy-djangoitem',
     description='Scrapy extension to write scraped items using Django models',
-    long_description=open('README.rst').read(),
+    long_description=io.open('README.rst', encoding='utf-8').read(),
     author='Scrapy developers',
     license='BSD',
     packages=find_packages(exclude=('tests', 'tests.*')),