2017-09-28 1 views
1

J'utilise TravisCI à run my unit tests for python 2.7, 3.4, 3.5 and 3.6. Mon fichier .travis.yml comprend la ligne - pip install pytest-faulthandler, qui jusqu'à il y a 2 jours ne m'a donné aucun problème. Puis, hier, sans raison apparente, cette ligne a commencé à causer Travis construire à crash avec l'erreur: (définie par Anaconda)Anaconda n'a pas la roue de construction pour faulthandler sur TravisCI pour python 2.7

The command "pip install pytest-faulthandler" failed and exited with 1 during .

Cela semble provenir d'un mauvais chemin à gcc:

unable to execute 'x86_64-conda_cos6-linux-gnu-gcc': No such file or directory

Le journal d'erreur détaillé ci-dessous. Pour autant que je peux dire que je n'ai rien changé à ma configuration (travis.yml, setup.cfg, setup.py) qui pourraient influencer cela. Le problème se produit uniquement pour python 2.7, pour 3.4-3.6 travis construit l'environnement sans aucun problème.

J'ai essayé la recherche en ligne pour voir si quelqu'un a connu/résolu cette question déjà, mais pas de chance. Toutes les suggestions/conseils seraient les bienvenus. Merci!

erreur Travis journal ci-dessous, le journal complet de construction se trouve here.

Collecting pytest-faulthandler 
    Downloading pytest_faulthandler-1.3.1-py2.py3-none-any.whl 
Collecting pytest>=2.6 (from pytest-faulthandler) 
    Downloading pytest-3.2.2-py2.py3-none-any.whl (187kB) 
    100% |████████████████████████████████| 194kB 4.7MB/s 
Collecting faulthandler; python_version == "2.6" or python_version == "2.7" (from pytest-faulthandler) 
    Downloading faulthandler-3.0.tar.gz (55kB) 
    100% |████████████████████████████████| 61kB 8.7MB/s 
Requirement already satisfied: setuptools in /home/travis/miniconda/envs/test-environment/lib/python2.7/site-packages (from pytest>=2.6->pytest-faulthandler) 
Collecting py>=1.4.33 (from pytest>=2.6->pytest-faulthandler) 
    Using cached py-1.4.34-py2.py3-none-any.whl 
Building wheels for collected packages: faulthandler 
    Running setup.py bdist_wheel for faulthandler ... error 
    Complete output from command /home/travis/miniconda/envs/test-environment/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-wI1YGd/faulthandler/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpyGVM8Opip-wheel- --python-tag cp27: 
    running bdist_wheel 
    running build 
    running build_ext 
    building 'faulthandler' extension 
    creating build 
    creating build/temp.linux-x86_64-2.7 
    x86_64-conda_cos6-linux-gnu-gcc -pthread -fno-strict-aliasing -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O3 -pipe -DNDEBUG -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/travis/miniconda/envs/test-environment/include/python2.7 -c faulthandler.c -o build/temp.linux-x86_64-2.7/faulthandler.o 
    unable to execute 'x86_64-conda_cos6-linux-gnu-gcc': No such file or directory 
    error: command 'x86_64-conda_cos6-linux-gnu-gcc' failed with exit status 1 

    ---------------------------------------- 
    Failed building wheel for faulthandler 
    Running setup.py clean for faulthandler 
Failed to build faulthandler 
Installing collected packages: py, pytest, faulthandler, pytest-faulthandler 
    Running setup.py install for faulthandler ... error 
    Complete output from command /home/travis/miniconda/envs/test-environment/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-wI1YGd/faulthandler/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-lKAMMU-record/install-record.txt --single-version-externally-managed --compile: 
    running install 
    running build 
    running build_ext 
    building 'faulthandler' extension 
    creating build 
    creating build/temp.linux-x86_64-2.7 
    x86_64-conda_cos6-linux-gnu-gcc -pthread -fno-strict-aliasing -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O3 -pipe -DNDEBUG -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/travis/miniconda/envs/test-environment/include/python2.7 -c faulthandler.c -o build/temp.linux-x86_64-2.7/faulthandler.o 
    unable to execute 'x86_64-conda_cos6-linux-gnu-gcc': No such file or directory 
    error: command 'x86_64-conda_cos6-linux-gnu-gcc' failed with exit status 1 

    ---------------------------------------- 
Command "/home/travis/miniconda/envs/test-environment/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-wI1YGd/faulthandler/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-lKAMMU-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-wI1YGd/faulthandler/ 
The command "pip install pytest-faulthandler" failed and exited with 1 during . 
Your build has been stopped. 

Répondre

1

Après une recherche supplémentaire que je trouve this related post, après quoi j'ai remplacé la version miniconda dans .travis.yml-Miniconda2-4.3.21-Linux-x86_64.sh pour Python 2 et Python 3 pour Miniconda3-4.3.21-Linux-x86_64.sh et empêché conda de mettre à jour en commentant - conda update -q conda. Cette fois my environment built correctly for all python versions, problème résolu. Comme indiqué dans la publication liée, cela semble être un bug dans le script d'installation pour Anaconda (et miniconda) 4.3.27, et la solution est d'utiliser une version antérieure (par exemple 4.3.21) et d'empêcher la mise à jour de conda .