2018-05-23 14:50:20 +00:00
|
|
|
#
|
|
|
|
# spec file for package python3-pyside2
|
|
|
|
#
|
2019-04-06 19:06:21 +00:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2018-05-23 14:50:20 +00: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.
|
|
|
|
|
2018-10-22 14:40:50 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-05-23 14:50:20 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%bcond_with tests
|
|
|
|
|
|
|
|
%define mypython python3
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
BuildRequires: python3-setuptools
|
|
|
|
Name: python3-pyside2
|
2019-07-01 20:12:52 +00:00
|
|
|
Version: 5.13.0
|
2018-05-23 14:50:20 +00:00
|
|
|
Release: 0
|
2018-12-24 14:02:31 +00:00
|
|
|
Summary: Python bindings for Qt
|
2019-05-06 09:01:49 +00:00
|
|
|
# shiboken2 is licensed under GPL-3.0-with-Qt-Company-Qt-exception-1.1
|
|
|
|
License: LGPL-3.0-only OR (GPL-2.0-only OR GPL-3.0-or-later) AND GPL-3.0-with-Qt-Company-Qt-exception-1.1
|
2018-05-23 14:50:20 +00:00
|
|
|
Group: Development/Languages/Python
|
2018-10-24 08:33:06 +00:00
|
|
|
URL: http://wiki.qt.io/Qt_for_Python
|
2019-04-06 19:06:21 +00:00
|
|
|
Source0: https://download.qt.io/official_releases/QtForPython/pyside2/PySide2-%{version}-src/pyside-setup-everywhere-src-%{version}.tar.xz
|
|
|
|
Patch0: lib64.patch
|
2018-12-24 10:29:18 +00:00
|
|
|
# PATCH-FIX-UPSTREAM - PYSIDE-881
|
2019-04-06 19:06:21 +00:00
|
|
|
Patch1: 0001-Remove-unnecessary-she-bang-from-icon-cache.py.patch
|
2018-05-23 14:50:20 +00:00
|
|
|
BuildRequires: cmake
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
|
|
|
|
BuildRequires: libqt5-qtdeclarative-private-headers-devel
|
|
|
|
|
|
|
|
##### essential modules
|
2019-04-06 19:06:21 +00:00
|
|
|
BuildRequires: cmake(Qt5Concurrent)
|
2019-07-01 20:12:52 +00:00
|
|
|
BuildConflicts: cmake(Qt5Core) >= 5.14
|
|
|
|
BuildRequires: cmake(Qt5Core) >= 5.13
|
2019-04-06 19:06:21 +00:00
|
|
|
BuildRequires: cmake(Qt5Network)
|
|
|
|
BuildRequires: cmake(Qt5PrintSupport)
|
|
|
|
BuildRequires: cmake(Qt5Sql)
|
|
|
|
BuildRequires: cmake(Qt5Test)
|
|
|
|
BuildRequires: cmake(Qt5Widgets)
|
|
|
|
BuildRequires: cmake(Qt5X11Extras)
|
|
|
|
BuildRequires: cmake(Qt5Xml)
|
|
|
|
BuildRequires: cmake(Qt5XmlPatterns)
|
2018-05-23 14:50:20 +00:00
|
|
|
|
|
|
|
##### optional modules
|
|
|
|
BuildRequires: libQt53DQuickScene2D5
|
2019-04-06 19:06:21 +00:00
|
|
|
BuildRequires: cmake(Qt53DAnimation)
|
|
|
|
BuildRequires: cmake(Qt53DCore)
|
|
|
|
BuildRequires: cmake(Qt53DExtras)
|
|
|
|
BuildRequires: cmake(Qt53DInput)
|
|
|
|
BuildRequires: cmake(Qt53DLogic)
|
|
|
|
BuildRequires: cmake(Qt53DRender)
|
|
|
|
BuildRequires: cmake(Qt5Charts)
|
|
|
|
BuildRequires: cmake(Qt5DataVisualization)
|
|
|
|
BuildRequires: cmake(Qt5Designer)
|
|
|
|
BuildRequires: cmake(Qt5Multimedia)
|
|
|
|
BuildRequires: cmake(Qt5MultimediaWidgets)
|
|
|
|
BuildRequires: cmake(Qt5OpenGL)
|
|
|
|
BuildRequires: cmake(Qt5QuickWidgets)
|
|
|
|
BuildRequires: cmake(Qt5RemoteObjects)
|
|
|
|
BuildRequires: cmake(Qt5Script)
|
|
|
|
BuildRequires: cmake(Qt5ScriptTools)
|
|
|
|
BuildRequires: cmake(Qt5Scxml)
|
|
|
|
BuildRequires: cmake(Qt5Sensors)
|
|
|
|
BuildRequires: cmake(Qt5Svg)
|
|
|
|
BuildRequires: cmake(Qt5TextToSpeech)
|
|
|
|
BuildRequires: cmake(Qt5WebChannel)
|
|
|
|
BuildRequires: cmake(Qt5WebEngineWidgets)
|
|
|
|
BuildRequires: cmake(Qt5WebSockets)
|
|
|
|
BuildRequires: cmake(Qt5Widgets)
|
|
|
|
BuildRequires: cmake(Qt5Xml)
|
|
|
|
BuildRequires: cmake(Qt5XmlPatterns)
|
|
|
|
# FreeCAD 0.18 still uses Qt5Webkit
|
|
|
|
BuildRequires: cmake(Qt5WebKit)
|
2018-05-23 14:50:20 +00:00
|
|
|
|
2018-05-25 10:55:03 +00:00
|
|
|
BuildRequires: clang-devel >= 3.9
|
2018-10-22 14:40:50 +00:00
|
|
|
BuildRequires: libxslt-devel
|
2018-10-26 13:03:22 +00:00
|
|
|
BuildRequires: python3-Sphinx
|
|
|
|
BuildRequires: python3-idna
|
|
|
|
BuildRequires: python3-urllib3
|
2019-04-06 19:06:21 +00:00
|
|
|
BuildRequires: python3-wheel
|
2018-05-23 14:50:20 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
The PySide2 project provides Python bindings for the Qt
|
|
|
|
application and UI framework.
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Header Files for PySide2
|
2019-07-01 20:12:52 +00:00
|
|
|
License: LGPL-3.0-only OR (GPL-2.0-only OR GPL-3.0-or-later) AND GPL-3.0-with-Qt-Company-Qt-exception-1.1
|
2018-05-23 14:50:20 +00:00
|
|
|
Group: Development/Languages/Python
|
2018-10-24 08:33:06 +00:00
|
|
|
Requires: %{name} = %{version}
|
2018-05-23 14:50:20 +00:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
Files needed for development with the PySide2 bindings
|
|
|
|
for Qt.
|
|
|
|
|
2018-12-24 10:29:18 +00:00
|
|
|
%package examples
|
|
|
|
Summary: Examples for using PySide2
|
2019-07-01 20:12:52 +00:00
|
|
|
License: BSD-3-Clause
|
2018-12-24 10:29:18 +00:00
|
|
|
Group: Development/Languages/Python
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
|
|
|
|
%description examples
|
|
|
|
Examples and Tutorials for the PySide2 bindings for Qt.
|
|
|
|
|
2018-05-23 14:50:20 +00:00
|
|
|
%prep
|
2019-04-06 19:06:21 +00:00
|
|
|
%setup -q -n pyside-setup-everywhere-src-%{version}
|
2018-06-05 10:13:37 +00:00
|
|
|
%if "%{_lib}" == "lib64"
|
2019-04-06 19:06:21 +00:00
|
|
|
%patch0 -p1
|
2018-05-25 06:42:45 +00:00
|
|
|
%endif
|
2019-04-06 19:06:21 +00:00
|
|
|
%patch1 -p1
|
2018-05-23 14:50:20 +00:00
|
|
|
|
|
|
|
%build
|
2018-10-24 08:33:06 +00:00
|
|
|
export LLVM_INSTALL_DIR=%{_prefix}
|
2018-12-24 10:29:18 +00:00
|
|
|
# Workaround for PYSIDE-880
|
|
|
|
export LC_ALL=C.utf8
|
|
|
|
%{mypython} setup.py build --reuse-build --ignore-git %{?jobs:--parallel=%{jobs}} \
|
2018-05-23 14:50:20 +00:00
|
|
|
%if %{with tests}
|
|
|
|
--build-tests
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%install
|
2018-12-24 10:29:18 +00:00
|
|
|
export LC_ALL=C.utf8
|
2018-10-24 08:33:06 +00:00
|
|
|
%{mypython} setup.py install --reuse-build --ignore-git --prefix=%{_prefix} --root=%{buildroot} \
|
2018-05-23 14:50:20 +00:00
|
|
|
%if %{with tests}
|
|
|
|
--build-tests
|
|
|
|
%endif
|
|
|
|
|
|
|
|
# and hack re-installation, since setup is doing it wrong
|
|
|
|
rm -rf %{buildroot}/*
|
|
|
|
mkdir -p %{buildroot}/%{_libdir}
|
|
|
|
cp -a ./pyside?_install/py*-release/* %{buildroot}%{_prefix}/
|
|
|
|
|
2018-12-28 12:40:10 +00:00
|
|
|
cp -a ./pyside3_build/py*-release/pyside2/PySide2/*.pyi %{buildroot}%{python_sitearch}/PySide2/
|
2018-12-24 10:29:18 +00:00
|
|
|
|
|
|
|
cp -a ./examples %{buildroot}%{_datadir}/PySide2/
|
2018-05-23 14:50:20 +00:00
|
|
|
|
2018-10-24 08:33:06 +00:00
|
|
|
sed -i 's,=.*/pyside._install/[^\/]*,=/usr,' %{buildroot}/%{_libdir}/pkgconfig/*.pc
|
|
|
|
sed -i 's,^libdir=.*,libdir=%{_libdir},' %{buildroot}/%{_libdir}/pkgconfig/*.pc
|
|
|
|
|
|
|
|
sed -i 's,"[^"]*/include/shiboken2","%{_includedir}/shiboken2",' %{buildroot}/%{_libdir}/cmake/Shiboken*/*.cmake
|
|
|
|
sed -i 's,"[^"]*/%{_lib}/libshiboken2.\(.*\)","%{_libdir}/libshiboken2.\1",' %{buildroot}/%{_libdir}/cmake/Shiboken*/*.cmake
|
|
|
|
sed -i 's,"[^"]*/bin/shiboken2","%{_bindir}/shiboken2",' %{buildroot}/%{_libdir}/cmake/Shiboken*/*.cmake
|
|
|
|
sed -i 's,^include("[^"]*-release/%{_lib}/,include("%{_libdir}/,' %{buildroot}/%{_libdir}/cmake/Shiboken*/*.cmake
|
2018-05-28 06:25:33 +00:00
|
|
|
|
2018-10-24 08:33:06 +00:00
|
|
|
sed -i 's,"[^"]*/include/PySide2","%{_includedir}/PySide2",' %{buildroot}/%{_libdir}/cmake/PySide2*/*.cmake
|
2018-12-24 10:29:18 +00:00
|
|
|
sed -i 's,"[^"]*/%{_lib}/cmake/\(.*\)","%{_libdir}/cmake/\1",' %{buildroot}/%{_libdir}/cmake/PySide2*/*.cmake
|
|
|
|
sed -i 's,"[^"]*/%{_lib}/libpyside2\.\(.*\)","%{_libdir}/libpyside2.\1",' %{buildroot}/%{_libdir}/cmake/PySide2*/*.cmake
|
2018-10-24 08:33:06 +00:00
|
|
|
sed -i 's,"[^"]*/\(python.*/site-packages\)","%{_libdir}/\1",' %{buildroot}/%{_libdir}/cmake/PySide2*/*.cmake
|
|
|
|
sed -i 's,"[^"]*/share/PySide2/typesystems","%{_datadir}/PySide2/typesystems",' %{buildroot}/%{_libdir}/cmake/PySide2*/*.cmake
|
2018-12-24 10:29:18 +00:00
|
|
|
sed -i 's,"[^"]*/share/PySide2/glue","%{_datadir}/PySide2/glue",' %{buildroot}/%{_libdir}/cmake/PySide2*/*.cmake
|
|
|
|
sed -i 's,^include("[^"]*-release/%{_lib}/,include("%{_libdir}/,' %{buildroot}/%{_libdir}/cmake/PySide2*/*.cmake
|
2018-05-28 06:25:33 +00:00
|
|
|
|
2018-10-24 08:33:06 +00:00
|
|
|
sed -i 's,env python,python,' %{buildroot}/%{_bindir}/pyside2-uic
|
2018-05-28 06:25:33 +00:00
|
|
|
|
2018-12-24 10:29:18 +00:00
|
|
|
rm %{buildroot}%{_bindir}/*_tool.py
|
2018-12-28 12:40:10 +00:00
|
|
|
rm -Rf %{buildroot}%{python_sitearch}/pyside2uic/port_v2/
|
2018-12-24 10:29:18 +00:00
|
|
|
rm -Rf %{buildroot}%{_datadir}/PySide2/typesystems/typesystem_*_win.xml
|
|
|
|
|
|
|
|
%fdupes %{buildroot}%{_datadir}/PySide2/examples/
|
|
|
|
|
2018-05-23 14:50:20 +00:00
|
|
|
%check
|
|
|
|
%if %{with tests}
|
2018-10-24 08:33:06 +00:00
|
|
|
%{mypython} testrunner.py test
|
2018-05-23 14:50:20 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%post -p /sbin/ldconfig
|
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%files
|
|
|
|
%license LICENSE.*
|
2019-04-06 19:06:21 +00:00
|
|
|
%doc dist/changes*
|
2018-10-24 08:33:06 +00:00
|
|
|
%{_bindir}/*
|
2018-05-23 14:50:20 +00:00
|
|
|
%{_libdir}/*.so.*
|
2018-12-28 12:40:10 +00:00
|
|
|
%{python_sitearch}/*
|
2018-05-23 14:50:20 +00:00
|
|
|
|
|
|
|
%files devel
|
2018-10-24 08:33:06 +00:00
|
|
|
%{_datadir}/PySide2/
|
2018-12-24 10:29:18 +00:00
|
|
|
%exclude %{_datadir}/PySide2/examples
|
2018-10-24 08:33:06 +00:00
|
|
|
%{_includedir}/*
|
2018-05-23 14:50:20 +00:00
|
|
|
%{_libdir}/*.so
|
|
|
|
%{_libdir}/cmake
|
|
|
|
%{_libdir}/pkgconfig
|
2018-10-24 08:33:06 +00:00
|
|
|
%{_mandir}/man*/*
|
2018-05-23 14:50:20 +00:00
|
|
|
|
2018-12-24 10:29:18 +00:00
|
|
|
%files examples
|
|
|
|
%dir %{_datadir}/PySide2
|
|
|
|
%{_datadir}/PySide2/examples
|
|
|
|
|
2018-05-23 14:50:20 +00:00
|
|
|
%changelog
|