Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modify logic in QScintilla easyblock to find the PyQt5 sipdir in more places #2868

Merged

Conversation

mboisson
Copy link
Contributor

When installing PyQt5 5.15.5 as an extension of Qt5 5.15.8, two things happen

  1. The current qscintilla.py at line https://github.com/easybuilders/easybuild-easyblocks/blob/develop/easybuild/easyblocks/q/qscintilla.py#L127 tests get_software_version('PyQt5'), which returns None, since PyQt5 is it is part of Qt5, not PyQt5 module (see support for this at https://github.com/easybuilders/easybuild-easyblocks/blob/develop/easybuild/easyblocks/q/qscintilla.py#L60)

  2. Our SIP files are not in the locations that are tested, i.e. previously, we had:

$ find /cvmfs/soft.computecanada.ca/easybuild/software/2020/avx2/Core/qt/5.12.8/ -name 'qgraphicssceneevent.sip'
/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx2/Core/qt/5.12.8/share/python3.6/site-packages/sip/PyQt5/QtWidgets/qgraphicssceneevent.sip
/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx2/Core/qt/5.12.8/share/python3.7/site-packages/sip/PyQt5/QtWidgets/qgraphicssceneevent.sip
/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx2/Core/qt/5.12.8/share/python3.8/site-packages/sip/PyQt5/QtWidgets/qgraphicssceneevent.sip
/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx2/Core/qt/5.12.8/share/python3.9/site-packages/sip/PyQt5/QtWidgets/qgraphicssceneevent.sip
/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx2/Core/qt/5.12.8/share/python2.7/site-packages/sip/PyQt5/QtWidgets/qgraphicssceneevent.sip

now we have:

$ find /cvmfs/soft.computecanada.ca/easybuild/software/2020/avx2/Core/qt/5.15.8/ -name 'qgraphicssceneevent.sip'
/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx2/Core/qt/5.15.8/lib/python3.8/site-packages/PyQt5/bindings/QtWidgets/qgraphicssceneevent.sip
/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx2/Core/qt/5.15.8/lib/python3.9/site-packages/PyQt5/bindings/QtWidgets/qgraphicssceneevent.sip
/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx2/Core/qt/5.15.8/lib/python3.10/site-packages/PyQt5/bindings/QtWidgets/qgraphicssceneevent.sip

This PR avoids using get_software_version('PyQt5') altogether, and instead tests various possible location of PyQt5 sip dir, and picks the first one that matches.

Copy link
Contributor

@Micket Micket left a comment

Choose a reason for hiding this comment

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

Apart from the typo, looks good i think. But you won't have pyqt_root as well right? Since you don't have PyQt5 as an extension.

easybuild/easyblocks/q/qscintilla.py Outdated Show resolved Hide resolved
easybuild/easyblocks/q/qscintilla.py Outdated Show resolved Hide resolved
@mboisson
Copy link
Contributor Author

mboisson commented Jan 26, 2023

Apart from the typo, looks good i think. But you won't have pyqt_root as well right? Since you don't have PyQt5 as an extension.

yes, that's done here
https://github.com/easybuilders/easybuild-easyblocks/blob/develop/easybuild/easyblocks/q/qscintilla.py#L60

@boegel boegel added this to the next release (4.7.1?) milestone Feb 1, 2023
Copy link
Contributor

@Micket Micket left a comment

Choose a reason for hiding this comment

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

lgtm (i need to find time to make a test build)

@boegel boegel changed the title modified the logic to find the PyQt5 sipdir in more places modify logic in QScintilla easyblock to find the PyQt5 sipdir in more places Feb 15, 2023
@boegel
Copy link
Member

boegel commented Mar 1, 2023

Test report by @boegel

Overview of tested easyconfigs (in order)

  • SUCCESS QScintilla-2.11.6-GCCcore-11.2.0.eb

Build succeeded for 1 out of 1 (1 easyconfigs in total)
node3104.skitty.os - Linux RHEL 8.6, x86_64, Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz (skylake_avx512), Python 3.6.8
See https://gist.github.com/606cc6b852159f0d9f567b980b5fd0a0 for a full test report.

@boegel boegel merged commit 8ccf198 into easybuilders:develop Mar 1, 2023
@mboisson mboisson deleted the qscintilla_pyqt5_sip_detection branch March 1, 2023 21:23
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.

3 participants