python-3.xcontinuous-integrationappveyorpython-sip

No local packages or working download links found for SIP, in the Appveyor Windows Containers, when testing python 3.5


For continuous integrations, we test our scripts for Windows OS with appveyor, as usual after each push in GitHub. The tests are launched for python 3.5, 3.6 and 3.7. For 3.6 and 3.7 all is working fine. For 3.5, the test falls due to no SIP package found:

searching for SIP
Reading https://pypi.python.org/simple/SIP/
No local packages or working download links found for SIP
error: Could not find suitable distribution for Requirement.parse('SIP')
Command exited with code 1

It is strange because:


Solution

  • It seems that the issues comes from a difference in processing between the pip install ... command and the setup (install_requires=...) method used with the python setup.py install command.

    Since I edited the appveyor.yml file to install all the necessaries packages with pip just before the python setup.py install installation command, it is working fine.

    It's quick and dirty (I am sure that it is possible to do more elegant and skilled by configuring better), but it works!

    The setup.py file.

    The info.py file.

    The former appveyor.yml file.

    The new appveyor.yml file.

    EDIT: May be quicker and cleaner. Starting from the difference observed beetween pip and setuptools I observed that the build started with a very old setuptools version:

    pip list
    Package    Version
    ---------- -------
    pip        19.1   
    setuptools 28.8.0 
    virtualenv 15.0.1 
    

    So I just made an update of setuptools:

    pip install --upgrade -vv setuptools
    

    and now all is working fine, without adding twice the requested repositories in install_requires.

    The former appveyor.yml file.

    The new appveyor.yml file.