Skip to content

py-pyqt6: add new package#32696

Merged
adamjstewart merged 33 commits intospack:developfrom
adamjstewart:packages/py-pyqt6
Aug 4, 2023
Merged

py-pyqt6: add new package#32696
adamjstewart merged 33 commits intospack:developfrom
adamjstewart:packages/py-pyqt6

Conversation

@adamjstewart
Copy link
Copy Markdown
Member

@adamjstewart adamjstewart commented Sep 17, 2022

This PR includes the following changes:

  • Modernize SIPPackage and SIPBuilder
  • Get py-pyqt4 to build
  • Get py-pyqt5 to build
  • Get py-pyqt6 to build
  • Test py-matplotlib
  • Update SIPPackage documentation

Closes #29039 and #21554

@spackbot-app
Copy link
Copy Markdown

spackbot-app bot commented Sep 17, 2022

Hi @adamjstewart! I noticed that the following package(s) don't yet have maintainers:

  • py-pyqt4
  • py-pyqt5
  • py-pyqt6

Are you interested in adopting any of these package(s)? If so, simply add the following to the package class:

    maintainers = ['adamjstewart']

If not, could you contact the developers of this package and see if they are interested? You can quickly see who has worked on a package with spack blame:

$ spack blame py-pyqt4

Thank you for your help! Please don't add maintainers without their consent.

You don't have to be a Spack expert or package developer in order to be a "maintainer," it just gives us a list of users willing to review PRs or debug issues relating to this package. A package can have multiple maintainers; just add a list of GitHub handles of anyone who wants to volunteer.

Sinan81
Sinan81 previously approved these changes Sep 21, 2022
Copy link
Copy Markdown
Contributor

@Sinan81 Sinan81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Approved.

@spackbot-app spackbot-app bot added build-systems core PR affects Spack core functionality documentation Improvements or additions to documentation new-variant labels Nov 21, 2022
@adamjstewart
Copy link
Copy Markdown
Member Author

Update: this PR is somewhat blocked by my ability to test it. I'll be moving to an older laptop soon, so the Qt installation should hopefully work. I'm hoping to get back to this then. Once I can build multiple versions of Qt, it will be much easier to test whether or not the hacks I've removed here are needed or not.

@Sinan81
Copy link
Copy Markdown
Contributor

Sinan81 commented Dec 9, 2022

I'll see if I can do some testing myself.

@Sinan81
Copy link
Copy Markdown
Contributor

Sinan81 commented Dec 9, 2022

I've just tried installing qgis in this branch, where qscintilla installation fails:

 >> 334    configure.py: error: '.../py-sip-6.6.2-5moeuknve3jqp5e74emtmz6ie5olycl6/bin/sip' is not an executable

which is expected I guess.

@Sinan81
Copy link
Copy Markdown
Contributor

Sinan81 commented Dec 9, 2022

Also, tried installing py-pyqt6, which failed since qt-base-6.3.2 failed to build.

@Sinan81
Copy link
Copy Markdown
Contributor

Sinan81 commented Dec 9, 2022

Also, tried installing py-pyqt6, which failed since qt-base-6.3.2 failed to build.

qt-base build might have failed since I was using gcc@7 as opposed to newer.

@Sinan81
Copy link
Copy Markdown
Contributor

Sinan81 commented Dec 9, 2022

created an issue for it: #34418

@adamjstewart
Copy link
Copy Markdown
Member Author

@Sinan81 @manuelakuhn I believe this PR is once again ready for review.

Note that testing does not work at the moment: #38793

Recent versions of pyqt5 and pyqt6 no longer use the old configure.py build script and instead use sip-build. As such, I haven't figured out a way to build +qsci_api. This PR likely breaks packages that depend on pyqt5, but those packages are likely already broken on develop anyway.

This PR was basically done 6 months ago but was held up due to trying to get every dependent package to build correctly. I'm not going to make the same mistake this time. If anyone can prove that something that works on develop no longer works on this branch I can try to fix it, but I'm not going to try to get everything to build properly because it's a never ending endeavor.

@manuelakuhn
Copy link
Copy Markdown
Member

Unfortunately, when trying to build some of the packages I encountered some issues:

These packages install and test fine:

As you already said for the py-pyqt packages the tests don't work, other than that [email protected] and [email protected] install fine, but unfortunately the other py-pyqt5 packages fail to build:

==> py-pyqt5: Executing phase: 'configure'
==> [2023-07-09-23:12:53.786375] '$spack/opt/spack/linux-fedora37-x86_64/gcc-12.3.1/py-sip-6.7.9-jtdzyhij4ngzsvhe53dny4w4vdz77gdh/bin/sip-build' '--verbose' '--target-dir' '$spack/opt/spack/linux-fedora37-x86_64/gcc-12.3.1/py-pyqt5-5.13.1-anxt3l3kuyz2jhli3w4pxrmtlbjp2s5m/lib/python3.10/site-packages' '--confirm-license' '--no-make' '--qmake' '$spack/opt/spack/linux-fedora37-x86_64/gcc-12.3.1/qt-5.15.10-uum2qg6ix5nvo6nbenx2lpzcjoppxivv/bin/qmake'
sip-build: 'confirm_license' option has an invalid tools 'b'
==> py-pyqt5: Executing phase: 'configure'
==> [2023-07-09-23:14:51.408828] '$spack/opt/spack/linux-fedora37-x86_64/gcc-12.3.1/py-sip-6.7.9-jtdzyhij4ngzsvhe53dny4w4vdz77gdh/bin/sip-build' '--verbose' '--target-dir' '$spack/opt/spack/linux-fedora37-x86_64/gcc-12.3.1/py-pyqt5-5.13.0-tjtl7jy4ftngpxypzwkerpbc3ua4vrrq/lib/python3.10/site-packages' '--confirm-license' '--no-make' '--qmake' '$spack/opt/spack/linux-fedora37-x86_64/gcc-12.3.1/qt-5.15.10-uum2qg6ix5nvo6nbenx2lpzcjoppxivv/bin/qmake'
usage: sip-build [-h] [-V] [--quiet] [--verbose] [--build-dir DIR]
                 [--scripts-dir DIR] [--target-dir DIR] [--api-dir DIR]
                 [--no-compile] [--no-version-info] [--concatenate N]
                 [--debug] [--disabled-feature TAG] [--no-docstrings]
                 [--pep484-pyi] [--protected-is-public]
                 [--no-protected-is-public] [--tracing]
sip-build: error: unrecognized arguments: --confirm-license --no-make --qmake $spack/opt/spack/linux-fedora37-x86_64/gcc-12.3.1/qt-5.15.10-uum2qg6ix5nvo6nbenx2lpzcjoppxivv/bin/qmake

py-pyqt6 does not install for me because qt-base does not build with the error:

ERROR: The OpenGL functionality tests failed! You might need to modify the OpenGL package search path by setting the OpenGL_DIR CMake variable to the OpenGL library's installation directory.

(same happens when I build qt-base on its own)

A workaround is to install py-pyqt6 ^qt-base+opengl, then it installs fine (only the tests fail, same as py-pyqt4 and 5)

As for ggis, I could not test it because it depend on qscintilla+python which does not build with the error:

Usage: python configure.py [options]

configure.py: error: '$spack/opt/spack/linux-fedora37-x86_64/gcc-12.3.1/py-sip-6.7.9-jtdzyhij4ngzsvhe53dny4w4vdz77gdh/bin/sip' is not an executable

@adamjstewart
Copy link
Copy Markdown
Member Author

unfortunately the other py-pyqt5 packages fail to build

Deprecated, don't care. These older versions can't even be downloaded anymore other than from cache.

qt-base does not build

Maybe @wdconinc @sethrj can help with this one.

qscintilla+python which does not build

Maybe try an older version of sip? Also don't care about this one.

@wdconinc
Copy link
Copy Markdown
Contributor

wdconinc commented Jul 9, 2023

qt-base does not build

Maybe @wdconinc @sethrj can help with this one.

Probably best to file a separate issue on that with more info (system etc). I don't have a macos to test things on, but this is fedora37 with gcc-12.3 and there's no issue reported yet for that.

@adamjstewart
Copy link
Copy Markdown
Member Author

qscintilla+python which does not build

Okay, I confirmed that this builds on develop and doesn't build on my branch so I'm going to reluctantly dig into this and see if I can get it working. FWIW, qgis doesn't build for me on develop either, so I'll leave that one to someone else.

@Sinan81
Copy link
Copy Markdown
Contributor

Sinan81 commented Jul 12, 2023

FWIW, qgis doesn't build for me on develop either, so I'll leave that one to someone else.

Is this due pyqt stuff, or something else? I'll take a look at this today or so.

@adamjstewart
Copy link
Copy Markdown
Member Author

Not sure. I would wait until after this PR is merged because everything is going to change. I started working on qscintilla but that might need the qmake vdep PR if I want to test it on my laptop. Might just stick to Qt 5 so this PR isn't held up though.

@Sinan81
Copy link
Copy Markdown
Contributor

Sinan81 commented Jul 19, 2023

in develop branch [email protected] fails to build due to a sip related issue. [email protected] ^[email protected] builds about 70% giving a sip/python related error. I'll wait until after this PR is merged. (P.S: [email protected] builds fine in [email protected] with [email protected] and [email protected])

@adamjstewart
Copy link
Copy Markdown
Member Author

I'm probably not going to be able to get back to this for at least another week or two. If someone wants to hack on QScintilla (or just merge this and hack on that later) then be my guest.

@Sinan81
Copy link
Copy Markdown
Contributor

Sinan81 commented Jul 24, 2023

Made good progress on Qscintilla by combining a hint from linuxbrew recipe with RPM spec file for Fedora:
https://src.fedoraproject.org/rpms/qscintilla/blob/rawhide/f/qscintilla.spec
One weird issue I'm having with is that:

self.spec['py-pyqt6'].prefix

statement returns prefix for qscintilla package itself as opposed to py-pyqt6 package. Apart from this, the setup works fine, qscintilla+python builds with qt6 & py-pyqt6.
I'll create a branch for this soon and share here.

@Sinan81
Copy link
Copy Markdown
Contributor

Sinan81 commented Jul 24, 2023

@adamjstewart please see this branch that's based on your pyqt6 branch:
https://github.com/Sinan81/spack/tree/ajs_pyqt6_build_qscintilla
modified files are:
qscintilla package file and lib/spack/spack/build_systems/qmake.py

@adamjstewart
Copy link
Copy Markdown
Member Author

Thanks, I'll take a look once things settle down for me. Moving apartments and graduating and such.

@adamjstewart
Copy link
Copy Markdown
Member Author

@Sinan81 your latest commit fails with:

./SciAccessibility.h:31:10: fatal error: 'QAccessibleWidget' file not found

@Sinan81
Copy link
Copy Markdown
Contributor

Sinan81 commented Aug 2, 2023

@Sinan81 your latest commit fails with:

I'll look into it this by end of today.. Could this be due to self.spec['py-pyqt6... issue I discussed above. Have you tried hard coding sip_inc_dir? Which version of qscintilla did you try to install? I was using version 2.13.3 where I reported the successful build.

@adamjstewart
Copy link
Copy Markdown
Member Author

I just tried the default version. I'm busy for the rest of the week but I could maybe hack on this next week. Otherwise, maybe just merge this and fix qscintilla later.

@Sinan81
Copy link
Copy Markdown
Contributor

Sinan81 commented Aug 4, 2023

Yes. I think we can simply merge this. I am sure we can sort out qscintilla thing by end of next week at the latest.

@Sinan81
Copy link
Copy Markdown
Contributor

Sinan81 commented Aug 4, 2023

Please merge!

@adamjstewart adamjstewart merged commit 4eed832 into spack:develop Aug 4, 2023
@adamjstewart adamjstewart deleted the packages/py-pyqt6 branch August 4, 2023 23:49
mpokorny pushed a commit to mpokorny/spack that referenced this pull request Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants