Fix PyQt installation (#12479)
* Fix PyQt installation * Switch dependency type * Replace SIP dependency with resource * Relax py-pyqt4 Qt dependency
This commit is contained in:
@@ -14,18 +14,30 @@ class PyPyqt4(SIPPackage):
|
||||
|
||||
homepage = "https://www.riverbankcomputing.com/software/pyqt/intro"
|
||||
url = "http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.12.3/PyQt4_gpl_x11-4.12.3.tar.gz"
|
||||
import_modules = ['PyQt4']
|
||||
|
||||
sip_module = 'PyQt4.sip'
|
||||
import_modules = [
|
||||
'PyQt4', 'PyQt4.Qt', 'PyQt4.QtCore', 'PyQt4.QtDeclarative',
|
||||
'PyQt4.QtDesigner', 'PyQt4.QtGui', 'PyQt4.QtHelp',
|
||||
'PyQt4.QtMultimedia', 'PyQt4.QtNetwork', 'PyQt4.QtOpenGL',
|
||||
'PyQt4.QtScript', 'PyQt4.QtScriptTools', 'PyQt4.QtSql', 'PyQt4.QtSvg',
|
||||
'PyQt4.QtTest', 'PyQt4.QtWebKit', 'PyQt4.QtXml', 'PyQt4.QtXmlPatterns'
|
||||
]
|
||||
|
||||
version('4.12.3', sha256='a00f5abef240a7b5852b7924fa5fdf5174569525dc076cd368a566619e56d472')
|
||||
version('4.11.3', '997c3e443165a89a559e0d96b061bf70',
|
||||
url='http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.11.3/PyQt-x11-gpl-4.11.3.tar.gz')
|
||||
|
||||
# Supposedly can also be built with Qt 5 compatibility layer
|
||||
depends_on('qt@:4+phonon+dbus')
|
||||
depends_on('qt@:4')
|
||||
|
||||
# https://www.riverbankcomputing.com/static/Docs/PyQt4/installation.html
|
||||
def configure_file(self):
|
||||
return 'configure-ng.py'
|
||||
|
||||
def configure_args(self):
|
||||
return ['--pyuic4-interpreter', self.spec['python'].command.path]
|
||||
return [
|
||||
'--pyuic4-interpreter', self.spec['python'].command.path,
|
||||
'--sipdir', self.prefix.share.sip.PyQt4,
|
||||
'--stubsdir', join_path(site_packages_dir, 'PyQt4'),
|
||||
]
|
||||
|
@@ -14,11 +14,19 @@ class PyPyqt5(SIPPackage):
|
||||
homepage = "https://www.riverbankcomputing.com/software/pyqt/intro"
|
||||
url = "https://www.riverbankcomputing.com/static/Downloads/PyQt5/5.13.0/PyQt5_gpl-5.13.0.tar.gz"
|
||||
list_url = "https://www.riverbankcomputing.com/software/pyqt/download5"
|
||||
import_modules = ['PyQt5']
|
||||
|
||||
sip_module = 'PyQt5.sip'
|
||||
import_modules = [
|
||||
'PyQt5', 'PyQt5.QtCore', 'PyQt5.QtGui', 'PyQt5.QtHelp',
|
||||
'PyQt5.QtMultimedia', 'PyQt5.QtMultimediaWidgets', 'PyQt5.QtNetwork',
|
||||
'PyQt5.QtOpenGL', 'PyQt5.QtPrintSupport', 'PyQt5.QtQml',
|
||||
'PyQt5.QtQuick', 'PyQt5.QtSvg', 'PyQt5.QtTest', 'PyQt5.QtWebChannel',
|
||||
'PyQt5.QtWebSockets', 'PyQt5.QtWidgets', 'PyQt5.QtXml',
|
||||
'PyQt5.QtXmlPatterns'
|
||||
]
|
||||
|
||||
version('5.13.0', sha256='0cdbffe5135926527b61cc3692dd301cd0328dd87eeaf1313e610787c46faff9')
|
||||
|
||||
depends_on('py-sip@4.19.14:')
|
||||
# Without opengl support, I got the following error:
|
||||
# sip: QOpenGLFramebufferObject is undefined
|
||||
depends_on('qt@5:+opengl')
|
||||
@@ -27,4 +35,8 @@ class PyPyqt5(SIPPackage):
|
||||
|
||||
# https://www.riverbankcomputing.com/static/Docs/PyQt5/installation.html
|
||||
def configure_args(self):
|
||||
return ['--pyuic5-interpreter', self.spec['python'].command.path]
|
||||
return [
|
||||
'--pyuic5-interpreter', self.spec['python'].command.path,
|
||||
'--sipdir', self.prefix.share.sip.PyQt5,
|
||||
'--stubsdir', join_path(site_packages_dir, 'PyQt5'),
|
||||
]
|
||||
|
@@ -21,25 +21,33 @@ class PySip(Package):
|
||||
version('4.16.7', '32abc003980599d33ffd789734de4c36')
|
||||
version('4.16.5', '6d01ea966a53e4c7ae5c5e48c40e49e5')
|
||||
|
||||
extends('python')
|
||||
variant('module', default='sip', description='Name of private SIP module',
|
||||
values=str, multi=False)
|
||||
|
||||
# https://www.riverbankcomputing.com/static/Docs/sip/installation.html
|
||||
phases = ['configure', 'build', 'install']
|
||||
extends('python')
|
||||
|
||||
depends_on('flex', type='build', when='@develop')
|
||||
depends_on('bison', type='build', when='@develop')
|
||||
|
||||
# https://www.riverbankcomputing.com/static/Docs/sip/installation.html
|
||||
phases = ['configure', 'build', 'install']
|
||||
|
||||
@run_before('configure')
|
||||
def prepare(self):
|
||||
if self.spec.satisfies('@develop'):
|
||||
python('build.py', 'prepare')
|
||||
|
||||
def configure(self, spec, prefix):
|
||||
python('configure.py',
|
||||
'--bindir={0}'.format(prefix.bin),
|
||||
'--destdir={0}'.format(site_packages_dir),
|
||||
'--incdir={0}'.format(python_include_dir),
|
||||
'--sipdir={0}'.format(prefix.share.sip))
|
||||
args = [
|
||||
'--sip-module={0}'.format(spec.variants['module'].value),
|
||||
'--bindir={0}'.format(prefix.bin),
|
||||
'--destdir={0}'.format(site_packages_dir),
|
||||
'--incdir={0}'.format(python_include_dir),
|
||||
'--sipdir={0}'.format(prefix.share.sip),
|
||||
'--stubsdir={0}'.format(site_packages_dir),
|
||||
]
|
||||
|
||||
python('configure.py', *args)
|
||||
|
||||
def build(self, spec, prefix):
|
||||
make()
|
||||
|
@@ -132,7 +132,7 @@ class Qt(Package):
|
||||
depends_on("libpng@1.2.57", when='@3')
|
||||
depends_on("pcre+multibyte", when='@5.0:5.8')
|
||||
depends_on("inputproto", when='@:5.8')
|
||||
depends_on("openssl@:1.0", when='@:5.9+ssl')
|
||||
depends_on("openssl@:1.0.999", when='@:5.9+ssl')
|
||||
|
||||
depends_on("glib", when='@4:')
|
||||
depends_on("libpng", when='@4:')
|
||||
|
Reference in New Issue
Block a user