2021-10-06 15:24:27 +02:00
|
|
|
#
|
|
|
|
# spec file for package python3-pyside6
|
|
|
|
#
|
2022-04-19 14:13:03 +02:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2021-10-06 15:24:27 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2023-04-09 00:10:20 +02:00
|
|
|
%define tar_name pyside-setup-everywhere-src
|
|
|
|
%define short_version 6.5
|
2021-10-06 15:24:27 +02:00
|
|
|
#
|
|
|
|
%if "@BUILD_FLAVOR@%{nil}" == "shiboken6"
|
|
|
|
%global pyside_flavor shiboken6
|
|
|
|
%else
|
|
|
|
%global pyside_flavor pyside6
|
|
|
|
%endif
|
|
|
|
#
|
|
|
|
Name: python3-%{pyside_flavor}
|
2023-07-27 14:15:57 +02:00
|
|
|
Version: 6.5.2
|
2021-10-06 15:24:27 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Python bindings for Qt 6
|
|
|
|
License: LGPL-3.0-only OR (GPL-2.0-only OR GPL-3.0-or-later) AND GPL-2.0-only AND GPL-3.0-only WITH Qt-GPL-exception-1.0
|
|
|
|
URL: https://www.qt.io
|
|
|
|
Source: https://download.qt.io/official_releases/QtForPython/pyside6/PySide6-%{version}-src/%{tar_name}-%{version}.tar.xz
|
|
|
|
# PATCH-FIX-OPENSUSE
|
2023-04-09 00:10:20 +02:00
|
|
|
Patch0: 0001-Always-link-to-python-libraries.patch
|
2021-10-06 15:24:27 +02:00
|
|
|
# SECTION common_dependencies
|
2023-06-01 08:50:26 +02:00
|
|
|
BuildRequires: clang-devel
|
2021-10-06 15:24:27 +02:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: pkgconfig
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
BuildRequires: python3-Sphinx
|
2022-10-19 07:49:26 +02:00
|
|
|
BuildRequires: python3-devel >= 3.7
|
2021-10-06 15:24:27 +02:00
|
|
|
BuildRequires: python3-numpy-devel
|
|
|
|
BuildRequires: qt6-macros
|
|
|
|
BuildRequires: cmake(Qt6Core)
|
|
|
|
BuildRequires: cmake(Qt6Test)
|
|
|
|
BuildRequires: cmake(Qt6Xml)
|
|
|
|
BuildRequires: pkgconfig(libxml-2.0)
|
|
|
|
BuildRequires: pkgconfig(libxslt)
|
|
|
|
# /SECTION
|
|
|
|
%if "%{pyside_flavor}" == "pyside6"
|
2022-12-06 08:16:10 +01:00
|
|
|
# For the registry_existence test
|
|
|
|
BuildRequires: python3-distro
|
2022-10-19 07:49:26 +02:00
|
|
|
BuildRequires: cmake(Shiboken6) = %{version}
|
2021-10-06 15:24:27 +02:00
|
|
|
# SECTION test_dependencies
|
|
|
|
BuildRequires: Mesa-dri
|
|
|
|
BuildRequires: qt6-location
|
|
|
|
BuildRequires: qt6-sql-sqlite
|
|
|
|
BuildRequires: xvfb-run
|
|
|
|
# /SECTION
|
|
|
|
# SECTION essential_modules
|
|
|
|
BuildRequires: cmake(Qt6Concurrent)
|
|
|
|
BuildRequires: cmake(Qt6Gui)
|
|
|
|
BuildRequires: cmake(Qt6Network)
|
|
|
|
BuildRequires: cmake(Qt6PrintSupport)
|
|
|
|
BuildRequires: cmake(Qt6Sql)
|
|
|
|
BuildRequires: cmake(Qt6Widgets)
|
|
|
|
# /SECTION
|
|
|
|
# SECTION optional_modules
|
|
|
|
BuildRequires: qt6-qml-private-devel
|
|
|
|
BuildRequires: cmake(Qt63DAnimation)
|
|
|
|
BuildRequires: cmake(Qt63DCore)
|
|
|
|
BuildRequires: cmake(Qt63DExtras)
|
|
|
|
BuildRequires: cmake(Qt63DInput)
|
|
|
|
BuildRequires: cmake(Qt63DLogic)
|
|
|
|
BuildRequires: cmake(Qt63DRender)
|
|
|
|
BuildRequires: cmake(Qt6Bluetooth)
|
|
|
|
BuildRequires: cmake(Qt6Charts)
|
|
|
|
BuildRequires: cmake(Qt6DBus)
|
|
|
|
BuildRequires: cmake(Qt6DataVisualization)
|
|
|
|
BuildRequires: cmake(Qt6Designer)
|
|
|
|
BuildRequires: cmake(Qt6Help)
|
2022-10-19 07:49:26 +02:00
|
|
|
BuildRequires: cmake(Qt6HttpServer)
|
2023-04-09 00:10:20 +02:00
|
|
|
BuildRequires: cmake(Qt6Location)
|
2021-10-06 15:24:27 +02:00
|
|
|
BuildRequires: cmake(Qt6Multimedia)
|
|
|
|
BuildRequires: cmake(Qt6MultimediaWidgets)
|
|
|
|
BuildRequires: cmake(Qt6NetworkAuth)
|
|
|
|
BuildRequires: cmake(Qt6OpenGL)
|
|
|
|
BuildRequires: cmake(Qt6OpenGLWidgets)
|
|
|
|
BuildRequires: cmake(Qt6Positioning)
|
|
|
|
BuildRequires: cmake(Qt6Qml)
|
|
|
|
BuildRequires: cmake(Qt6Quick)
|
2022-10-01 09:17:07 +02:00
|
|
|
BuildRequires: cmake(Qt6Quick3D)
|
2021-10-06 15:24:27 +02:00
|
|
|
BuildRequires: cmake(Qt6QuickControls2)
|
|
|
|
BuildRequires: cmake(Qt6QuickWidgets)
|
|
|
|
BuildRequires: cmake(Qt6RemoteObjects)
|
|
|
|
BuildRequires: cmake(Qt6Scxml)
|
|
|
|
BuildRequires: cmake(Qt6Sensors)
|
2023-04-09 00:10:20 +02:00
|
|
|
BuildRequires: cmake(Qt6SerialBus)
|
2021-10-06 15:24:27 +02:00
|
|
|
BuildRequires: cmake(Qt6SerialPort)
|
2022-10-19 07:49:26 +02:00
|
|
|
BuildRequires: cmake(Qt6SpatialAudio)
|
2021-10-06 15:24:27 +02:00
|
|
|
BuildRequires: cmake(Qt6StateMachine)
|
|
|
|
BuildRequires: cmake(Qt6Svg)
|
|
|
|
BuildRequires: cmake(Qt6SvgWidgets)
|
2022-10-01 09:17:07 +02:00
|
|
|
BuildRequires: cmake(Qt6TextToSpeech)
|
2021-10-06 15:24:27 +02:00
|
|
|
BuildRequires: cmake(Qt6UiPlugin)
|
|
|
|
BuildRequires: cmake(Qt6UiTools)
|
|
|
|
BuildRequires: cmake(Qt6WebChannel)
|
2022-04-19 14:13:03 +02:00
|
|
|
%ifnarch %{ix86} armv7l armv7hl ppc ppc64 ppc64le s390 s390x
|
2022-10-19 07:49:26 +02:00
|
|
|
BuildRequires: cmake(Qt6Pdf)
|
|
|
|
BuildRequires: cmake(Qt6PdfWidgets)
|
2021-10-06 15:24:27 +02:00
|
|
|
BuildRequires: cmake(Qt6WebEngineCore)
|
|
|
|
BuildRequires: cmake(Qt6WebEngineQuick)
|
|
|
|
BuildRequires: cmake(Qt6WebEngineWidgets)
|
|
|
|
%endif
|
|
|
|
BuildRequires: cmake(Qt6WebSockets)
|
|
|
|
# /SECTION
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%description
|
|
|
|
Python bindings for the Qt cross-platform application and UI framework.
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Development files for %{name}
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
Python bindings for the Qt cross-platform application and UI framework
|
|
|
|
|
|
|
|
%prep
|
2023-06-01 08:50:26 +02:00
|
|
|
%autosetup -p1 -n %{tar_name}-%{version}
|
2021-10-06 15:24:27 +02:00
|
|
|
|
|
|
|
%build
|
|
|
|
_libsuffix=$(echo %{_lib} | cut -b4-)
|
|
|
|
|
|
|
|
# The python script used to set paths before running tests
|
|
|
|
# doesn't handle build dirs called 'build'
|
|
|
|
%global __qt6_builddir %{pyside_flavor}
|
|
|
|
|
2021-12-10 09:12:05 +01:00
|
|
|
# Fix installation dir
|
2022-12-06 08:16:10 +01:00
|
|
|
sed -i 's#purelib#platlib#' sources/shiboken6/cmake/ShibokenHelpers.cmake
|
2021-12-10 09:12:05 +01:00
|
|
|
|
2021-10-06 15:24:27 +02:00
|
|
|
pushd sources/%{pyside_flavor}
|
|
|
|
|
|
|
|
# NOTE:The compiler and linker flags shall not be defined
|
|
|
|
%cmake_qt6 \
|
|
|
|
-DBUILD_TESTS:BOOL=ON \
|
|
|
|
-DLIB_SUFFIX:STRING="${_libsuffix}" \
|
|
|
|
-DCMAKE_C_FLAGS:STRING="" \
|
|
|
|
-DCMAKE_CXX_FLAGS:STRING="" \
|
|
|
|
-DCMAKE_EXE_LINKER_FLAGS:STRING="" \
|
|
|
|
-DPYTHON_EXECUTABLE:STRING=python3 \
|
|
|
|
-DNUMPY_INCLUDE_DIR:STRING=%{python_sitearch}/numpy/core/include \
|
2022-04-19 14:13:03 +02:00
|
|
|
-DCMAKE_BUILD_RPATH_USE_ORIGIN:BOOL=ON \
|
2022-08-06 15:47:29 +02:00
|
|
|
%if "%{pyside_flavor}" == "shiboken6"
|
|
|
|
-DCMAKE_SKIP_RPATH:BOOL=ON \
|
|
|
|
%endif
|
2022-04-19 14:13:03 +02:00
|
|
|
-DQFP_NO_STRIP:BOOL=ON
|
2021-10-06 15:24:27 +02:00
|
|
|
|
|
|
|
%{qt6_build}
|
|
|
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
%install
|
|
|
|
pushd sources/%{pyside_flavor}
|
|
|
|
%{qt6_install}
|
|
|
|
popd
|
|
|
|
|
|
|
|
%if "%{pyside_flavor}" == "shiboken6"
|
|
|
|
|
|
|
|
%fdupes -s %{buildroot}%{python_sitearch}
|
|
|
|
|
2022-04-19 14:13:03 +02:00
|
|
|
sed -i 's#env python$#python3#' %{buildroot}%{_bindir}/shiboken_tool.py
|
2021-10-06 15:24:27 +02:00
|
|
|
|
|
|
|
%else
|
|
|
|
|
|
|
|
rm %{buildroot}%{_datadir}/PySide6/typesystems/*_{mac,win}.xml
|
|
|
|
|
|
|
|
%fdupes -s %{buildroot}%{python_sitearch}/PySide6
|
|
|
|
|
|
|
|
mkdir -p %{buildroot}%{_qt6_pluginsdir}/designer
|
|
|
|
mv %{buildroot}%{_prefix}/plugins/designer/libPySidePlugin.so %{buildroot}%{_qt6_pluginsdir}/designer
|
|
|
|
|
|
|
|
%endif
|
2023-04-25 17:37:52 +02:00
|
|
|
# Install egg-info
|
2023-04-25 17:38:32 +02:00
|
|
|
# qtpaths is needed
|
2023-04-25 17:37:52 +02:00
|
|
|
export PATH="%{_qt6_bindir}:$PATH"
|
|
|
|
python3 setup.py egg_info --build-type=%{pyside_flavor}
|
|
|
|
cp -r *.egg-info %{buildroot}%{python_sitearch}
|
2021-10-06 15:24:27 +02:00
|
|
|
|
|
|
|
%fdupes -s %{buildroot}%{_libdir}/cmake
|
|
|
|
|
|
|
|
%check
|
|
|
|
# the pyside tests need to know the path to the 'qmake' executable
|
|
|
|
export PATH=%{_qt6_bindir}:$PATH
|
|
|
|
|
|
|
|
# Needed by the shiboken tests
|
|
|
|
export LD_LIBRARY_PATH=%{buildroot}%{_qt6_libdir}:$LD_LIBRARY_PATH
|
|
|
|
|
2022-08-06 15:47:29 +02:00
|
|
|
%if "%{pyside_flavor}" == "shiboken6"
|
|
|
|
# Since we need CMAKE_SKIP_RPATH to avoid having bogus RUNPATH in the shiboken libraries,
|
|
|
|
# It needs to know the path to a couple tests folders
|
|
|
|
for dir in libminimal libother libsample libsmart; do
|
|
|
|
export LD_LIBRARY_PATH=$PWD/sources/shiboken6/shiboken6/tests/$dir:$LD_LIBRARY_PATH
|
|
|
|
done
|
2023-06-01 08:50:26 +02:00
|
|
|
# 2023-05-30 Only fails on armv7l
|
|
|
|
%ifarch armv7l armv7hl
|
|
|
|
%define excluded_tests 1
|
|
|
|
ctest_exclude_regex="smart_smart_pointer"
|
|
|
|
%endif
|
2022-08-06 15:47:29 +02:00
|
|
|
%endif
|
|
|
|
|
2021-10-06 15:24:27 +02:00
|
|
|
%if "%{pyside_flavor}" == "pyside6"
|
|
|
|
%define xvfb_command xvfb-run -s "-screen 0 1600x1200x16 -ac +extension GLX +render -noreset" \\
|
|
|
|
|
2022-06-22 12:29:36 +02:00
|
|
|
%define excluded_tests 1
|
2023-06-01 08:50:26 +02:00
|
|
|
# Excluded tests (last update: 2023-05-30)
|
2022-10-19 07:49:26 +02:00
|
|
|
# QtWebEngineWidgets_pyside-474-qtwebengineview fails with 'ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer'
|
2022-03-28 16:06:54 +02:00
|
|
|
# QtGui_qpen_test times out
|
2022-10-01 09:17:07 +02:00
|
|
|
# QtMultimediaWidgets_qmultimediawidgets aborts
|
2023-01-12 17:05:16 +01:00
|
|
|
# Qt3DExtras_qt3dextras_test fails on s390x (timeout) and randomly everywhere else (exception)
|
2023-04-09 00:10:20 +02:00
|
|
|
# QtPositioning_positioning fails
|
|
|
|
ctest_exclude_regex="QtWebEngineWidgets_pyside-474-qtwebengineview|QtGui_qpen_test|QtMultimediaWidgets_qmultimediawidgets|Qt3DExtras_qt3dextras_test|QtPositioning_positioning"
|
2023-01-12 17:05:16 +01:00
|
|
|
|
2022-12-06 08:34:38 +01:00
|
|
|
# Random failures on aarch64: registry_existence_test times out and QtWebEngineCore_web_engine_custom_scheme asserts
|
|
|
|
%ifarch aarch64
|
|
|
|
ctest_exclude_regex="$ctest_exclude_regex|registry_existence_test|QtWebEngineCore_web_engine_custom_scheme"
|
|
|
|
%endif
|
2023-06-01 08:50:26 +02:00
|
|
|
# Test broken by https://codereview.qt-project.org/c/pyside/pyside-setup/+/478366
|
|
|
|
%ifarch aarch64 armv7l armv7hl
|
|
|
|
ctest_exclude_regex="$ctest_exclude_regex|QtOpenGL_qopenglwindow_test"
|
|
|
|
%endif
|
2021-10-06 15:24:27 +02:00
|
|
|
%endif
|
|
|
|
|
|
|
|
pushd sources/%{pyside_flavor}
|
|
|
|
%{?xvfb_command}
|
|
|
|
ctest \
|
|
|
|
--output-on-failure \
|
|
|
|
--force-new-ctest-process \
|
|
|
|
--test-dir %{__qt6_builddir} \
|
|
|
|
--parallel %{_smp_build_ncpus} \
|
2022-06-22 12:29:36 +02:00
|
|
|
%{?excluded_tests:--exclude-regex "($ctest_exclude_regex)"}
|
2021-10-06 15:24:27 +02:00
|
|
|
popd
|
|
|
|
|
2023-04-09 00:10:20 +02:00
|
|
|
%ldconfig_scriptlets
|
2021-10-06 15:24:27 +02:00
|
|
|
|
|
|
|
%files
|
|
|
|
%license sources/%{pyside_flavor}/COPYING*
|
2022-04-19 14:13:03 +02:00
|
|
|
%doc doc/changelogs/changes-*
|
2022-12-06 08:16:10 +01:00
|
|
|
%{_libdir}/lib%{pyside_flavor}.abi3.so.*
|
2021-10-06 15:24:27 +02:00
|
|
|
%if "%{pyside_flavor}" == "shiboken6"
|
|
|
|
%{_bindir}/shiboken6
|
|
|
|
%{_bindir}/shiboken_tool.py
|
|
|
|
%{python_sitearch}/shiboken6/
|
|
|
|
%{python_sitearch}/shiboken6_generator/
|
2022-12-06 08:16:10 +01:00
|
|
|
%endif
|
|
|
|
%if "%{pyside_flavor}" == "pyside6"
|
|
|
|
%{_libdir}/libpyside6qml.abi3.so.*
|
2021-10-06 15:24:27 +02:00
|
|
|
%dir %{_qt6_pluginsdir}/designer
|
|
|
|
%{_qt6_pluginsdir}/designer/libPySidePlugin.so
|
2022-12-06 08:16:10 +01:00
|
|
|
%{python_sitearch}/PySide6/
|
2021-10-06 15:24:27 +02:00
|
|
|
%endif
|
2023-04-25 17:37:52 +02:00
|
|
|
%{python_sitearch}/*.egg-info
|
2021-10-06 15:24:27 +02:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%if "%{pyside_flavor}" == "shiboken6"
|
|
|
|
%{_includedir}/shiboken6/
|
|
|
|
%{_qt6_cmakedir}/Shiboken6/
|
2022-04-19 14:13:03 +02:00
|
|
|
%{_qt6_cmakedir}/Shiboken6Tools/
|
2022-12-06 08:16:10 +01:00
|
|
|
%endif
|
|
|
|
%if "%{pyside_flavor}" == "pyside6"
|
2021-10-06 15:24:27 +02:00
|
|
|
%{_datadir}/PySide6/
|
|
|
|
%{_includedir}/PySide6/
|
2022-12-06 08:16:10 +01:00
|
|
|
%{_libdir}/libpyside6qml.abi3.so
|
2021-10-06 15:24:27 +02:00
|
|
|
%{_qt6_cmakedir}/PySide6/
|
2022-04-19 14:13:03 +02:00
|
|
|
%{_qt6_cmakedir}/PySide6Qml/
|
2021-10-06 15:24:27 +02:00
|
|
|
%endif
|
2022-12-06 08:16:10 +01:00
|
|
|
%{_libdir}/lib%{pyside_flavor}.abi3.so
|
2021-10-06 15:24:27 +02:00
|
|
|
%{_libdir}/pkgconfig/%{pyside_flavor}.pc
|
|
|
|
|
|
|
|
%changelog
|