Skip to content

Commit 1487566

Browse files
authored
Merge pull request dbc-team#329 from facultyai/python2-setup
Fix setup.py for Python 2
2 parents 106b30b + 197f81a commit 1487566

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ script:
1111
- "if [[ \"$GROUP\" == js ]] ; then npm run lint ; fi"
1212
- "if [[ \"$GROUP\" == js ]] ; then npm run test ; fi"
1313
- "if [[ \"$GROUP\" == js ]] ; then npm run test:demo ; fi"
14+
- "if [[ \"$GROUP\" == js ]] ; then pip install .; fi"
1415
- "if [[ \"$GROUP\" == python-linting ]] ; then black . --check ; fi"
1516
- "if [[ \"$GROUP\" == python-linting ]] ; then flake8 ; fi"
1617
- "if [[ \"$GROUP\" == python-linting ]] ; then isort -rc -c ; fi"
@@ -19,6 +20,8 @@ matrix:
1920
include:
2021
- python: 3.6
2122
env: GROUP=python-linting
23+
- python: 2.7
24+
env: GROUP=js
2225
- python: 3.6
2326
env: GROUP=js
2427
- python: 2.7

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import io
12
import os
23

34
from setuptools import find_packages, setup
@@ -19,7 +20,7 @@ def _get_version():
1920

2021

2122
def _get_long_description():
22-
with open(os.path.join(HERE, "landing-page.md"), encoding="utf8") as f:
23+
with io.open(os.path.join(HERE, "landing-page.md"), encoding="utf8") as f:
2324
return f.read()
2425

2526

0 commit comments

Comments
 (0)