File python3-pyside.spec of Package python3-pyside

#
# spec file for package python3-pyside
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#


Name:           python3-pyside
Version:        1.2.4
Release:        0
Summary:        PySide - python bindings for Qt
License:        LGPL-2.1+
Group:          Development/Languages/Python
Url:            http://qt-project.org/wiki/PySide
Source0:        https://github.com/PySide/PySide/archive/%{version}/pyside-%{version}.tar.gz
# PATCH-FIX pyside-fix-include-dir-qtgui rpm@fthiessen.de -- fixes include directory for QtGui component.
# Reported upstream: https://bugreports.qt.io/browse/PYSIDE-283
Patch0:         pyside-fix-include-dir-qtgui.patch
BuildRequires:  cmake
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  graphviz-devel
BuildRequires:  libQtWebKit-devel
BuildRequires:  libqt4-devel >= 4.8
BuildRequires:  libshiboken-python3-devel
BuildRequires:  libxslt-devel
BuildRequires:  phonon-devel
BuildRequires:  python3-devel
BuildRequires:  python3-pyside-shiboken

%description
The PySide project provides LGPL-licensed Python bindings for the Qt
cross-platform application and UI framework. PySide Qt bindings allow both free
open source and proprietary software development and ultimately aim to support
all of the platforms as Qt itself.

%package devel
Summary:        PySide - python bindings for Qt
Group:          Development/Languages/Python
Requires:       %{name} = %{version}
Requires:       libqt4-devel
Requires:       libshiboken-python3-devel
# cmake can not handle both, python2 and python3 versions at the same time.
Conflicts:      python-pyside-devel

%description devel
The PySide project provides LGPL-licensed Python bindings for the Qt
cross-platform application and UI framework. PySide Qt bindings allow both free
open source and proprietary software development and ultimately aim to support
all of the platforms as Qt itself.

This package contains all the developer tools you need to create your own PyQt
applications.

%prep
%setup -q -n PySide-%{version}
%patch0 -p1

%build
%cmake -DCMAKE_BUILD_TYPE=Debug \
       -DBUILD_TESTS=FALSE \
       -DUSE_PYTHON3=1 \
       -DENABLE_VERSION_SUFFIX=TRUE \
       -DQT_PHONON_INCLUDE_DIR=%{_includedir}/phonon
make %{?_smp_mflags}
ctest -R qtcore || true

%install
cd build
make DESTDIR=%{buildroot} install %{?_smp_mflags}
%fdupes %{buildroot}

%post   -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc COPYING
%{_libdir}/libpyside-*.so.*
%{python3_sitearch}/PySide-*/
%{python3_sitearch}/PySide/
%{_datadir}/PySide-*/

%files devel
%defattr(-,root,root)
%{_includedir}/PySide-*/
%{_libdir}/libpyside-*.so
%{_libdir}/cmake/PySide-%{version}/
%{_libdir}/pkgconfig/pyside-*.pc

%changelog
openSUSE Build Service is sponsored by