Package: python-file-encryptor / 0.2.9-2

00-fix-encoding.patch Patch series | download
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
Description: Fix build with python > 3, setting the long description encoding at build.
Forwarded: https://github.com/Storj/file-encryptor/issues/6
Author: Josue Ortega <josueortega@debian.org.gt>
Last-Update: 2015-12-13

--- a/setup.py
+++ b/setup.py
@@ -23,10 +23,18 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 # SOFTWARE.
 
+import sys
+
 from setuptools import setup
 from setuptools.command.test import test as TestCommand
 
-LONG_DESCRIPTION = open('README.rst').read()
+LONG_DESCRIPTION = ''
+
+if sys.version_info[:1] < (3,):
+    LONG_DESCRIPTION = open('README.rst').read()
+else:
+    LONG_DESCRIPTION = open('README.rst', encoding='utf-8').read()
+
 VERSION = '0.2.9'
 
 install_requirements = [