disable introspection in anticipation of pygobject3

- https://bugzilla.redhat.com/show_bug.cgi?id=731851
- pygobject2 now becomes legacy for static binding support (e.g. PyGTK)
This commit is contained in:
John (J5) Palmieri 2011-08-18 16:12:19 -04:00
parent 699c3f1577
commit 7ce230267b

View File

@ -1,18 +1,13 @@
# Last updated for version 2.21.0
%define glib2_version 2.22.4
%define gobject_introspection_version 0.10.8
%define python2_version 2.3.5
%if 0%{?fedora} > 12 || 0%{?rhel} > 6
%global with_python3 1
%define python3_version 3.1
%endif
### Abstract ###
Name: pygobject2
Version: 2.28.6
Release: 1%{?dist}
Release: 2%{?dist}
License: LGPLv2+
Group: Development/Languages
Summary: Python 2 bindings for GObject
@ -26,22 +21,11 @@ Source: http://ftp.gnome.org/pub/GNOME/sources/pygobject/2.28/pygobject-%{versio
### Build Dependencies ###
BuildRequires: glib2-devel >= %{glib2_version}
BuildRequires: gobject-introspection-devel >= %{gobject_introspection_version}
BuildRequires: python2-devel >= %{python2_version}
%if 0%{?with_python3}
BuildRequires: python3-devel >= %{python3_version}
BuildRequires: python3-cairo-devel
%endif # if with_python3
BuildRequires: pycairo-devel
# Bootstrap requirements
BuildRequires: automake autoconf libtool
# The cairo override module depends on this
Requires: pycairo
Requires: gobject-introspection >= %{gobject_introspection_version}
%description
The %{name} package provides a convenient wrapper for the GObject library
for use in Python programs.
@ -60,7 +44,6 @@ Requires: %{name} = %{version}-%{release}
Requires: %{name}-codegen = %{version}-%{release}
Requires: %{name}-doc = %{version}-%{release}
Requires: glib2-devel
Requires: gobject-introspection-devel
Requires: pkgconfig
%description devel
@ -74,59 +57,20 @@ Group: Development/Languages
%description doc
This package contains documentation files for %{name}.
%if 0%{?with_python3}
%package -n python3-gobject
Summary: Python 3 bindings for GObject and GObject Introspection
Group: Development/Languages
# The cairo override module depends on this
#Requires: python3-cairo
Requires: gobject-introspection >= %{gobject_introspection_version}
%description -n python3-gobject
The python3-gobject package provides a convenient wrapper for the GObject
library and and other libraries that are compatible with GObject Introspection,
for use in Python 3 programs.
%endif # with_python3
%prep
%setup -q -n pygobject-%{version}
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
%endif # with_python3
find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python}|'
%build
PYTHON=%{__python}
export PYTHON
%configure
%configure --disable-introspection
make %{?_smp_mflags}
%if 0%{?with_python3}
pushd %{py3dir}
PYTHON=%{__python3}
export PYTHON
%configure
make
popd
%endif # with_python3
%install
rm -rf $RPM_BUILD_ROOT
%if 0%{?with_python3}
pushd %{py3dir}
PYTHON=%{__python3}
export PYTHON
make DESTDIR=$RPM_BUILD_ROOT install
popd
%endif # with_python3
make DESTDIR=$RPM_BUILD_ROOT install
find $RPM_BUILD_ROOT -name '*.la' -delete
find $RPM_BUILD_ROOT -name '*.a' -delete
@ -142,13 +86,11 @@ rm examples/Makefile*
%dir %{python_sitearch}/gtk-2.0
%dir %{python_sitearch}/gobject
%dir %{python_sitearch}/glib
%dir %{python_sitearch}/gi
%{python_sitearch}/gtk-2.0/*
%{python_sitearch}/pygtk.*
%{python_sitearch}/gobject/*
%{python_sitearch}/glib/*
%{python_sitearch}/gi/*
%files codegen
%defattr(755, root, root, 755)
@ -171,28 +113,12 @@ rm examples/Makefile*
%{_datadir}/gtk-doc/html/pygobject
%{_datadir}/pygobject/xsl
%if 0%{?with_python3}
%files -n python3-gobject
%defattr(644, root, root, 755)
%doc AUTHORS NEWS README
%doc examples
%{_libdir}/libpyglib-2.0-python3.so*
%dir %{python3_sitearch}/gtk-2.0
%dir %{python3_sitearch}/glib
%dir %{python3_sitearch}/gi
%{python3_sitearch}/gtk-2.0/*
%{python3_sitearch}/pygtk.*
%{python3_sitearch}/gobject/*
%{python3_sitearch}/glib/*
%{python3_sitearch}/gi/*
%{python3_sitearch}/__pycache__/pygtk.cpython-32.*
%endif # with_python3
%changelog
* Thu Aug 18 2011 John (J5) Palmieri <johnp@redhat.com> - 2.28.6-2
- disable introspection in anticipation of pygobject3
- https://bugzilla.redhat.com/show_bug.cgi?id=731851
- pygobject2 now becomes legacy for static binding support (e.g. PyGTK)
* Mon Jun 13 2011 John (J5) Palmieri <johnp@redhat.com> - 2.28.6-1
- update to upstream 2.28.6
- closure: avoid double free crash