Blob Blame Raw
Name:           shiboken
Version:        1.2.4
Release:        12%{?dist}
Summary:        CPython bindings generator for C++ libraries

License:        GPLv2
URL:            http://www.pyside.org
Source0:        https://github.com/PySide/Shiboken/archive/%{version}/%{name}-%{version}.tar.gz
Patch1:         shiboken-1.2.4-simplefile-test.patch
Patch2:         shiboken-1.2.4-fix-collector_external_operator_test.patch.patch
# Find new versions of python3, fix a couple tests
Patch3:         shiboken-python3.patch

BuildRequires:  cmake gcc-c++
BuildRequires:  apiextractor-devel
BuildRequires:  generatorrunner-devel
BuildRequires:  python2-devel
BuildRequires:  python%{python3_pkgversion}-devel
BuildRequires:  python3-sphinx
BuildRequires:  qt4-devel
BuildRequires:  sparsehash-devel
BuildRequires:  libxslt-devel

# Default version
Requires:       %{name}-python2-libs%{?_isa} = %{version}-%{release}
# for %%{_libdir}/generatorrunner/
Requires:       generatorrunner

%description
Shiboken is a bindings generator for C++ libraries that outputs CPython
source code. It uses generatorrunner and apiextractor to collect information
from library headers, merging modifications and handwritten code defined in the
type system description.

Shiboken is the binding generator used to create the PySide bindings.


%package        python2-libs
Summary:        CPython bindings generator for C++ libraries - shared library
License:        LGPLv2 with exceptions
Provides:       %{name}-libs = %{version}-%{release}
Provides:       %{name}-libs%{?_isa} = %{version}-%{release}
Obsoletes:      %{name}-libs < 1.2.4-8

%description    python2-libs
Shiboken is a bindings generator for C++ libraries that outputs CPython
source code. It uses generatorrunner and apiextractor to collect information
from library headers, merging modifications and handwritten code defined in the
type system description.

This is the shared library used by shiboken built with Python 2.


%package        python2-devel
Summary:        Development files for %{name}
License:        GPLv2 and LGPLv2 with exceptions
Requires:       %{name} = %{version}-%{release}
Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
Requires:       cmake
Requires:       python2-devel
Provides:       %{name}-devel = %{version}-%{release}
Provides:       %{name}-devel%{?_isa} = %{version}-%{release}
Obsoletes:      %{name}-devel < 1.2.4-8

%description    python2-devel
The %{name}-python2-devel package contains libraries and header files for
developing applications that link against %{name} and use Python 2.


%package        python%{python3_pkgversion}-libs
Summary:        CPython bindings generator for C++ libraries - shared library
License:        LGPLv2 with exceptions

%description    python%{python3_pkgversion}-libs
Shiboken is a bindings generator for C++ libraries that outputs CPython
source code. It uses generatorrunner and apiextractor to collect information
from library headers, merging modifications and handwritten code defined in the
type system description.

This is the shared library used by shiboken built with Python %{python3_version}.

%package        python%{python3_pkgversion}-devel
Summary:        Development files for %{name}
License:        GPLv2 and LGPLv2 with exceptions
Requires:       %{name}-python%{python3_pkgversion}-libs%{?_isa} = %{version}-%{release}
Requires:       cmake
Requires:       python%{python3_pkgversion}-devel

%description    python%{python3_pkgversion}-devel
The %{name}-python%{python3_pkgversion}-devel package contains libraries and header files for
developing applications that link against %{name} and use Python %{python3_version}.


%prep
%autosetup -p1 -n Shiboken-%{version}
# Build against sparsehash package
rm -rf ext/sparsehash/


%build
mkdir -p build-python2
pushd build-python2
%cmake ..
%make_build

# Build html docs
%make_build doc
rm -f doc/html/_static/images/._*
rm -f doc/html/.buildinfo
rm -f doc/html/objects.inv
rm -rf doc/html/.doctrees
popd

mkdir -p build-python3
pushd build-python3
%cmake .. -DUSE_PYTHON3=yes     
%make_build
popd


%install
%make_install -C build-python3
mv %{buildroot}%{_libdir}/pkgconfig/shiboken{,-python3}.pc
%make_install -C build-python2
mv %{buildroot}%{_libdir}/pkgconfig/shiboken{,-python2}.pc
# Link to default
ln -s shiboken-python2.pc %{buildroot}%{_libdir}/pkgconfig/shiboken.pc


%check
make test -C build-python2
make test -C build-python3


%ldconfig_scriptlets python2-libs

%ldconfig_scriptlets python%{python3_pkgversion}-libs


%files
%doc COPYING
%{_bindir}/shiboken
%{_mandir}/man1/shiboken.1*

%files python2-libs
%doc COPYING.libshiboken
%{_libdir}/libshiboken-python%{python2_version}.so.*
%{python2_sitearch}/shiboken.so

%files python2-devel
%doc COPYING.libsample build-python2/doc/html/
%{_includedir}/shiboken/
%{_libdir}/libshiboken-python%{python2_version}.so
%{_libdir}/pkgconfig/shiboken.pc
%{_libdir}/pkgconfig/shiboken-python2.pc
%dir %{_libdir}/cmake/Shiboken-%{version}
%{_libdir}/cmake/Shiboken-%{version}/ShibokenConfig.cmake
%{_libdir}/cmake/Shiboken-%{version}/ShibokenConfig-python%{python2_version}.cmake
%{_libdir}/cmake/Shiboken-%{version}/ShibokenConfigVersion.cmake

%files python%{python3_pkgversion}-libs
%doc COPYING.libshiboken
%{python3_sitearch}/shiboken.so
%{_libdir}/libshiboken.cpython-%{python3_pkgversion}*.so.1.2*

%files python%{python3_pkgversion}-devel
%{_includedir}/shiboken/
%{_libdir}/libshiboken.cpython-%{python3_pkgversion}*.so
%{_libdir}/pkgconfig/shiboken-python3.pc
%dir %{_libdir}/cmake/Shiboken-%{version}
%{_libdir}/cmake/Shiboken-%{version}/ShibokenConfig.cpython-3*.cmake
%{_libdir}/cmake/Shiboken-%{version}/ShibokenConfigVersion.cmake


%changelog
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.4-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.4-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Tue Jun 19 2018 Miro HronĨok <mhroncok@redhat.com> - 1.2.4-10
- Rebuilt for Python 3.7

* Fri Feb 09 2018 Orion Poplawski <orion@nwra.com> - 1.2.4-9
- Build for python 3
- Add BR for libxslt to enable support for doc strings

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.4-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Thu Feb 01 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.2.4-7
- Update Python 2 dependency declarations to new packaging standards
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.4-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Sat Jul 08 2017 Felix Schwarz <fschwarz@fedoraproject.org> - 1.2.4-5
- fix flaky arm tests with Debian patch (rhbz 1424433)

* Mon May 15 2017 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Mon Dec 26 2016 Felix Schwarz <fschwarz@fedoraproject.org> - 1.2.4-2
- disable a failing test on ARM

* Tue Aug 23 2016 Felix Schwarz <fschwarz@fedoraproject.org> - 1.2.4-1
- Update to 1.2.4

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.2-5
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Mon Jun 09 2014 Jaroslav Reznik <jreznik@redhat.com> - 1.2.2-1
- Update to 1.2.2

* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Tue Sep 03 2013 Rex Dieter <rdieter@fedoraproject.org> 1.2.1-1
- 1.2.1

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Fri Jul 27 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Sat Jan 21 2012 Kalev Lember <kalevlember@gmail.com> - 1.1.0-1
- Update to 1.1.0

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.9-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Wed Oct 26 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.9-2
- Rebuilt for glibc bug#747377

* Fri Oct 21 2011 Kalev Lember <kalevlember@gmail.com> - 1.0.9-1
- Update to 1.0.9

* Thu Aug 25 2011 Kalev Lember <kalevlember@gmail.com> - 1.0.6-1
- Update to 1.0.6

* Thu Jun 23 2011 Kalev Lember <kalev@smartlink.ee> - 1.0.4-1
- Update to 1.0.4
- Cleaned up the spec file for modern rpmbuild

* Fri May 27 2011 Kalev Lember <kalev@smartlink.ee> - 1.0.3-1
- Update to 1.0.3

* Sun May 01 2011 Kalev Lember <kalev@smartlink.ee> - 1.0.2-1
- Update to 1.0.2

* Sun Apr 03 2011 Kalev Lember <kalev@smartlink.ee> - 1.0.1-1
- Update to 1.0.1

* Thu Mar 03 2011 Kalev Lember <kalev@smartlink.ee> - 1.0.0-1
- Update to 1.0.0

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-0.4.beta4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Sat Jan 22 2011 Kalev Lember <kalev@smartlink.ee> - 1.0.0-0.3.beta4
- Update to 1.0.0~beta4

* Sat Nov 27 2010 Kalev Lember <kalev@smartlink.ee> - 1.0.0-0.2.beta1
- Removed spurious objects.inv file from html docs

* Fri Nov 26 2010 Kalev Lember <kalev@smartlink.ee> - 1.0.0-0.1.beta1
- Update to 1.0.0~beta1

* Thu Oct 14 2010 Kalev Lember <kalev@smartlink.ee> - 0.5.1-1
- Update to 0.5.1
- Dropped upstreamed pkgconfig patch

* Wed Sep 29 2010 jkeating - 0.5.0-3
- Rebuilt for gcc bug 634757

* Sat Sep 11 2010 Kalev Lember <kalev@smartlink.ee> - 0.5.0-2
- Added patch to fix pkgconfig file generation

* Sat Sep 11 2010 Kalev Lember <kalev@smartlink.ee> - 0.5.0-1
- Update to 0.5.0
- Dropped upstreamed patches

* Wed Aug 04 2010 Kalev Lember <kalev@smartlink.ee> - 0.4.0-1
- Update to 0.4.0
- Backport patch to fix tests with Python 2.7

* Mon Aug 02 2010 Kalev Lember <kalev@smartlink.ee> - 0.3.2-6
- Temporarily disable tests to fix build with Python 2.7

* Sat Jul 31 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 0.3.2-5
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Sat Jul 24 2010 Kalev Lember <kalev@smartlink.ee> - 0.3.2-4
- Explicitly require generatorrunner for %%{_libdir}/generatorrunner/ directory
  ownership (#609738)

* Sat Jul 24 2010 Kalev Lember <kalev@smartlink.ee> - 0.3.2-3
- Require python2-devel in devel package as the public headers include Python.h

* Sat Jul 24 2010 Kalev Lember <kalev@smartlink.ee> - 0.3.2-2
- BR sparsehash-devel instead of sparsehash (#609738)

* Thu Jul 01 2010 Kalev Lember <kalev@smartlink.ee> - 0.3.2-1
- Initial RPM release