py-qtpy: enable use with pyqt5, pyside and pyside2 (#13837)

This commit is contained in:
iarspider 2019-11-25 16:14:57 +01:00 committed by Massimiliano Culpo
parent 0cb5460a52
commit 53c2b618da

View File

@ -7,12 +7,22 @@
class PyQtpy(PythonPackage):
"""QtPy: Abtraction layer for PyQt5/PyQt4/PySide"""
"""QtPy: Abtraction layer for PyQt5/PyQt4/PySide/PySide2"""
homepage = "https://github.com/spyder-ide/qtpy"
url = "https://pypi.io/packages/source/Q/QtPy/QtPy-1.2.1.tar.gz"
version('1.7.1', sha256='e97275750934b3a1f4d8e263f5b889ae817ed36f26867ab0ce52be731ab1ed9e')
version('1.2.1', sha256='5803ce31f50b24295e8e600b76cc91d7f2a3140a5a0d526d40226f9ec5e9097d')
apis = ['pyqt5', 'pyqt4', 'pyside2', 'pyside']
variant('api', default='pyqt5', description='Default QT API',
values=apis, multi=False)
depends_on('py-setuptools', type='build')
depends_on('py-pyqt4', type=('build', 'run'))
for api in apis:
depends_on('py-' + api, when='+' + api, type='run')
def setup_run_environment(self, env):
env.set('QT_API', self.spec.variants['api'].value)