From 811a5575c400f0cc623723af8e10ca8ab1fd8746 Mon Sep 17 00:00:00 2001 From: Florian Mounier Date: Mon, 16 Jan 2017 18:12:24 +0100 Subject: [PATCH] Fix cairosvg python2 --- .travis.yml | 3 ++- setup.py | 15 ++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1a28d29..41a4cdc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 . diff --git a/setup.py b/setup.py index bda863f..830e2db 100644 --- a/setup.py +++ b/setup.py @@ -40,16 +40,21 @@ class PyTest(TestCommand): 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)