Skip to content

Commit b3b81de

Browse files
committed
fixed encoding error in python2
1 parent 0cae5ce commit b3b81de

2 files changed

Lines changed: 13 additions & 9 deletions

File tree

filezen/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Version of Filezen package
2-
VERSION = "1.4.0"
2+
VERSION = "1.4.1"

setup.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33

4-
4+
import sys
55
from setuptools import setup, find_packages
66
from filezen.version import VERSION
7-
__version__ = VERSION
8-
97

10-
with open("README.rst", "r") as f:
11-
long_description = f.read()
8+
__version__ = VERSION
129

10+
try:
11+
if sys.version_info[:2] <= (2, 7):
12+
long_description = open("README.rst")
13+
else:
14+
long_description = open("README.rst", "r", encoding="utf8")
15+
finally:
16+
long_description.close()
1317

1418
setup(
1519
name='Filezen',
@@ -22,9 +26,9 @@
2226
url='https://github.com/ab-anand/Filezen',
2327
license='MIT',
2428
install_requires=[
25-
"pathlib >= 1.0.1",
26-
"setuptools >= 44.1.1"
27-
],
29+
"pathlib >= 1.0.1",
30+
"setuptools >= 44.1.1"
31+
],
2832
# dependency_links=dependency_links,
2933
# adding package data to it
3034
packages=find_packages(exclude=['contrib', 'docs']),

0 commit comments

Comments
 (0)