<div dir="ltr"><div>Hi Tim,<br></div><div><br></div><div>The reason setuptools can't process your package is because setuptools itself doesn't yet know how to install wheels[1] which pip knows how to install, and PyQT5 is only available as wheels on PyPI  (the files with `.whl` extension in the `simple` URL you linked).</div><div><br></div><div>[1] <a href="https://github.com/pypa/setuptools/issues/78">https://github.com/pypa/setuptools/issues/78</a><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">The reason why setuptools can install "requests" or "simplejson" is that their pages contain `.tar.gz` files with the source distributions beside the `.whl` files.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Incidentally, there are PyQT5 source distributions, and they're available in their own website[2].</div><div class="gmail_extra"><br></div><div class="gmail_extra">IMO they should be present in PyPI as well.</div><div class="gmail_extra"><br></div><div class="gmail_extra">(Though those archive names with `_gpl` in the middle might confuse setuptools, and they might prefer to deal with "Could not find suitable distribution" error message than some obscure compilation error arising from missing system packages).</div><div class="gmail_extra"><br></div><div class="gmail_extra">[2] <a href="https://www.riverbankcomputing.com/software/pyqt/download5/">https://www.riverbankcomputing.com/software/pyqt/download5/</a></div><div class="gmail_extra"><br></div><div class="gmail_extra">Cheers,</div><div class="gmail_extra"><br></div><div class="gmail_extra">Leo</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_quote">On 7 March 2017 at 11:24, Tim Golden <span dir="ltr"><<a href="mailto:mail@timgolden.me.uk" target="_blank">mail@timgolden.me.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I have a setup.py which looks like this:<br>
<br>
from setuptools import setup<br>
setup(<br>
    name='install_requires',<br>
    py_modules = ["install_requires"],<br>
    install_requires=['PyQt5'],<br>
)<br>
<br>
For the purposes of the discussion, there is an install_requires.py in the same directory.<br>
<br>
I have created and activated a standard Python 3.5 venv on Windows:<br>
<br>
py -3.5 -mvenv .venv<br>
.venv\scripts\activate.bat<br>
python -mpip install --upgrade pip<br>
<br>
(I don't believe the Python version or the venv matter here, but including them for reproducibility).<br>
<br>
If I pip install the module, the PyQt5 install dependency is found and installed:<br>
<br>
(.venv) C:\work-in-progress\install_re<wbr>quires>pip install .<br>
Processing c:\work-in-progress\install_re<wbr>quires<br>
Collecting PyQt5 (from install-requires==0.0.0)<br>
  Using cached PyQt5-5.8.1-5.8.0-cp35.cp36.cp<wbr>37-none-win_amd64.whl<br>
Collecting sip==4.19 (from PyQt5->install-requires==0.0.0<wbr>)<br>
  Using cached sip-4.19-cp35-none-win_amd64.w<wbr>hl<br>
Installing collected packages: sip, PyQt5, install-requires<br>
  Running setup.py install for install-requires ... done<br>
Successfully installed PyQt5-5.8.1 install-requires-0.0.0 sip-4.19<br>
<br>
If, instead, I setup.py install the module, I get the following messages:<br>
<br>
Processing dependencies for install-requires==0.0.0<br>
Searching for PyQt5<br>
Reading <a href="https://pypi.python.org/simple/PyQt5/" rel="noreferrer" target="_blank">https://pypi.python.org/simple<wbr>/PyQt5/</a><br>
No local packages or download links found for PyQt5<br>
error: Could not find suitable distribution for Requirement.parse('PyQt5')<br>
<br>
However, if I substitute instead "requests" or "simplejson" (both well-known packages) then setup.py install succeeds. My cursory inspection of <a href="https://pypi.python.org/simple/pyqt5/" rel="noreferrer" target="_blank">https://pypi.python.org/simple<wbr>/pyqt5/</a> doesn't reveal anything obviously different except for the complexity of the filenames.<br>
<br>
I've searched around, including in the archives of this group, but can't find that this is a known issue. If I had to guess from the evidence, it would be that pip ships a more sophisticated parser of complex wheel filenames than setuptools.<br>
<br>
Can anyone advise, please?<br>
<br>
TJG<br>
<br>
______________________________<wbr>_________________<br>
Distutils-SIG maillist  -  <a href="mailto:Distutils-SIG@python.org" target="_blank">Distutils-SIG@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/distutils-sig" rel="noreferrer" target="_blank">https://mail.python.org/mailma<wbr>n/listinfo/distutils-sig</a><br>
</blockquote></div><br></div></div>