summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2019-09-08 10:48:50 -0500
committerGitHub <noreply@github.com>2019-09-08 10:48:50 -0500
commitbff667051b1d23ebd2e8222f7458b980390c1c37 (patch)
tree77e00a78cd18bda6143a394d3322fe1de70a9e3c /var
parent5a21c781f3fb9c190ab43f6f6245bf822db55ef2 (diff)
downloadspack-bff667051b1d23ebd2e8222f7458b980390c1c37.tar.gz
spack-bff667051b1d23ebd2e8222f7458b980390c1c37.tar.bz2
spack-bff667051b1d23ebd2e8222f7458b980390c1c37.tar.xz
spack-bff667051b1d23ebd2e8222f7458b980390c1c37.zip
Fix PyQt installation (#12479)
* Fix PyQt installation * Switch dependency type * Replace SIP dependency with resource * Relax py-pyqt4 Qt dependency
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/py-pyqt4/package.py18
-rw-r--r--var/spack/repos/builtin/packages/py-pyqt5/package.py18
-rw-r--r--var/spack/repos/builtin/packages/py-sip/package.py24
-rw-r--r--var/spack/repos/builtin/packages/qt/package.py2
4 files changed, 47 insertions, 15 deletions
diff --git a/var/spack/repos/builtin/packages/py-pyqt4/package.py b/var/spack/repos/builtin/packages/py-pyqt4/package.py
index 45bb6ac5c3..6554cf78a6 100644
--- a/var/spack/repos/builtin/packages/py-pyqt4/package.py
+++ b/var/spack/repos/builtin/packages/py-pyqt4/package.py
@@ -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'),
+ ]
diff --git a/var/spack/repos/builtin/packages/py-pyqt5/package.py b/var/spack/repos/builtin/packages/py-pyqt5/package.py
index d81eec4733..0ec76b16c9 100644
--- a/var/spack/repos/builtin/packages/py-pyqt5/package.py
+++ b/var/spack/repos/builtin/packages/py-pyqt5/package.py
@@ -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'),
+ ]
diff --git a/var/spack/repos/builtin/packages/py-sip/package.py b/var/spack/repos/builtin/packages/py-sip/package.py
index fc481eabdf..7bb1c24a9c 100644
--- a/var/spack/repos/builtin/packages/py-sip/package.py
+++ b/var/spack/repos/builtin/packages/py-sip/package.py
@@ -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()
diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py
index cd5012b711..158b9b6e3e 100644
--- a/var/spack/repos/builtin/packages/qt/package.py
+++ b/var/spack/repos/builtin/packages/qt/package.py
@@ -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:')