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

qtgui build scripts require python 2 #431

Closed
drew-parsons opened this issue Oct 27, 2019 · 3 comments
Closed

qtgui build scripts require python 2 #431

drew-parsons opened this issue Oct 27, 2019 · 3 comments

Comments

@drew-parsons
Copy link
Contributor

  • Avogadrolibs: 1.92.1

  • Qt: 5.12.5 (Debian 5.12.5+dfsg-2)

  • OS: Debian unstable

  • Version Linux 5.3.7-1

  • Compiler g++ 9.2.1-14

Build scripts for the qtgui component require Python 2, find_package(PythonInterp 2) in

  • avogadro/qtgui/CMakeLists.txt
  • tests/qtgui/CMakeLists.txt

Python 2 is deprecated, will be no longer supported from 1 Jan 2020, so needs to be replaced with Python 3.

More problematically for avogadrolibs, the python module is supposed to be built with cmake -DUSE_PYTHON=ON. But python/CMakeLists.txt does require Python 3: find_package(PythonInterp 3 REQUIRED)

So there is a contradiction in the build. python2 is found for qtgui, and those python2 values found for PythonInterp are reused for the python build, which consequently fails since it needs python3:

-- Found GLEW: /usr/include
-- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.17", minimum required is "2")
-- Found LIBARCHIVE: /usr/include
CMake Error at /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find PythonInterp: Found unsuitable version "2.7.17", but
  required is at least "3" (found /usr/bin/python2)
Call Stack (most recent call first):
  /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:376 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.13/Modules/FindPythonInterp.cmake:159 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  python/CMakeLists.txt:1 (find_package)


-- Configuring incomplete, errors occurred!

The qtgui scripts need to be updated for Python3.

@welcome
Copy link

welcome bot commented Oct 27, 2019

Thanks for opening your first issue here! Please try to include example files and screenshots if possible. If you're looking for support, please post on our forum: https://discuss.avogadro.cc/

ghutchis added a commit to ghutchis/avogadrolibs that referenced this issue Apr 27, 2020
Thanks to Drew Parsons for the bug report

Signed-off-by: Geoff Hutchison <geoff.hutchison@gmail.com>
@ghutchis
Copy link
Member

Sorry, I'm just getting to this now, because we're aiming for a 1.94 release. This should be fixed by #462

ghutchis added a commit that referenced this issue Apr 28, 2020
Switch all references to Py2 to 3, fixing #431
@ghutchis
Copy link
Member

I'm marking this closed - thanks for the detailed report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants