There is an issue when using tox
to run pytest
for my package using py26 as one of the envs (global env is py3.6, py26 env is py2.6.9 installed via pyenv
)
tox.ini file:
[tox]
envlist = py26,py27,py36
[testenv]
deps=
pytest
PyPDT
py26: numpy<1.12.0
py{27,36}: numpy
py26: pandas==0.16.2
py{27,36}: pandas
py26: matplotlib<1.5.0
py{27,36}: matplotlib<2.1.0
commands=pytest
The following error occurs during pandas
installation:
Collecting pandas==0.16.2
Using cached pandas-0.16.2.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/pr/ghw8lmr94c5g9ntx4cp9990w0000gn/T/pip-build-cuCAyE/pandas/setup.py", line 406, in <module>
from wheel.bdist_wheel import bdist_wheel
File "/Users/brianpollack/Coding/scikit-hep/.tox/py26/lib/python2.6/site-packages/wheel/bdist_wheel.py", line 407
ignore=lambda x, y: {'PKG-INFO', 'requires.txt', 'SOURCES.txt',
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/pr/ghw8lmr94c5g9ntx4cp9990w0000gn/T/pip-build-cuCAyE/pandas/
ERROR: could not install deps [setuptools, pytest, PyPDT, numpy<1.12.0, pandas==0.16.2, matplotlib<1.5.0]; v = InvocationError('/Users/brianpollack/Coding/scikit-hep/.tox/py26/bin/pip install setuptools pytest PyPDT numpy<1.12.0 pandas==0.16.2 matplotlib<1.5.0 (see /Users/brianpollack/Coding/scikit-hep/.tox/py26/log/py26-1.log)', 1)
Any idea what's causing this syntax error?
EDIT:
Updated best answer: using -cconstraints.txt
to enforce downgraded version of wheel