Accepting request 923433 from home:cgiboudeaux:Qt6:release:pyside
Welcome PySide 6 OBS-URL: https://build.opensuse.org/request/show/923433 OBS-URL: https://build.opensuse.org/package/show/KDE:Qt6/python3-pyside6?expand=0&rev=1
This commit is contained in:
commit
6b50f43f8a
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.osc
|
42
0001-Always-link-to-python-libraries.patch
Normal file
42
0001-Always-link-to-python-libraries.patch
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
From c94527c95ffc68b3b161c8cd0a786ae179f30915 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christophe Giboudeaux <christophe@krop.fr>
|
||||||
|
Date: Tue, 27 Jul 2021 14:54:00 +0200
|
||||||
|
Subject: [PATCH] Always link to python libraries.
|
||||||
|
|
||||||
|
Change-Id: I687191431adaff55927de353db8f81dfa30ba1b1
|
||||||
|
---
|
||||||
|
sources/shiboken6/data/shiboken_helpers.cmake | 18 +++---------------
|
||||||
|
1 file changed, 3 insertions(+), 15 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/sources/shiboken6/data/shiboken_helpers.cmake b/sources/shiboken6/data/shiboken_helpers.cmake
|
||||||
|
index 7e772c7fd..438f63480 100644
|
||||||
|
--- a/sources/shiboken6/data/shiboken_helpers.cmake
|
||||||
|
+++ b/sources/shiboken6/data/shiboken_helpers.cmake
|
||||||
|
@@ -300,21 +300,9 @@ macro(shiboken_compute_python_libraries)
|
||||||
|
"SHIBOKEN_COMPUTE_LIBS" "shiboken_compute_python_libraries"
|
||||||
|
"IS_CALLED_FROM_EXPORT" "" "" ${ARGN})
|
||||||
|
|
||||||
|
- if (NOT SHIBOKEN_PYTHON_LIBRARIES)
|
||||||
|
- set(SHIBOKEN_PYTHON_LIBRARIES "")
|
||||||
|
- endif()
|
||||||
|
-
|
||||||
|
- if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
|
- if(WIN32 AND NOT SHIBOKEN_PYTHON_LIBRARIES)
|
||||||
|
- set(SHIBOKEN_PYTHON_LIBRARIES ${PYTHON_DEBUG_LIBRARIES})
|
||||||
|
- endif()
|
||||||
|
- endif()
|
||||||
|
-
|
||||||
|
- if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||||
|
- if(WIN32 AND NOT SHIBOKEN_PYTHON_LIBRARIES)
|
||||||
|
- set(SHIBOKEN_PYTHON_LIBRARIES ${PYTHON_LIBRARIES})
|
||||||
|
- endif()
|
||||||
|
- endif()
|
||||||
|
+ # Always link to python libraries.
|
||||||
|
+ message(STATUS "Linking shiboken to ${PYTHON_LIBRARIES}")
|
||||||
|
+ set(SHIBOKEN_PYTHON_LIBRARIES ${PYTHON_LIBRARIES})
|
||||||
|
|
||||||
|
# If the resulting variable
|
||||||
|
# contains a "debug;X;optimized;Y" list like described in shiboken_check_if_limited_api,
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
@ -0,0 +1,93 @@
|
|||||||
|
From ba855a5ba8ae6c52f704e4004d749afd766aa834 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christophe Giboudeaux <christophe@krop.fr>
|
||||||
|
Date: Sun, 25 Apr 2021 16:14:31 +0200
|
||||||
|
Subject: [PATCH] Don't install CMake files into versioned directories
|
||||||
|
|
||||||
|
Experience shows this causes issues.
|
||||||
|
---
|
||||||
|
sources/pyside6/libpyside/CMakeLists.txt | 10 +++++-----
|
||||||
|
sources/shiboken6/data/CMakeLists.txt | 10 +++++-----
|
||||||
|
sources/shiboken6/libshiboken/CMakeLists.txt | 2 +-
|
||||||
|
3 files changed, 11 insertions(+), 11 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/sources/pyside6/libpyside/CMakeLists.txt b/sources/pyside6/libpyside/CMakeLists.txt
|
||||||
|
index 90f333e..b42691d 100644
|
||||||
|
--- a/sources/pyside6/libpyside/CMakeLists.txt
|
||||||
|
+++ b/sources/pyside6/libpyside/CMakeLists.txt
|
||||||
|
@@ -191,7 +191,7 @@ set(PYSIDE_GLUE "${CMAKE_INSTALL_PREFIX}/share/PySide6${pyside6_SUFFIX}/glue")
|
||||||
|
configure_package_config_file(
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/PySide6Config-spec.cmake.in"
|
||||||
|
"${CMAKE_CURRENT_BINARY_DIR}/install/PySide6Config${SHIBOKEN_PYTHON_CONFIG_SUFFIX}.cmake"
|
||||||
|
- INSTALL_DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide6-${BINDING_API_VERSION}"
|
||||||
|
+ INSTALL_DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide6"
|
||||||
|
PATH_VARS PYSIDE_PYTHONPATH PYSIDE_TYPESYSTEMS PYSIDE_GLUE
|
||||||
|
)
|
||||||
|
|
||||||
|
@@ -208,16 +208,16 @@ install(TARGETS pyside6 EXPORT PySide6Targets
|
||||||
|
ARCHIVE DESTINATION "${LIB_INSTALL_DIR}"
|
||||||
|
RUNTIME DESTINATION bin)
|
||||||
|
install(EXPORT PySide6Targets NAMESPACE PySide6::
|
||||||
|
- DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide6-${BINDING_API_VERSION}")
|
||||||
|
+ DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide6")
|
||||||
|
|
||||||
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pyside6${pyside6_SUFFIX}.pc"
|
||||||
|
DESTINATION "${LIB_INSTALL_DIR}/pkgconfig")
|
||||||
|
|
||||||
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/PySide6Config.cmake"
|
||||||
|
- DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide6-${BINDING_API_VERSION}")
|
||||||
|
+ DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide6")
|
||||||
|
|
||||||
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/install/PySide6Config${SHIBOKEN_PYTHON_CONFIG_SUFFIX}.cmake"
|
||||||
|
- DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide6-${BINDING_API_VERSION}")
|
||||||
|
+ DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide6")
|
||||||
|
|
||||||
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/PySide6ConfigVersion.cmake"
|
||||||
|
- DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide6-${BINDING_API_VERSION}")
|
||||||
|
+ DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide6")
|
||||||
|
diff --git a/sources/shiboken6/data/CMakeLists.txt b/sources/shiboken6/data/CMakeLists.txt
|
||||||
|
index 46bd1bf..18c34c2 100644
|
||||||
|
--- a/sources/shiboken6/data/CMakeLists.txt
|
||||||
|
+++ b/sources/shiboken6/data/CMakeLists.txt
|
||||||
|
@@ -33,7 +33,7 @@ endif()
|
||||||
|
configure_package_config_file(
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/Shiboken6Config-spec.cmake.in"
|
||||||
|
"${CMAKE_CURRENT_BINARY_DIR}/install/Shiboken6Config${PYTHON_CONFIG_SUFFIX}.cmake"
|
||||||
|
- INSTALL_DESTINATION "${LIB_INSTALL_DIR}/cmake/Shiboken6-${shiboken6_VERSION}"
|
||||||
|
+ INSTALL_DESTINATION "${LIB_INSTALL_DIR}/cmake/Shiboken6"
|
||||||
|
PATH_VARS SHIBOKEN_PYTHON_MODULE_DIR SHIBOKEN_SHARED_LIBRARY_DIR
|
||||||
|
)
|
||||||
|
|
||||||
|
@@ -45,16 +45,16 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/shiboken6.pc.in"
|
||||||
|
"${CMAKE_CURRENT_BINARY_DIR}/shiboken6${shiboken6_SUFFIX}.pc" @ONLY)
|
||||||
|
|
||||||
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/Shiboken6Config.cmake"
|
||||||
|
- DESTINATION "${LIB_INSTALL_DIR}/cmake/Shiboken6-${shiboken6_VERSION}")
|
||||||
|
+ DESTINATION "${LIB_INSTALL_DIR}/cmake/Shiboken6")
|
||||||
|
|
||||||
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/install/Shiboken6Config${PYTHON_CONFIG_SUFFIX}.cmake"
|
||||||
|
- DESTINATION "${LIB_INSTALL_DIR}/cmake/Shiboken6-${shiboken6_VERSION}")
|
||||||
|
+ DESTINATION "${LIB_INSTALL_DIR}/cmake/Shiboken6")
|
||||||
|
|
||||||
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/Shiboken6ConfigVersion.cmake"
|
||||||
|
- DESTINATION "${LIB_INSTALL_DIR}/cmake/Shiboken6-${shiboken6_VERSION}")
|
||||||
|
+ DESTINATION "${LIB_INSTALL_DIR}/cmake/Shiboken6")
|
||||||
|
|
||||||
|
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/shiboken_helpers.cmake"
|
||||||
|
- DESTINATION "${LIB_INSTALL_DIR}/cmake/Shiboken6-${shiboken6_VERSION}")
|
||||||
|
+ DESTINATION "${LIB_INSTALL_DIR}/cmake/Shiboken6")
|
||||||
|
|
||||||
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/shiboken6${shiboken6_SUFFIX}.pc"
|
||||||
|
DESTINATION "${LIB_INSTALL_DIR}/pkgconfig")
|
||||||
|
diff --git a/sources/shiboken6/libshiboken/CMakeLists.txt b/sources/shiboken6/libshiboken/CMakeLists.txt
|
||||||
|
index 2413181..d5a82b8 100644
|
||||||
|
--- a/sources/shiboken6/libshiboken/CMakeLists.txt
|
||||||
|
+++ b/sources/shiboken6/libshiboken/CMakeLists.txt
|
||||||
|
@@ -151,4 +151,4 @@ install(TARGETS libshiboken EXPORT Shiboken6Targets
|
||||||
|
ARCHIVE DESTINATION "${LIB_INSTALL_DIR}"
|
||||||
|
RUNTIME DESTINATION bin)
|
||||||
|
install(EXPORT Shiboken6Targets NAMESPACE Shiboken6::
|
||||||
|
- DESTINATION ${LIB_INSTALL_DIR}/cmake/Shiboken6-${shiboken6_VERSION})
|
||||||
|
+ DESTINATION ${LIB_INSTALL_DIR}/cmake/Shiboken6)
|
||||||
|
--
|
||||||
|
2.31.1
|
||||||
|
|
12
_constraints
Normal file
12
_constraints
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<constraints>
|
||||||
|
<overwrite>
|
||||||
|
<conditions>
|
||||||
|
<package>python3-pyside6</package>
|
||||||
|
</conditions>
|
||||||
|
<hardware>
|
||||||
|
<disk>
|
||||||
|
<size unit="G">6</size>
|
||||||
|
</disk>
|
||||||
|
</hardware>
|
||||||
|
</overwrite>
|
||||||
|
</constraints>
|
4
_multibuild
Normal file
4
_multibuild
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<multibuild>
|
||||||
|
<flavor>shiboken6</flavor>
|
||||||
|
</multibuild>
|
||||||
|
|
3
pyside-setup-opensource-src-6.2.0.tar.xz
Normal file
3
pyside-setup-opensource-src-6.2.0.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:fed210b662129955332d2609a900b5b8643130134e4682371b26a9ba60740d01
|
||||||
|
size 6782676
|
12
python3-pyside6.changes
Normal file
12
python3-pyside6.changes
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 30 13:14:54 UTC 2021 - Christophe Giboudeaux <christophe@krop.fr>
|
||||||
|
|
||||||
|
- Update to 6.2.0
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jul 27 16:40:23 UTC 2021 - Christophe Giboudeaux <christophe@krop.fr>
|
||||||
|
|
||||||
|
- Init python3-pyside6
|
||||||
|
- Add patches:
|
||||||
|
* 0001-Don-t-install-CMake-files-into-versioned-directories.patch
|
||||||
|
* 0001-Always-link-to-python-libraries.patch
|
236
python3-pyside6.spec
Normal file
236
python3-pyside6.spec
Normal file
@ -0,0 +1,236 @@
|
|||||||
|
#
|
||||||
|
# spec file for package python3-pyside6
|
||||||
|
#
|
||||||
|
# Copyright (c) 2021 SUSE LLC
|
||||||
|
#
|
||||||
|
# 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/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%define tar_name pyside-setup-opensource-src
|
||||||
|
#
|
||||||
|
%if "@BUILD_FLAVOR@%{nil}" == "shiboken6"
|
||||||
|
%global pyside_flavor shiboken6
|
||||||
|
%else
|
||||||
|
%global pyside_flavor pyside6
|
||||||
|
%endif
|
||||||
|
#
|
||||||
|
# llvm/clang are too old in Leap 15.2
|
||||||
|
%if %{?suse_version} == 1500 && 0%{?sle_version} == 150200
|
||||||
|
ExclusiveArch: do_not_build
|
||||||
|
%endif
|
||||||
|
#
|
||||||
|
Name: python3-%{pyside_flavor}
|
||||||
|
Version: 6.2.0
|
||||||
|
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
|
||||||
|
Patch0: 0001-Don-t-install-CMake-files-into-versioned-directories.patch
|
||||||
|
# PATCH-FIX-OPENSUSE
|
||||||
|
Patch1: 0001-Always-link-to-python-libraries.patch
|
||||||
|
# SECTION common_dependencies
|
||||||
|
BuildRequires: clang-devel
|
||||||
|
BuildRequires: fdupes
|
||||||
|
BuildRequires: pkgconfig
|
||||||
|
BuildRequires: python-rpm-macros
|
||||||
|
BuildRequires: python3-Sphinx
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
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"
|
||||||
|
BuildRequires: cmake(Shiboken6)
|
||||||
|
# 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)
|
||||||
|
BuildRequires: cmake(Qt6Multimedia)
|
||||||
|
BuildRequires: cmake(Qt6MultimediaWidgets)
|
||||||
|
BuildRequires: cmake(Qt6NetworkAuth)
|
||||||
|
BuildRequires: cmake(Qt6OpenGL)
|
||||||
|
BuildRequires: cmake(Qt6OpenGLWidgets)
|
||||||
|
BuildRequires: cmake(Qt6Positioning)
|
||||||
|
BuildRequires: cmake(Qt6Qml)
|
||||||
|
BuildRequires: cmake(Qt6Quick)
|
||||||
|
BuildRequires: cmake(Qt6QuickControls2)
|
||||||
|
BuildRequires: cmake(Qt6QuickWidgets)
|
||||||
|
BuildRequires: cmake(Qt6RemoteObjects)
|
||||||
|
BuildRequires: cmake(Qt6Scxml)
|
||||||
|
BuildRequires: cmake(Qt6Sensors)
|
||||||
|
BuildRequires: cmake(Qt6SerialPort)
|
||||||
|
BuildRequires: cmake(Qt6StateMachine)
|
||||||
|
BuildRequires: cmake(Qt6Svg)
|
||||||
|
BuildRequires: cmake(Qt6SvgWidgets)
|
||||||
|
BuildRequires: cmake(Qt6UiPlugin)
|
||||||
|
BuildRequires: cmake(Qt6UiTools)
|
||||||
|
BuildRequires: cmake(Qt6WebChannel)
|
||||||
|
%ifnarch ppc ppc64 ppc64le s390 s390x
|
||||||
|
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
|
||||||
|
%autosetup -p1 -n %{tar_name}-%{version}
|
||||||
|
|
||||||
|
%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}
|
||||||
|
|
||||||
|
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 \
|
||||||
|
-DCMAKE_BUILD_RPATH_USE_ORIGIN:BOOL=ON
|
||||||
|
|
||||||
|
%{qt6_build}
|
||||||
|
|
||||||
|
popd
|
||||||
|
|
||||||
|
%install
|
||||||
|
pushd sources/%{pyside_flavor}
|
||||||
|
%{qt6_install}
|
||||||
|
popd
|
||||||
|
|
||||||
|
%if "%{pyside_flavor}" == "shiboken6"
|
||||||
|
|
||||||
|
%fdupes -s %{buildroot}%{python_sitearch}
|
||||||
|
|
||||||
|
sed -i 's#env python#python3#' %{buildroot}%{_bindir}/shiboken_tool.py
|
||||||
|
|
||||||
|
%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
|
||||||
|
|
||||||
|
%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
|
||||||
|
|
||||||
|
%if "%{pyside_flavor}" == "pyside6"
|
||||||
|
%define xvfb_command xvfb-run -s "-screen 0 1600x1200x16 -ac +extension GLX +render -noreset" \\
|
||||||
|
|
||||||
|
# Excluded tests (last update: 2021-09-29)
|
||||||
|
# registry_existence_test can only be run if pyside and shiboken are built together
|
||||||
|
# QtWidgets_bug_430 times out
|
||||||
|
# QtWidgets_bug_635 fails
|
||||||
|
# QtWebEngineWidgets_pyside-474-qtwebengineview & QtWebEngineCore_web_engine_custom_scheme
|
||||||
|
# pass locally but not on the build service
|
||||||
|
%define ctest_exclude_regex '(registry_existence_test|QtWidgets_bug_430|QtWidgets_bug_635|QtWebEngineWidgets_pyside-474-qtwebengineview|QtWebEngineCore_web_engine_custom_scheme)'
|
||||||
|
%endif
|
||||||
|
|
||||||
|
pushd sources/%{pyside_flavor}
|
||||||
|
%{?xvfb_command}
|
||||||
|
ctest \
|
||||||
|
--output-on-failure \
|
||||||
|
--force-new-ctest-process \
|
||||||
|
--test-dir %{__qt6_builddir} \
|
||||||
|
--parallel %{_smp_build_ncpus} \
|
||||||
|
%{?ctest_exclude_regex:--exclude-regex %{ctest_exclude_regex}}
|
||||||
|
popd
|
||||||
|
|
||||||
|
%post -p /sbin/ldconfig
|
||||||
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%files
|
||||||
|
%license sources/%{pyside_flavor}/COPYING*
|
||||||
|
%{_libdir}/lib%{pyside_flavor}.%{py3_soflags}.so.*
|
||||||
|
%if "%{pyside_flavor}" == "shiboken6"
|
||||||
|
%{_bindir}/shiboken6
|
||||||
|
%{_bindir}/shiboken_tool.py
|
||||||
|
%{python_sitearch}/shiboken6/
|
||||||
|
%{python_sitearch}/shiboken6_generator/
|
||||||
|
%else
|
||||||
|
%{python_sitearch}/PySide6/
|
||||||
|
%dir %{_qt6_pluginsdir}/designer
|
||||||
|
%{_qt6_pluginsdir}/designer/libPySidePlugin.so
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%if "%{pyside_flavor}" == "shiboken6"
|
||||||
|
%{_includedir}/shiboken6/
|
||||||
|
%{_qt6_cmakedir}/Shiboken6/
|
||||||
|
%else
|
||||||
|
%{_datadir}/PySide6/
|
||||||
|
%{_includedir}/PySide6/
|
||||||
|
%{_qt6_cmakedir}/PySide6/
|
||||||
|
%endif
|
||||||
|
%{_libdir}/lib%{pyside_flavor}.%{py3_soflags}.so
|
||||||
|
%{_libdir}/pkgconfig/%{pyside_flavor}.pc
|
||||||
|
|
||||||
|
%changelog
|
Loading…
Reference in New Issue
Block a user