Blame SPECS/pygobject3.spec

d6ff17
# Last updated for version 3.7.5.1
d6ff17
%define glib2_version                  2.35.7
d6ff17
%define gobject_introspection_version  1.34.2
d6ff17
%define python2_version                2.3.5
d6ff17
d6ff17
%if 0%{?fedora} > 12
d6ff17
%global with_python3 1
d6ff17
%define python3_version                3.1
d6ff17
%endif
d6ff17
d6ff17
%if 1
d6ff17
  # Verbose build
d6ff17
  %global verbosity V=1
d6ff17
%else
d6ff17
  # Quiet build
d6ff17
  %global verbosity %{nil}
d6ff17
%endif
d6ff17
d6ff17
%global with_check 1
d6ff17
d6ff17
### Abstract ###
d6ff17
d6ff17
Name: pygobject3
d6ff17
Version: 3.8.2
cb0639
Release: 6%{?dist}
d6ff17
License: LGPLv2+ and MIT
d6ff17
Group: Development/Languages
d6ff17
Summary: Python 2 bindings for GObject Introspection
d6ff17
URL: https://live.gnome.org/PyGObject
d6ff17
#VCS: git:git://git.gnome.org/pygobject
d6ff17
Source: http://ftp.gnome.org/pub/GNOME/sources/pygobject/3.8/pygobject-%{version}.tar.xz
d6ff17
d6ff17
# Add these additional exclusions to the pep8 rules in "make check":
d6ff17
#   E127 continuation line over-indented for visual indent
d6ff17
# Not yet sent upstream
d6ff17
Patch1: ignore-more-pep8-errors.patch
d6ff17
d6ff17
# Mark some tests as known to fail; currently:
d6ff17
#
d6ff17
# On i686:
d6ff17
#  ======================================================================
d6ff17
#  FAIL: test_strv (test_gi.TestPropertiesObject)
d6ff17
#  ----------------------------------------------------------------------
d6ff17
#  Traceback (most recent call last):
d6ff17
#    File "/builddir/build/BUILD/pygobject-3.3.4/tests/test_gi.py", line 2205, in test_strv
d6ff17
#      self.assertEqual(self.obj.props.some_strv, ['hello', 'world'])
d6ff17
#  AssertionError: Lists differ: ['hello'] != ['hello', 'world']
d6ff17
#  Second list contains 1 additional elements.
d6ff17
#  First extra element 1:
d6ff17
#  world
d6ff17
#  - ['hello']
d6ff17
#  + ['hello', 'world']
d6ff17
#  ----------------------------------------------------------------------
d6ff17
#
d6ff17
# Intermittently:
d6ff17
#  ======================================================================
d6ff17
#  FAIL: test_python_calls_sync (test_gdbus.TestGDBusClient)
d6ff17
#  ----------------------------------------------------------------------
d6ff17
#  Traceback (most recent call last):
d6ff17
#    File "/builddir/build/BUILD/pygobject-3.3.4/tests/test_gdbus.py", line 140, in test_python_calls_sync
d6ff17
#      self.assertTrue('Timeout' in str(e), str(e))
d6ff17
#  AssertionError: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not get PID of name '1': no such name
d6ff17
#  ----------------------------------------------------------------------
d6ff17
#
d6ff17
# Not yet sent upstream
d6ff17
Patch2: pygobject-3.3.4-known-failures.patch
d6ff17
d6ff17
# Add regression test for rhbz#842880
d6ff17
# Not yet sent upstream:
d6ff17
Patch3: test-list-marshalling.patch
d6ff17
d6ff17
# Disable a test that still fails on ppc64 (see
d6ff17
#   https://bugzilla.redhat.com/show_bug.cgi?id=924425#c7 )
d6ff17
# Filed upstream as:
d6ff17
#  https://bugzilla.gnome.org/show_bug.cgi?id=697138
d6ff17
Patch5: pygobject-3.8.0-known-failures.txt
d6ff17
cb0639
# Re-add support for passing GValue's by reference
cb0639
# https://bugzilla.gnome.org/show_bug.cgi?id=701058
cb0639
Patch6: pygobject-3.8.2-pass-gvalues-by-reference.patch
cb0639
cb0639
# Fix memory leak for caller allocated GValue out arguments
cb0639
# https://bugzilla.gnome.org/show_bug.cgi?id=709397
cb0639
Patch7: pygobject-3.8.2-gvalue-memory-leak.patch
cb0639
d6ff17
### Build Dependencies ###
d6ff17
d6ff17
BuildRequires: chrpath
d6ff17
BuildRequires: glib2-devel >= %{glib2_version}
d6ff17
BuildRequires: gobject-introspection-devel >= %{gobject_introspection_version}
d6ff17
BuildRequires: python2-devel >= %{python2_version}
d6ff17
%if 0%{?with_python3}
d6ff17
BuildRequires: python3-devel >= %{python3_version}
d6ff17
BuildRequires: python3-cairo-devel
d6ff17
%endif # if with_python3
d6ff17
d6ff17
BuildRequires: cairo-gobject-devel
d6ff17
BuildRequires: pycairo-devel
d6ff17
d6ff17
# Required by the upstream selftest suite:
d6ff17
%if %{with_check}
d6ff17
%if 0%{?fedora}
d6ff17
# Temporarily disabled pyflakes tests to avoid the build failing due to too new
d6ff17
# pyflakes 0.7.2 in F19
d6ff17
# https://bugzilla.gnome.org/show_bug.cgi?id=701009
d6ff17
#BuildRequires: pyflakes
d6ff17
BuildRequires: python-pep8
d6ff17
%endif
d6ff17
## for the Gdk and Gtk typelibs, used during the test suite:
d6ff17
BuildRequires: gtk3
d6ff17
## for xvfb-run:
d6ff17
BuildRequires: xorg-x11-server-Xvfb
d6ff17
BuildRequires: dejavu-sans-fonts
d6ff17
BuildRequires: dejavu-sans-mono-fonts
d6ff17
BuildRequires: dejavu-serif-fonts
d6ff17
## for dbus-launch, used by test_gdbus:
d6ff17
BuildRequires: dbus-x11
d6ff17
%endif # with_check
d6ff17
d6ff17
Requires: %{name}-base = %{version}-%{release}
d6ff17
d6ff17
# The cairo override module depends on this
d6ff17
Requires: pycairo
d6ff17
d6ff17
%description
d6ff17
The %{name} package provides a convenient wrapper for the GObject library
d6ff17
for use in Python programs.
d6ff17
d6ff17
%package base
d6ff17
Summary: Python 2 bindings for GObject Introspection base package
d6ff17
Group: Development/Languages
d6ff17
Requires: gobject-introspection >= %{gobject_introspection_version}
d6ff17
d6ff17
%description base
d6ff17
This package provides the non-cairo specific bits of the GObject Introspection
d6ff17
library.
d6ff17
d6ff17
%package devel
d6ff17
Summary: Development files for embedding PyGObject introspection support
d6ff17
Group: Development/Languages
d6ff17
Requires: %{name} = %{version}-%{release}
d6ff17
Requires: glib2-devel
d6ff17
Requires: gobject-introspection-devel
d6ff17
Requires: pkgconfig
d6ff17
d6ff17
%description devel
d6ff17
This package contains files required to embed PyGObject
d6ff17
d6ff17
%if 0%{?with_python3}
d6ff17
%package -n python3-gobject
d6ff17
Summary: Python 3 bindings for GObject Introspection
d6ff17
Group: Development/Languages
d6ff17
d6ff17
# The cairo override module depends on this
d6ff17
Requires: python3-cairo
d6ff17
Requires: gobject-introspection >= %{gobject_introspection_version}
d6ff17
d6ff17
%description -n python3-gobject
d6ff17
The python3-gobject package provides a convenient wrapper for the GObject 
d6ff17
library and and other libraries that are compatible with GObject Introspection, 
d6ff17
for use in Python 3 programs.
d6ff17
d6ff17
%endif # with_python3
d6ff17
d6ff17
%prep
d6ff17
%setup -q -n pygobject-%{version}
d6ff17
%patch1 -p1 -b .ignore-more-pep8-errors
d6ff17
%patch2 -p1 -b .known-failures
d6ff17
%patch3 -p1 -b .test-list-marshalling
d6ff17
%patch5 -p1
cb0639
%patch6 -p1 -b .pass-gvalues-by-reference
cb0639
%patch7 -p1 -b .gvalue-memory-leak
d6ff17
d6ff17
%if 0%{?with_python3}
d6ff17
rm -rf %{py3dir}
d6ff17
cp -a . %{py3dir}
d6ff17
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
d6ff17
%endif # with_python3
d6ff17
d6ff17
find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python}|'
d6ff17
d6ff17
%build
d6ff17
PYTHON=%{__python} 
d6ff17
export PYTHON
d6ff17
%configure
d6ff17
make %{?_smp_mflags} %{verbosity}
d6ff17
d6ff17
%if 0%{?with_python3}
d6ff17
pushd %{py3dir}
d6ff17
PYTHON=%{__python3}
d6ff17
export PYTHON
d6ff17
%configure
d6ff17
make %{_smp_mflags} %{verbosity}
d6ff17
popd
d6ff17
%endif # with_python3
d6ff17
d6ff17
%install
d6ff17
%if 0%{?with_python3}
d6ff17
pushd %{py3dir}
d6ff17
PYTHON=%{__python3}
d6ff17
export PYTHON
d6ff17
make DESTDIR=$RPM_BUILD_ROOT install %{verbosity}
d6ff17
popd
d6ff17
d6ff17
chrpath --delete $RPM_BUILD_ROOT%{python3_sitearch}/gi/{*.so,*/*.so}
d6ff17
d6ff17
%endif # with_python3
d6ff17
d6ff17
make DESTDIR=$RPM_BUILD_ROOT install %{verbosity}
d6ff17
find $RPM_BUILD_ROOT -name '*.la' -delete
d6ff17
find $RPM_BUILD_ROOT -name '*.a' -delete
d6ff17
d6ff17
chrpath --delete $RPM_BUILD_ROOT%{python_sitearch}/gi/{*.so,*/*.so}
d6ff17
d6ff17
# Don't include makefiles in the installed docs, in order to avoid creating
d6ff17
# multilib conflicts
d6ff17
rm -rf _docs
d6ff17
mkdir _docs
d6ff17
cp -a examples _docs
d6ff17
rm _docs/examples/Makefile*
d6ff17
d6ff17
%check
d6ff17
d6ff17
%if %{with_check}
d6ff17
# Run the selftests under a temporary xvfb X server (so that they can
d6ff17
# initialize Gdk etc):
d6ff17
d6ff17
# FIXME: disabled for python3
d6ff17
# Currently this fails with python3 with:
d6ff17
#  File "/builddir/build/BUILD/python3-pygobject3-3.3.4-4.fc19/gi/__init__.py", line 23, in <module>
d6ff17
#    from ._gi import _API, Repository
d6ff17
#ValueError: level must be >= 0
d6ff17
# Reported upstream as http://bugs.python.org/issue15610
d6ff17
%if 0
d6ff17
pushd %{py3dir}
d6ff17
PYTHON=%{__python3}
d6ff17
export PYTHON
d6ff17
xvfb-run make DESTDIR=$RPM_BUILD_ROOT check %{verbosity}
d6ff17
popd
d6ff17
%endif # with_python3
d6ff17
d6ff17
xvfb-run make DESTDIR=$RPM_BUILD_ROOT check %{verbosity}
d6ff17
d6ff17
%endif # with_check
d6ff17
d6ff17
%post -p /sbin/ldconfig
d6ff17
d6ff17
%postun -p /sbin/ldconfig
d6ff17
d6ff17
%files
d6ff17
%defattr(644, root, root, 755)
d6ff17
%{python_sitearch}/gi/_gi_cairo.so
d6ff17
d6ff17
%files base
d6ff17
%defattr(644, root, root, 755)
d6ff17
%doc AUTHORS NEWS README COPYING
d6ff17
%{_libdir}/libpyglib-gi-2.0-python.so*
d6ff17
%dir %{python_sitearch}/gi
d6ff17
%{python_sitearch}/gi/*
d6ff17
%exclude %{python_sitearch}/gi/_gi_cairo.so
d6ff17
%{python_sitearch}/pygobject-*.egg-info
d6ff17
%{python_sitearch}/pygtkcompat/
d6ff17
d6ff17
%files devel
d6ff17
%defattr(644, root, root, 755)
d6ff17
%doc _docs/*
d6ff17
%dir %{_includedir}/pygobject-3.0/
d6ff17
%{_includedir}/pygobject-3.0/pygobject.h
d6ff17
%{_libdir}/pkgconfig/pygobject-3.0.pc
d6ff17
d6ff17
%if 0%{?with_python3}
d6ff17
%files -n python3-gobject
d6ff17
%defattr(644, root, root, 755)
d6ff17
%doc AUTHORS NEWS README COPYING
d6ff17
%{_libdir}/libpyglib-gi-2.0-python3.so*
d6ff17
%dir %{python3_sitearch}/gi
d6ff17
%{python3_sitearch}/gi/*
d6ff17
%{python3_sitearch}/pygobject-*.egg-info
d6ff17
%{python3_sitearch}/pygtkcompat/
d6ff17
d6ff17
%endif # with_python3
d6ff17
d6ff17
%changelog
cb0639
* Fri Sep 26 2014 Matthew Barnes <mbarnes@redhat.com> - 3.8.2-6
cb0639
- Fix memory leak for caller allocated GValue out arguments.
cb0639
- Resolves: rhbz#1015413
cb0639
cb0639
* Mon Sep 15 2014 Matthew Barnes <mbarnes@redhat.com> - 3.8.2-5
cb0639
- Re-add support for passing GValue's by reference.
cb0639
- Resolves: rhbz#1138372
cb0639
53e87c
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 3.8.2-4
53e87c
- Mass rebuild 2014-01-24
53e87c
53e87c
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 3.8.2-3
53e87c
- Mass rebuild 2013-12-27
53e87c
d6ff17
* Thu Sep  5 2013 Paul W. Frields <pfrields@redhat.com> - 3.8.2-2.1
d6ff17
- Rebuild for ppc64 (rhbz #978762)
d6ff17
d6ff17
* Sun Jun 02 2013 Kalev Lember <kalevlember@gmail.com> - 3.8.2-2
d6ff17
- Disable pyflakes tests to avoid failures with too new pyflakes 0.7.2
d6ff17
d6ff17
* Mon May 13 2013 Richard Hughes <rhughes@redhat.com> - 3.8.2-1
d6ff17
- Update to 3.8.2
d6ff17
d6ff17
* Thu Apr 25 2013 Peter Robinson <pbrobinson@fedoraproject.org> 3.8.1-2
d6ff17
- Add upstream patch to fix Sugar (RHBZ 947538)
d6ff17
d6ff17
* Mon Apr 15 2013 Kalev Lember <kalevlember@gmail.com> - 3.8.1-1
d6ff17
- Update to 3.8.1
d6ff17
d6ff17
* Tue Apr  2 2013 David Malcolm <dmalcolm@redhat.com> - 3.8.0-2
d6ff17
- add workarounds for ppc64 (rhbz#924425)
d6ff17
d6ff17
* Tue Mar 26 2013 Kalev Lember <kalevlember@gmail.com> - 3.8.0-1
d6ff17
- Update to 3.8.0
d6ff17
d6ff17
* Wed Mar 20 2013 Kalev Lember <kalevlember@gmail.com> - 3.7.92-1
d6ff17
- Update to 3.7.92
d6ff17
d6ff17
* Thu Mar  7 2013 Matthias Clasen <mclasen@redhat.com> - 3.7.91-1
d6ff17
- Update to 3.7.91
d6ff17
d6ff17
* Thu Feb 21 2013 Kalev Lember <kalevlember@gmail.com> - 3.7.90-1
d6ff17
- Update to 3.7.90
d6ff17
d6ff17
* Wed Feb 06 2013 Kalev Lember <kalevlember@gmail.com> - 3.7.5.1-1
d6ff17
- Update to 3.7.5.1
d6ff17
- Re-enable tests
d6ff17
d6ff17
* Wed Jan 16 2013 Matthias Clasen <mclasen@redhat.com> - 3.7.4-1
d6ff17
- Update to 3.7.4
d6ff17
d6ff17
* Fri Dec 28 2012 Dan HorĂ¡k <dan[at]danny.cz> - 3.7.3-2
d6ff17
- Fix GBytes test (gnome#690837)
d6ff17
d6ff17
* Thu Dec 20 2012 Kalev Lember <kalevlember@gmail.com> - 3.7.3-1
d6ff17
- Update to 3.7.3
d6ff17
- Drop upstreamed patches; rebase the ignore-more-pep8-errors patch
d6ff17
d6ff17
* Thu Dec 13 2012 Ray Strode <rstrode@redhat.com> 3.7.1-3
d6ff17
- Split non-cairo parts into a subpackage
d6ff17
d6ff17
* Mon Nov 12 2012 Kalev Lember <kalevlember@gmail.com> - 3.7.1-2
d6ff17
- Remove lib64 rpaths (#817701)
d6ff17
- Move code examples to the -devel subpackage and fix the multilib
d6ff17
  conflict (#831434)
d6ff17
d6ff17
* Fri Nov 09 2012 Kalev Lember <kalevlember@gmail.com> - 3.7.1-1
d6ff17
- Update to 3.7.1
d6ff17
d6ff17
* Tue Nov  6 2012 Daniel Drake <dsd@laptop.org> - 3.4.1.1-2
d6ff17
- Upstream fix for property lookup; needed for basic Sugar operation.
d6ff17
d6ff17
* Wed Oct 17 2012 Kalev Lember <kalevlember@gmail.com> - 3.4.1.1-1
d6ff17
- Update to 3.4.1.1
d6ff17
d6ff17
* Thu Sep 13 2012 Daniel Drake <dsd@laptop.org> - 3.3.91-1
d6ff17
- Latest version; upstreamed patches dropped
d6ff17
d6ff17
* Wed Aug 15 2012 David Malcolm <dmalcolm@redhat.com> - 3.3.4-9
d6ff17
- avoid dragging pyflakes and python-pep8 into RHEL (patch 7)
d6ff17
d6ff17
* Fri Aug 10 2012 David Malcolm <dmalcolm@redhat.com> - 3.3.4-8
d6ff17
- add endianness patch (rhbz#841596; attachment 603634)
d6ff17
d6ff17
* Fri Aug 10 2012 David Malcolm <dmalcolm@redhat.com> - 3.3.4-7
d6ff17
- update endianness patch for rhbz#841596 (to attachment 603367)
d6ff17
d6ff17
* Thu Aug  9 2012 David Malcolm <dmalcolm@redhat.com> - 3.3.4-6
d6ff17
- fix issues on big-endian 64-bit machines (rhbz#841596, rhbz#842880)
d6ff17
d6ff17
* Thu Aug  9 2012 David Malcolm <dmalcolm@redhat.com> - 3.3.4-5
d6ff17
- use xvfb-run in selftests; update known failures
d6ff17
d6ff17
* Wed Aug  8 2012 David Malcolm <dmalcolm@redhat.com> - 3.3.4-4
d6ff17
- add a %%check check; add V=1 to all make invocations
d6ff17
d6ff17
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 3.3.4-3
d6ff17
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
d6ff17
d6ff17
* Fri Aug  3 2012 David Malcolm <dmalcolm@redhat.com> - 3.3.4-2
d6ff17
- remove rhel logic from with_python3 conditional
d6ff17
d6ff17
* Tue Jul 17 2012 Richard Hughes <hughsient@gmail.com> - 3.3.4-1
d6ff17
- Update to 3.3.4
d6ff17
d6ff17
* Tue Jun 26 2012 David Malcolm <dmalcolm@redhat.com> - 3.3.3.1-2
d6ff17
- fix a segfault when dealing with mismatched .so/typelib files
d6ff17
d6ff17
* Mon Jun 25 2012 Peter Robinson <pbrobinson@fedoraproject.org> - 3.3.3.1-1
d6ff17
- Update to 3.3.3.1
d6ff17
d6ff17
* Tue Jun 19 2012 Kalev Lember <kalevlember@gmail.com> - 3.3.2-1
d6ff17
- Update to 3.3.2
d6ff17
d6ff17
* Sat May 05 2012 Kalev Lember <kalevlember@gmail.com> - 3.3.1-1
d6ff17
- Update to 3.3.1
d6ff17
- Dropped the now unneeded -lm patch
d6ff17
d6ff17
* Tue Mar 27 2012 Kalev Lember <kalevlember@gmail.com> - 3.2.0-1
d6ff17
- Update to 3.2.0
d6ff17
d6ff17
* Thu Mar 22 2012 Matthias Clasen <mclasen@redhat.com> - 3.1.93-1
d6ff17
- Update to 3.1.93
d6ff17
d6ff17
* Wed Mar 21 2012 Kalev Lember <kalevlember@gmail.com> - 3.1.92-1
d6ff17
- Update to 3.1.92
d6ff17
d6ff17
* Sun Feb 26 2012 Matthias Clasen <mclasen@redhat.com> - 3.1.1-1
d6ff17
- Update to 3.1.1
d6ff17
d6ff17
* Tue Feb  7 2012 Matthias Clasen <mclasen@redhat.com> - 3.1.0-1
d6ff17
- Update to 3.1.0
d6ff17
d6ff17
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.3-2
d6ff17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
d6ff17
d6ff17
* Tue Dec 20 2011 Ignacio Casal Quinteiro <icq@gnome.org> - 3.0.3-1
d6ff17
- udpate to 3.0.3
d6ff17
d6ff17
* Sat Oct 22 2011 Ignacio Casal Quinteiro <icq@gnome.org> - 3.0.2-1
d6ff17
- udpate to 3.0.2
d6ff17
d6ff17
* Fri Sep 30 2011 Ignacio Casal Quinteiro <icq@gnome.org> - 3.0.1-1
d6ff17
- udpate to 3.0.1
d6ff17
d6ff17
* Tue Sep 20 2011 Matthias Clasen <mclasen@redhat.com> - 3.0.0-1
d6ff17
- Update to 3.0.0
d6ff17
d6ff17
* Thu Sep 15 2011 John (J5) Palmieri <johnp@gnome.org> - 2.90.4-1
d6ff17
- update to 2.90.4
d6ff17
- get rid of packaging cruft that is taken care of by upstream now
d6ff17
d6ff17
* Wed Aug 31 2011 Ignacio Casal Quinteiro <icq@gnome.org> - 2.90.3-1
d6ff17
- udpate to 2.90.3
d6ff17
d6ff17
* Thu Aug 22 2011 John (J5) Palmieri <johnp@redhat.com> - 2.90.2-3
d6ff17
- remove some old requires
d6ff17
d6ff17
* Thu Aug 19 2011 John (J5) Palmieri <johnp@redhat.com> - 2.90.2-2
d6ff17
- fix up issues uncovered during package review
d6ff17
- disable docs because they still reference the static bindings 
d6ff17
  and upstream is working on new documentation
d6ff17
d6ff17
* Thu Aug 18 2011 John (J5) Palmieri <johnp@redhat.com> - 2.90.2-1
d6ff17
- Initial package