forked from pool/python3-pyside6
Accepting request 1141755 from home:bnavigator:branches:KDE:Qt6
- Enable SLE15 python module for a more modern python than 3.6 - Use primary_python flavor for Tumbleweed (which provides python3) OBS-URL: https://build.opensuse.org/request/show/1141755 OBS-URL: https://build.opensuse.org/package/show/KDE:Qt6/python3-pyside6?expand=0&rev=56
This commit is contained in:
parent
cdc8e4158b
commit
e9379403f9
@ -1,4 +1,5 @@
|
|||||||
<multibuild>
|
<multibuild>
|
||||||
|
<flavor>pyside6</flavor>
|
||||||
<flavor>shiboken6</flavor>
|
<flavor>shiboken6</flavor>
|
||||||
</multibuild>
|
</multibuild>
|
||||||
|
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jan 26 12:07:41 UTC 2024 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Enable SLE15 python module for a more modern python than 3.6
|
||||||
|
- Use primary_python flavor for Tumbleweed (which provides python3)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Dec 7 10:54:43 UTC 2023 - Christophe Marin <christophe@krop.fr>
|
Thu Dec 7 10:54:43 UTC 2023 - Christophe Marin <christophe@krop.fr>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python3-pyside6
|
# spec file
|
||||||
#
|
#
|
||||||
# Copyright (c) 2022 SUSE LLC
|
# Copyright (c) 2024 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -16,16 +16,33 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
|
%if "%flavor" == ""
|
||||||
|
# factory-auto requires the main build_flavor to match the specfile name
|
||||||
|
%define mypython python3
|
||||||
|
%global pyside_flavor pyside6
|
||||||
|
# stop-gap for local builds
|
||||||
|
BuildRequires: no-build-without-multibuild-flavor
|
||||||
|
ExclusiveArch: donotbuild
|
||||||
|
%else
|
||||||
|
%global pyside_flavor %flavor
|
||||||
|
%if 0%{suse_version} > 1500
|
||||||
|
# This builds only for the primary python flavor, it provides the python3 flavor
|
||||||
|
%define pythons %{primary_python}
|
||||||
|
%else
|
||||||
|
# This only works with the SLE15 python module for a more modern python than 3.6.
|
||||||
|
# The build will stay unresolvable for regular python3 = 3.6
|
||||||
|
%{?sle15_python_module_pythons}
|
||||||
|
%endif
|
||||||
|
%define mypython %pythons
|
||||||
|
%define __mypython %{expand:%%__%{mypython}}
|
||||||
|
%define mypython_sitearch %{expand:%%%{mypython}_sitearch}
|
||||||
|
%endif
|
||||||
|
|
||||||
%define tar_name pyside-setup-everywhere-src
|
%define tar_name pyside-setup-everywhere-src
|
||||||
%define short_version 6.6
|
%define short_version 6.6
|
||||||
#
|
|
||||||
%if "@BUILD_FLAVOR@%{nil}" == "shiboken6"
|
Name: %{mypython}-%{pyside_flavor}
|
||||||
%global pyside_flavor shiboken6
|
|
||||||
%else
|
|
||||||
%global pyside_flavor pyside6
|
|
||||||
%endif
|
|
||||||
#
|
|
||||||
Name: python3-%{pyside_flavor}
|
|
||||||
Version: 6.6.1
|
Version: 6.6.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Python bindings for Qt 6
|
Summary: Python bindings for Qt 6
|
||||||
@ -36,13 +53,13 @@ Source: https://download.qt.io/official_releases/QtForPython/pyside6/PyS
|
|||||||
Patch0: 0001-Always-link-to-python-libraries.patch
|
Patch0: 0001-Always-link-to-python-libraries.patch
|
||||||
# SECTION common_dependencies
|
# SECTION common_dependencies
|
||||||
BuildRequires: clang-devel
|
BuildRequires: clang-devel
|
||||||
|
BuildRequires: %{mypython}-Sphinx
|
||||||
|
BuildRequires: %{mypython}-devel >= 3.7
|
||||||
|
BuildRequires: %{mypython}-numpy-devel
|
||||||
|
BuildRequires: %{mypython}-setuptools
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
BuildRequires: python3-Sphinx
|
|
||||||
BuildRequires: python3-devel >= 3.7
|
|
||||||
BuildRequires: python3-numpy-devel
|
|
||||||
BuildRequires: python3-setuptools
|
|
||||||
BuildRequires: qt6-macros
|
BuildRequires: qt6-macros
|
||||||
BuildRequires: cmake(Qt6Core)
|
BuildRequires: cmake(Qt6Core)
|
||||||
BuildRequires: cmake(Qt6Test)
|
BuildRequires: cmake(Qt6Test)
|
||||||
@ -52,8 +69,8 @@ BuildRequires: pkgconfig(libxslt)
|
|||||||
# /SECTION
|
# /SECTION
|
||||||
%if "%{pyside_flavor}" == "pyside6"
|
%if "%{pyside_flavor}" == "pyside6"
|
||||||
# For the registry_existence test
|
# For the registry_existence test
|
||||||
BuildRequires: python3-distro
|
BuildRequires: %{mypython}-distro
|
||||||
BuildRequires: cmake(Shiboken6) = %{version}
|
BuildRequires: %{mypython}-shiboken6-devel = %{version}
|
||||||
# SECTION test_dependencies
|
# SECTION test_dependencies
|
||||||
BuildRequires: Mesa-dri
|
BuildRequires: Mesa-dri
|
||||||
BuildRequires: qt6-location
|
BuildRequires: qt6-location
|
||||||
@ -71,6 +88,7 @@ BuildRequires: cmake(Qt6Widgets)
|
|||||||
# /SECTION
|
# /SECTION
|
||||||
# SECTION optional_modules
|
# SECTION optional_modules
|
||||||
BuildRequires: cmake(Qt63DAnimation)
|
BuildRequires: cmake(Qt63DAnimation)
|
||||||
|
BuildRequires: qt6-qml-private-devel
|
||||||
BuildRequires: cmake(Qt63DCore)
|
BuildRequires: cmake(Qt63DCore)
|
||||||
BuildRequires: cmake(Qt63DExtras)
|
BuildRequires: cmake(Qt63DExtras)
|
||||||
BuildRequires: cmake(Qt63DInput)
|
BuildRequires: cmake(Qt63DInput)
|
||||||
@ -88,7 +106,6 @@ BuildRequires: cmake(Qt6Location)
|
|||||||
BuildRequires: cmake(Qt6Multimedia)
|
BuildRequires: cmake(Qt6Multimedia)
|
||||||
BuildRequires: cmake(Qt6MultimediaWidgets)
|
BuildRequires: cmake(Qt6MultimediaWidgets)
|
||||||
BuildRequires: cmake(Qt6NetworkAuth)
|
BuildRequires: cmake(Qt6NetworkAuth)
|
||||||
BuildRequires: qt6-qml-private-devel
|
|
||||||
BuildRequires: cmake(Qt6OpenGL)
|
BuildRequires: cmake(Qt6OpenGL)
|
||||||
BuildRequires: cmake(Qt6OpenGLWidgets)
|
BuildRequires: cmake(Qt6OpenGLWidgets)
|
||||||
BuildRequires: cmake(Qt6Positioning)
|
BuildRequires: cmake(Qt6Positioning)
|
||||||
@ -119,6 +136,11 @@ BuildRequires: cmake(Qt6WebEngineWidgets)
|
|||||||
%endif
|
%endif
|
||||||
BuildRequires: cmake(Qt6WebSockets)
|
BuildRequires: cmake(Qt6WebSockets)
|
||||||
# /SECTION
|
# /SECTION
|
||||||
|
Requires: %{mypython}-shiboken6
|
||||||
|
%endif
|
||||||
|
%if 0%{?suse_version} > 1500
|
||||||
|
Provides: python3-%{pyside_flavor} = %{version}-%{release}
|
||||||
|
Obsoletes: python3-%{pyside_flavor} < %{version}-%{release}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -127,6 +149,10 @@ Python bindings for the Qt cross-platform application and UI framework.
|
|||||||
%package devel
|
%package devel
|
||||||
Summary: Development files for %{name}
|
Summary: Development files for %{name}
|
||||||
Requires: %{name} = %{version}
|
Requires: %{name} = %{version}
|
||||||
|
%if 0%{?suse_version} > 1500
|
||||||
|
Provides: python3-%{pyside_flavor}-devel = %{version}-%{release}
|
||||||
|
Obsoletes: python3-%{pyside_flavor}-devel < %{version}-%{release}
|
||||||
|
%endif
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
Python bindings for the Qt cross-platform application and UI framework
|
Python bindings for the Qt cross-platform application and UI framework
|
||||||
@ -153,8 +179,8 @@ pushd sources/%{pyside_flavor}
|
|||||||
-DCMAKE_C_FLAGS:STRING="" \
|
-DCMAKE_C_FLAGS:STRING="" \
|
||||||
-DCMAKE_CXX_FLAGS:STRING="" \
|
-DCMAKE_CXX_FLAGS:STRING="" \
|
||||||
-DCMAKE_EXE_LINKER_FLAGS:STRING="" \
|
-DCMAKE_EXE_LINKER_FLAGS:STRING="" \
|
||||||
-DPYTHON_EXECUTABLE:STRING=python3 \
|
-DPYTHON_EXECUTABLE:STRING=%{__mypython} \
|
||||||
-DNUMPY_INCLUDE_DIR:STRING=%{python_sitearch}/numpy/core/include \
|
-DNUMPY_INCLUDE_DIR:STRING=%{mypython_sitearch}/numpy/core/include \
|
||||||
-DCMAKE_BUILD_RPATH_USE_ORIGIN:BOOL=ON \
|
-DCMAKE_BUILD_RPATH_USE_ORIGIN:BOOL=ON \
|
||||||
%if "%{pyside_flavor}" == "shiboken6"
|
%if "%{pyside_flavor}" == "shiboken6"
|
||||||
-DCMAKE_SKIP_RPATH:BOOL=ON \
|
-DCMAKE_SKIP_RPATH:BOOL=ON \
|
||||||
@ -171,23 +197,18 @@ pushd sources/%{pyside_flavor}
|
|||||||
popd
|
popd
|
||||||
|
|
||||||
%if "%{pyside_flavor}" == "shiboken6"
|
%if "%{pyside_flavor}" == "shiboken6"
|
||||||
|
sed -i 's@^#.*env python.*$@#!%{__mypython}@' %{buildroot}%{_bindir}/shiboken_tool.py
|
||||||
%fdupes -s %{buildroot}%{python_sitearch}
|
|
||||||
|
|
||||||
sed -i 's#env python$#python3#' %{buildroot}%{_bindir}/shiboken_tool.py
|
|
||||||
|
|
||||||
%else
|
%else
|
||||||
|
|
||||||
rm %{buildroot}%{_datadir}/PySide6/typesystems/*_{mac,win}.xml
|
rm %{buildroot}%{_datadir}/PySide6/typesystems/*_{mac,win}.xml
|
||||||
|
|
||||||
%fdupes -s %{buildroot}%{python_sitearch}/PySide6
|
|
||||||
|
|
||||||
%endif
|
%endif
|
||||||
# Install egg-info
|
# Install egg-info
|
||||||
# qtpaths is needed
|
# qtpaths is needed
|
||||||
export PATH="%{_qt6_bindir}:$PATH"
|
export PATH="%{_qt6_bindir}:$PATH"
|
||||||
python3 setup.py egg_info --build-type=%{pyside_flavor}
|
%__mypython setup.py egg_info --build-type=%{pyside_flavor}
|
||||||
cp -r *.egg-info %{buildroot}%{python_sitearch}
|
# fdupes macro does not expand this (!?)
|
||||||
|
sitearch=%{buildroot}%{mypython_sitearch}
|
||||||
|
cp -r *.egg-info $sitearch
|
||||||
|
%fdupes $sitearch
|
||||||
|
|
||||||
%fdupes -s %{buildroot}%{_libdir}/cmake
|
%fdupes -s %{buildroot}%{_libdir}/cmake
|
||||||
|
|
||||||
@ -253,16 +274,16 @@ popd
|
|||||||
%if "%{pyside_flavor}" == "shiboken6"
|
%if "%{pyside_flavor}" == "shiboken6"
|
||||||
%{_bindir}/shiboken6
|
%{_bindir}/shiboken6
|
||||||
%{_bindir}/shiboken_tool.py
|
%{_bindir}/shiboken_tool.py
|
||||||
%{python_sitearch}/shiboken6/
|
%{mypython_sitearch}/shiboken6/
|
||||||
%{python_sitearch}/shiboken6_generator/
|
%{mypython_sitearch}/shiboken6_generator/
|
||||||
%endif
|
%endif
|
||||||
%if "%{pyside_flavor}" == "pyside6"
|
%if "%{pyside_flavor}" == "pyside6"
|
||||||
%{_libdir}/libpyside6qml.abi3.so.*
|
%{_libdir}/libpyside6qml.abi3.so.*
|
||||||
%dir %{_qt6_pluginsdir}/designer
|
%dir %{_qt6_pluginsdir}/designer
|
||||||
%{_qt6_pluginsdir}/designer/libPySidePlugin.so
|
%{_qt6_pluginsdir}/designer/libPySidePlugin.so
|
||||||
%{python_sitearch}/PySide6/
|
%{mypython_sitearch}/PySide6/
|
||||||
%endif
|
%endif
|
||||||
%{python_sitearch}/*.egg-info
|
%{mypython_sitearch}/*.egg-info
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%if "%{pyside_flavor}" == "shiboken6"
|
%if "%{pyside_flavor}" == "shiboken6"
|
||||||
|
Loading…
Reference in New Issue
Block a user