FS#75730 - [freecad] missing optional dependency python-pyqt5-webengine

Attached to Project: Community Packages
Opened by Taha Abbasi-Hashemi (TahaAbbasiHashemi) - Monday, 29 August 2022, 15:01 GMT
Last edited by Alexander F. Rødseth (xyproto) - Wednesday, 31 August 2022, 14:35 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Alexander F. Rødseth (xyproto)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
python-pyqt5-webengine should be included as an optional dependency.

Steps to reproduce:
To produce bug. Do not have extra/python-pyqt5-webengine installed, and open freecad. In the freecad console this warning should show up. "Addon Manager Warning: Could not import QtWebEngineWidgets, it seems to be missing from your system. Please use your system's package manager to install the python3-pyside2.qtwebengine* and python3-pyside2.qtwebchannel packages, and if possible alert your package creator to the missing dependency. Display of package README will be limited until this dependency is resolved."

Steps to resolve:
Install extra/python-pyqt5-webengine and open freecad. No message will show up.
This task depends upon

Closed by  Alexander F. Rødseth (xyproto)
Wednesday, 31 August 2022, 14:35 GMT
Reason for closing:  Fixed
Comment by Taha Abbasi-Hashemi (TahaAbbasiHashemi) - Monday, 29 August 2022, 15:04 GMT
This is the new pkgbuild required. I just added this line "'python-pyqt5-webengine: webengine support'". I havent run this but I believe this is all that is needed to solve the problem.


# Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
# Contributor: loqs <bugs-archlinux@entropy-collector.net>
# Contributor: Gabriel Souza Franco <gabrielfrancosouza@gmail.com>
# Contributor: Florian Pritz
# Contributor: Jonas Heinrich <onny@project-insanity.org>
# Contributor: Jordi De Groof <jordi.degroof@gmail.com>
# Contributor: mickele
# Contributor: manwithgrenade
# Contributor: bricem13
# Contributor: gborzi
# Contributor: Adrian Insaurralde

pkgname=freecad
pkgver=0.20.1
pkgrel=3
pkgdesc='Feature based parametric 3D CAD modeler'
arch=(x86_64)
url='https://freecadweb.org/'
license=(LGPL)
depends=(boost-libs fmt glew jsoncpp libspnav med-openmpi netcdf opencascade
openmpi pyside2 pyside2-tools python-gitpython python-matplotlib
python-pivy python-ply pugixml qt5-svg qt5-tools qt5-webkit
qt5-x11extras qt5-xmlpatterns xerces-c)
makedepends=(boost cgns cli11 cmake coin eigen gcc-fortran git jdk-openjdk
libharu liblas ninja openmpi openvdb openvr ospray pdal
postgresql-libs python-mpi4py python-shiboken2 shiboken2 swig
utf8cpp)
optdepends=('graphviz: dependency graph support'
'openscad: OpenSCAD support'
'python-pyqt5-webengine: webengine support'
'python-markdown: Markdown support in addon manager'
'python-gitpython: support downloading addons with git')
source=("git+https://github.com/$pkgname/$pkgname#commit=7f23e793eb136def6aee0f0ce8131bbbb6cd21e6") # tag: 0.20.1
b2sums=(SKIP)

build() {
cmake \
-B build \
-D BUILD_ENABLE_CXX_STD=C++17 \
-D BUILD_FLAT_MESH=ON \
-D BUILD_QT5=ON \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_C_FLAGS="$CFLAGS -fPIC -w" \
-D CMAKE_CXX_FLAGS="$CXXFLAGS -fPIC -w" \
-D CMAKE_INSTALL_BINDIR=/usr/lib/freecad/bin \
-D CMAKE_INSTALL_DATADIR=/usr/share/freecad \
-D CMAKE_INSTALL_DATAROOTDIR=/usr/share \
-D CMAKE_INSTALL_DOCDIR=/usr/share/freecad/doc \
-D CMAKE_INSTALL_LIBDIR=/usr/lib/freecad/lib \
-D CMAKE_INSTALL_PREFIX=/usr/lib/freecad \
-D FREECAD_USE_EXTERNAL_PIVY=ON \
-D FREECAD_USE_OCC_VARIANT='Official Version' \
-D FREECAD_USE_QT_FILEDIALOG=ON \
-D PYTHON_EXECUTABLE=/usr/bin/python \
-D INSTALL_TO_SITEPACKAGES=ON \
-G Ninja \
-S $pkgname
ninja -C build
}

package() {
DESTDIR="$pkgdir" ninja -C build install

# Thumbnailer
install -Dm755 $pkgname/src/Tools/$pkgname-thumbnailer -t "$pkgdir/usr/bin/"

# Symlinks in /usr/bin
install -d "$pkgdir/usr/bin"
ln -sf /usr/lib/freecad/bin/FreeCAD "$pkgdir/usr/bin/freecad"
ln -sf /usr/lib/freecad/bin/FreeCAD "$pkgdir/usr/bin/FreeCAD"
ln -sf /usr/lib/freecad/bin/FreeCADCmd "$pkgdir/usr/bin/freecadcmd"
ln -sf /usr/lib/freecad/bin/FreeCADCmd "$pkgdir/usr/bin/FreeCADCmd"
}
Comment by Adrian Insaurralde (adrianinsaval) - Monday, 29 August 2022, 22:32 GMT
No, freecad doesn't use pyqt5, it uses pyside. The actually required dependency is qt5-webengine, it just gets installed when you install python-pyqt5-webengine.
I thought I had notified of this new dependency when I made my PKGBUILD proposal for 0.20 but it seems it wasn't added and I didn't notice.
Comment by Alexander F. Rødseth (xyproto) - Tuesday, 30 August 2022, 07:23 GMT
Thanks for reporting and for the comment. I can add "python-pyqt5-webengine" as an optional dependency, no problem.

But, I'm trying to reproduce the issue first, and after removing "python-pyqt5-webengine", I can not spot any error or warning in the FreeCAD python console.

Is there another console within FreeCAD that is not the Python console? What are the steps to reproduce the issue?
Comment by Adrian Insaurralde (adrianinsaval) - Tuesday, 30 August 2022, 14:19 GMT
Like I said FreeCAD doesn't use pyqt5, the real dependency is qt5-webengine, which is also a dependency of python-pyqt5-webengine, this is why installing that package solves the issue for OP.

If qt5-webengine is not present the error should be shown in the report view when opening the addon manager, I can confirm that with qt5-webengine installed and *without* python-pyqt5-webengine the error is *not* shown.
Comment by Alexander F. Rødseth (xyproto) - Tuesday, 30 August 2022, 21:13 GMT
I'll add it as a dependency.

Loading...