1

Here is a part of my code: (setup.py)

args = {
    'name' : 'ModernGL.PyQt5',
    'version' : Version,
    'description' : ShortDescription,
    'long_description' : LongDescription,
    'url' : 'https://github.com/cprogrammer1994/ModernGL.PyQt5',
    'download_url' : 'https://github.com/cprogrammer1994/ModernGL.PyQt5/releases',
    'author' : 'Szabolcs Dombi',
    'author_email' : 'cprogrammer1994@gmail.com',
    'license' : 'MIT',
    'classifiers' : Classifiers,
    'keywords' : Keywords,
    'packages' : [],
    'ext_modules' : [],
    'platforms' : ['any'],
    'install_requires' : ['ModernGL', 'PyQt5']
}

if target == 'windows':
    args['zip_safe'] = True

setup(**args)

If I install manually PyQt5 the setup.py will succeed, otherwise will fail.

Is it possible to add PyQt5 to the dependency list?

Szabolcs Dombi
  • 5,493
  • 3
  • 39
  • 71

2 Answers2

1

Distributions for PyQt5 aren't on PyPi. You would have the same problem with any other python library that doesn't use the python distribution tools. The PyQt5 project doesn't have a setup.py installer. Qt and PyQt are generally installed via OS package managers or installation executables distributed by the software vendors that produce those libraries.

You can include PyQt5 in the requirements, but your users are still going to need to install PyQt5 using a separate installer. pip and setuptools won't be able to resolve and install it.

Brendan Abel
  • 35,343
  • 14
  • 88
  • 118
1

Possible to install with pip install pyqt5 but impossible to require from setup.py because there is no source distribution on PyPI and setuptools does not know how to install wheels. See my answer.

mdeff
  • 1,566
  • 17
  • 21