Skip to content

Commit

Permalink
Fix cairosvg python2
Browse files Browse the repository at this point in the history
  • Loading branch information
paradoxxxzero committed Jan 16, 2017
1 parent 13c0d1a commit 811a557
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ python:
- 3.3
- 3.4
- 3.5
- 3.6
- nightly
# - pypy Disabled for pypy < 2.6.0
- pypy

install:
- pip install .
Expand Down
15 changes: 10 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,21 @@ def run_tests(self):

ROOT = os.path.dirname(__file__)

tests_requirements = [
"pyquery", "flask", "cairosvg",
'pytest-runner', 'pytest-cov', 'pytest-flake8', 'pytest-isort',
'pytest'
]

# Explicitly specify the encoding of pygal/__init__.py if we're on py3.
kwargs = {}
if sys.version_info[0] == 3:
kwargs['encoding'] = 'utf-8'
cairosvg = 'cairosvg'
else:
cairosvg = 'cairosvg==0.5'

tests_requirements = [
"pyquery", "flask", cairosvg,
'pytest-runner', 'pytest-cov', 'pytest-flake8', 'pytest-isort',
'pytest'
]


with open(os.path.join(ROOT, 'pygal', '__init__.py'), **kwargs) as fd:
__version__ = re.search("__version__ = '([^']+)'", fd.read()).group(1)
Expand Down

0 comments on commit 811a557

Please sign in to comment.