I'm trying to develop a python program with a recent version of setuptools. But every time my build fails with the following message:
$ tox -e $TOX_ENV
GLOB sdist-make: /home/travis/build/kartoch/myapp/setup.py
py26 create: /home/travis/build/kartoch/myapp/.tox/py26
py26 inst: /home/travis/build/kartoch/myapp/.tox/dist/myapp-0.1.0.zip
ERROR: invocation failed, logfile: /home/travis/build/kartoch/myapp/.tox/py26/log/py26-1.log
[...]
Unpacking ./.tox/dist/myap-0.1.0.zip
Running setup.py (path:/tmp/pip-P4VhFx-build/setup.py) egg_info for package from file:///home/travis/build/kartoch/myapp/.tox/dist/myapp-0.1.0.zip
The required version of setuptools (>=5.4.1) is not available,
and can't be installed while this script is running. Please
install a more recent version first, using
'easy_install -U setuptools'.
(Currently using setuptools 3.6 (/home/travis/build/kartoch/myapp/.tox/py26/lib/python2.6/site-packages))
Complete output from command python setup.py egg_info:
So far the problem is:
Any idea ?
I'm launching my tests with the following'.travis.yml':
language: python
env:
- TOX_ENV=py26
- TOX_ENV=py27
install:
- pip install tox
script:
- tox -e $TOX_ENV
The tox configuration ('tox.ini') is the following:
[tox]
envlist = py26, py27
[testenv]
commands =
nosetests
[testenv:py26]
[testenv:py27]
you generally don't need to worry about setuptools - either it isn't really needed, or the high-level installers will make sure you have a recent enough version installed; in this last case, as long as the operations they have to do are simple enough generally they won't fail.
Use:
[testenv]
deps =
setuptools==5.4.1 # Or whatever version you need
commands =
nosetests
I was able to solve this by adding an updated setuptools to the install
section:
install:
- pip install -U pip wheel
- pip install setuptools==24.0.3
- pip install -r ourapp/requirements/requirements.txt
In the tox.ini:
deps =
setuptools=38.2.5
It will block the initial python installation with this version within the tox environment. Then avec it will install the one required by the egg.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With