Skip to content

Commit 22c86f0

Browse files
authored
Fix setup error py2.7 (#52)
* Update changelog * Handle file on py2.7
1 parent 34b53df commit 22c86f0

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

CHANGELOG.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
0.2.3 (2020-07-31)
2+
------------------
3+
4+
*Fixed:*
5+
6+
- Fixed ``long_description`` for PyPI.
7+
18
0.2.2 (2020-07-31)
29
------------------
310

setup.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,14 @@
22
from setuptools import setup, find_packages
33

44
this_directory = path.abspath(path.dirname(__file__))
5-
with open(path.join(this_directory, 'README.rst'), encoding='utf-8') as f:
6-
long_description = f.read()
5+
6+
try:
7+
with open(path.join(this_directory, 'README.rst'), encoding='utf-8') as f:
8+
long_description = f.read()
9+
except TypeError:
10+
import io
11+
with io.open(path.join(this_directory, 'README.rst'), encoding='utf-8') as f:
12+
long_description = f.read()
713

814
setup(
915
name='django-rest-assured',

0 commit comments

Comments
 (0)