Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 5664901e143261f74902ec9d8dfb775f > files > 2

python-gobject3-3.4.2-2.mga3.src.rpm

%define oname pygobject

%define api 2.0
%define major 0
%define libname %mklibname pyglib-gi %api %major

%define _exclude_files_from_autoreq ^%{py_platsitedir}/gi/_gobject/__init__.py\\|^%{py_platsitedir}/gi/pygtkcompat.py\\|^%{py3_platsitedir}/gi/_gobject/__init__.py\\|^%{py3_platsitedir}/gi/pygtkcompat.py

%define _requires_exceptions python-gi

%define url_ver %(echo %{version} | cut -d "." -f -2)

%define with_python3 1

Summary:	Python bindings for GObject Introspection
Name:		python-gobject3
Version:	3.4.2
Release:	%mkrel 2
Source0:	http://download.gnome.org/sources/%{oname}/%{url_ver}/%{oname}-%{version}.tar.xz
License:	LGPLv2+ and MIT
Group:		Development/Python
Url:		http://www.gnome.org
BuildRequires:	python-devel >= 2.5.2
BuildRequires:	pkgconfig(glib-2.0) >= 2.31.0
BuildRequires:	pkgconfig(gobject-introspection-1.0) >= 1.31.20
BuildRequires:	pkgconfig(libffi) >= 3.0
BuildRequires:	pkgconfig(pycairo) >= 1.2.0
BuildRequires:	gtk-doc
BuildRequires:	automake
%if %{with_python3}
BuildRequires:  python3-devel
BuildRequires:  python3-cairo-devel
%endif

%description
The %{name} package provides a convenient wrapper for the GObject library
for use in Python programs.

%package -n python-gi
Summary:	Python bindings for GObject Introspection
Group:		Development/Python
Provides:	python-gobject-introspection = %{version}-%{release}
Provides:	%{name} = %{version}-%{release}
Conflicts:	python-gobject < 2.28.6-4

%description -n python-gi
The %{name} package provides a convenient wrapper for the GObject library
for use in Python programs.

This package contains the Python GObject Introspection bindings.

%package -n python-gi-cairo
Summary:	Python-gi bindings for Cairo
Group:		Development/Python
Requires:	python-gi = %{version}-%{release}
Requires:	python-cairo >= 1.2.0
Obsoletes:	python-gobject-cairo < 2.28.6-4
Provides:	python-gobject-cairo = %{version}-%{release}

%description -n python-gi-cairo
The %{name} package provides a convenient wrapper for the GObject library
for use in Python programs.

This package contains the Python-gi Cairo bindings.

%package -n %{libname}
Group:		System/Libraries
Summary:	Python GObject Introspection bindings shared library

%description -n %{libname}
This archive contains bindings for the GObject, to be used in Python
It is a fairly complete set of bindings, it's already rather useful, 
and is usable to write moderately complex programs.

%package devel
Group:		Development/C
Summary:	Python-gobject development files
Requires:	%{libname} = %{version}-%{release}
%if %{with_python3}
Requires:	python3-gobject3 = %{version}-%{release}
%endif

%description devel
This contains the python-gobject development files, including C
header, pkg-config file.

%if %{with_python3}
%package -n python3-gobject3
Summary:        Python 3 bindings for GObject Introspection
Group:          Development/Python
Requires:       python3-cairo
Requires:       gobject-introspection

%description -n python3-gobject3
This package provides a convenient wrapper for the GObject library and other
libraries that are compatible with GObject Introspection, for use with Python 3
programs.
%endif

%prep
%setup -q -c -T

# Python 2
tar xf %{SOURCE0}
mv pygobject-%{version} python2

# Python 3
%if %{with_python3}
cp -ar python2 python3
%endif

# fis shebangs
find python2 -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python}|'
%if %{with_python3}
find python3 -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
%endif

%build
# Python 2
pushd python2
PYTHON=%{__python}
export PYTHON
%configure2_5x
%make LIBS="-lpython%{py_ver}"
popd

%if %{with_python3}
# Python 3
pushd python3
PYTHON=%{__python3}
export PYTHON
%configure2_5x
%make LIBS="-lpython%{py3_ver}m"
popd
%endif

%install
# Python 2
pushd python2
PYTHON=%{__python}
export PYTHON
%makeinstall_std
popd

%if %{with_python3}
# Python 3
pushd python3
PYTHON=%{__python3}
export PYTHON
%makeinstall_std
popd
%endif

find %buildroot \( -name *.la -o -name *.a \) | xargs rm

# dsextra stuff is for windows installs so remove it
rm -fr %{buildroot}%{python_sitearch}/gtk-2.0

# docs are out of date and are being reworked upstream
# so remove them
rm -rf %{buildroot}%{_datadir}/gtk-doc
rm -rf %{buildroot}%{_datadir}/pygobject

%files -n python-gi
%doc python2/README python2/NEWS python2/AUTHORS python2/ChangeLog
%py_platsitedir/gi
%py_platsitedir/*.egg-info
# Live in cairo subpackage
%exclude %py_platsitedir/gi/_gi_cairo.so

%files -n python-gi-cairo
%py_platsitedir/gi/_gi_cairo.so

%files -n %libname
%{_libdir}/libpyglib-gi-%{api}-python.so.%{major}*

%files devel
%{_includedir}/*
%{_libdir}/*python.*so
%{_libdir}/*python3.*so
%{_libdir}/pkgconfig/*.pc

%if %{with_python3}
%files -n python3-gobject3
%py3_platsitedir/gi
%py3_platsitedir/*.egg-info
%{_libdir}/*python3*.so.*
%endif


%changelog

* Sun Jan 13 2013 umeabot <umeabot> 3.4.2-2.mga3
+ Revision: 378935
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Tue Nov 13 2012 fwang <fwang> 3.4.2-1.mga3
+ Revision: 317339
- update file list
- new version 3.4.2

  + ovitters <ovitters>
    - new version 3.4.1.1

* Mon Oct 15 2012 fwang <fwang> 3.4.1-1.mga3
+ Revision: 306020
- update file list
- update file list

  + ovitters <ovitters>
    - new version 3.4.1

* Sat Sep 29 2012 fwang <fwang> 3.4.0-2.mga3
+ Revision: 300330
- rebuild for new py3.3

* Mon Sep 24 2012 fwang <fwang> 3.4.0-1.mga3
+ Revision: 297069
- new version 3.4.0

* Tue Sep 18 2012 fwang <fwang> 3.3.92-1.mga3
+ Revision: 295730
- new version 3.3.92

* Mon Aug 06 2012 fwang <fwang> 3.3.5-1.mga3
+ Revision: 279380
- new version 3.3.5

* Fri Jul 13 2012 fwang <fwang> 3.3.3.1-5.mga3
+ Revision: 270611
- update file list to fix file conflicts

* Fri Jul 13 2012 fwang <fwang> 3.3.3.1-4.mga3
+ Revision: 270525
- do not requires python-gi

* Fri Jul 13 2012 fwang <fwang> 3.3.3.1-3.mga3
+ Revision: 270517
- update file list
- update file list

* Fri Jul 13 2012 kamil <kamil> 3.3.3.1-2.mga3
+ Revision: 270476
- add python3 subpackage

* Tue Jul 03 2012 kamil <kamil> 3.3.3.1-1.mga3
+ Revision: 267105
- new version 3.3.3.1
- remove P0 (not used anymore)
- new P0 pygobject-3.3.3.1-fix-segfault-with-class-interface-mismatch.patch from Fedora

* Mon May 14 2012 ovitters <ovitters> 3.2.2-1.mga3
+ Revision: 235674
- new version 3.2.2
- new version 3.2.1

* Sat Apr 07 2012 fwang <fwang> 3.2.0-3.mga2
+ Revision: 229564
- fix typo on filter

* Sat Apr 07 2012 fwang <fwang> 3.2.0-2.mga2
+ Revision: 229556
- do not push autoreq from pygtkcompat module

* Mon Mar 26 2012 ovitters <ovitters> 3.2.0-1.mga2
+ Revision: 226573
- new version 3.2.0

* Fri Mar 23 2012 anssi <anssi> 3.1.93-2.mga2
+ Revision: 225856
- drop patch which adapted to API change made in upstream GTK+ bug
  #657385, it has now been reverted in GTK+ 3.3.20

* Thu Mar 22 2012 ovitters <ovitters> 3.1.93-1.mga2
+ Revision: 225662
- new version 3.1.93

* Mon Mar 19 2012 ovitters <ovitters> 3.1.92-1.mga2
+ Revision: 224400
- new version 3.1.92

* Wed Mar 07 2012 anssi <anssi> 3.1.1-2.mga2
+ Revision: 221179
- adapt for an API change made in gnome bug #657385 (this change might
  get reverted later, though; adapt-for-gnome657385.patch)

* Tue Feb 21 2012 fwang <fwang> 3.1.1-1.mga2
+ Revision: 211318
- new version 3.1.1

* Mon Feb 06 2012 fwang <fwang> 3.1.0-1.mga2
+ Revision: 205459
- new version 3.1.0

* Tue Dec 13 2011 fwang <fwang> 3.0.3-1.mga2
+ Revision: 181240
- new version 3.0.3

* Tue Oct 25 2011 fwang <fwang> 3.0.2-1.mga2
+ Revision: 157981
- new version 3.0.2

* Sat Oct 01 2011 wally <wally> 3.0.1-1.mga2
+ Revision: 150638
- new version 3.0.1

* Mon Sep 19 2011 wally <wally> 3.0.0-1.mga2
+ Revision: 145640
- new version 3.0.0
- clean .spec a bit

* Fri Sep 16 2011 fwang <fwang> 2.90.4-1.mga2
+ Revision: 144176
- fix linkage
- new version 2.90.4

* Thu Sep 01 2011 fwang <fwang> 2.90.3-1.mga2
+ Revision: 137427
- new version  2.90.3
- disable wrong script for checking req
- imported package python-gobject3

  + wally <wally>
    - fix typo in python-gi-cairo provides/requires