Репозитории ALT
S: | 2.24.0-alt11 |
5.1: | 2.16.0-alt3 |
4.1: | 2.12.1-alt1 |
4.0: | 2.10.4-alt0.1 |
3.0: | 2.6.1-alt1 |
Группа :: Разработка/Python
Пакет: python-module-pygtk
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
%def_enable numpy
%define major 2.16
Name: python-module-pygtk
Version: %major.0
Release: alt3
Summary: Python bindings for the GTK+ widget set
Group: Development/Python
License: LGPL
Url: http://www.pygtk.org/
Packager: GNOME Maintainers Team <gnome at packages.altlinux.org>
Source: http://ftp.gnome.org/pub/GNOME/sources/pygtk/%major/pygtk-%version.tar.bz2
Patch: pygtk-2.14.0-alt-configure.patch
Patch1: pygtk-2.13.0-no-x11.patch
Patch2: pygtk-2.16.0-buffer_overflow.patch
%setup_python_module pygtk
%add_python_req_skip gdk
Provides: pygtk2 = %version-%release
Obsoletes: pygtk2
%py_provides argtypes
%define pygobject_ver 2.16.1
%define pycairo_ver 1.4.12
%define gtk_version 2.8.0
%define glade_version 2.5.1
BuildPreReq: rpm-build-python python-devel gnome-common
# Automatically added by buildreq on Wed Feb 21 2007
BuildRequires: glibc-devel libglade-devel python-module-pycairo-devel python-module-pygobject-devel python-modules-encodings xsltproc
BuildRequires: python-module-pycairo-devel >= %pycairo_ver
BuildRequires: libgtk+2-devel >= %gtk_version
BuildRequires: libglade2-devel >= %glade_version
BuildRequires: python-module-pygobject-devel >= %pygobject_ver
BuildRequires: rpm-build-compat
%{?_enable_numpy:BuildRequires: python-module-numpy}
# Why we do not catch it automatically?
Requires: python-module-pycairo >= %pycairo_ver
Requires: python-module-pygobject >= %pygobject_ver
%description
PyGTK is an extension module for python that gives you access to the GTK+
widget set. Just about anything you can write in C with GTK+ you can write
in python with PyGTK (within reason), but with all the benefits of python.
%package libglade
Summary: A wrapper for the libglade library for use with PyGTK
Group: Development/Python
Requires: %name = %version-%release libglade2
Provides: pygtk2-libglade
Obsoletes: pygtk2-libglade
%py_provides libglade
%description libglade
This module contains a wrapper for the libglade library. Libglade allows
a program to construct its user interface from an XML description, which
allows the programmer to keep the UI and program logic separate.
%package devel
Summary: files needed to build wrappers for GTK+ addon libraries
Group: Development/Python
Requires: %name = %version-%release
Provides: pygtk2-devel = %version-%release
Obsoletes: pygtk2-devel
%description devel
This package contains files required to build wrappers for GTK+ addon
libraries so that they interoperate with pygtk.
%package examples
Summary: pygtk2 examples
Group: Development/Python
BuildArch: noarch
Requires: %name-libglade = %version-%release
Provides: pygtk2-examples
Obsoletes: pygtk2-examples
%description examples
This package contains pygtk2 examples
%package demo
Summary: pygtk2 demo
Group: Development/Python
%description demo
This package contains pygtk2 demo
%package doc
Summary: pygtk2 doc
Group: Development/Python
BuildArch: noarch
%description doc
This package contains pygtk2 doc
%prep
%setup -q -n %modulename-%version
%patch
#%patch1
#%patch2 -p2
%__subst "s| at PYTHON at |%_bindir/env python|g" pygtk-codegen-2.0.in examples/pygtk-demo/pygtk-demo.in
# create our version of gdkconfig.h
#cp %_libdir/gtk-2.0/include/gdkconfig.h ./
#%__subst "s|GDK_WINDOWING_X11|GDK_WINDOWING_DIRECTFB|g" gdkconfig.h
# disable direct X11 using in python module
#%__subst "s|-DGDK_TARGET_X11||g" ./configure.ac
%build
#%%autoreconf
NOCONFIGURE=1 gnome-autogen.sh
%configure --disable-static \
%{subst_enable numpy} \
--enable-docs
%make_build
%install
%makeinstall
mkdir -p %buildroot%_includedir/python%__python_version
mv %buildroot%_includedir/pygtk-2.0 %buildroot%_includedir/python%__python_version/pygtk
%__subst "s|\${includedir}/pygtk-2.0|\${includedir}/python%__python_version/pygtk|g" %buildroot/%_pkgconfigdir/*.pc
# something broken if gobject still here
test -f %buildroot%python_sitelibdir/gtk-2.0/gobject.so && exit 1
# don't like x11 symbols due directfb
#objdump -t %buildroot%python_sitelibdir/gtk-2.0/gtk/_gtk.so | grep -i x11 && exit 1
%files
%doc AUTHORS NEWS README MAPPING ChangeLog THREADS TODO
%python_sitelibdir/gtk-2.0/*
%exclude %python_sitelibdir/gtk-2.0/gtk/glade.so
#%python_sitelibdir/pygtk.*
%files examples
%doc examples/*
%files demo
%_bindir/pygtk-demo
%_libdir/%modulename/
%files libglade
%python_sitelibdir/gtk-2.0/gtk/glade.so
%files devel
%_bindir/pygtk-codegen-2.0
%python_includedir/pygtk/pygtk/
%_pkgconfigdir/pygtk*.pc
%_datadir/%modulename/
%files doc
%_gtkdocdir/pygtk/
%changelog
…
Полный changelog можно просмотреть здесь
%define major 2.16
Name: python-module-pygtk
Version: %major.0
Release: alt3
Summary: Python bindings for the GTK+ widget set
Group: Development/Python
License: LGPL
Url: http://www.pygtk.org/
Packager: GNOME Maintainers Team <gnome at packages.altlinux.org>
Source: http://ftp.gnome.org/pub/GNOME/sources/pygtk/%major/pygtk-%version.tar.bz2
Patch: pygtk-2.14.0-alt-configure.patch
Patch1: pygtk-2.13.0-no-x11.patch
Patch2: pygtk-2.16.0-buffer_overflow.patch
%setup_python_module pygtk
%add_python_req_skip gdk
Provides: pygtk2 = %version-%release
Obsoletes: pygtk2
%py_provides argtypes
%define pygobject_ver 2.16.1
%define pycairo_ver 1.4.12
%define gtk_version 2.8.0
%define glade_version 2.5.1
BuildPreReq: rpm-build-python python-devel gnome-common
# Automatically added by buildreq on Wed Feb 21 2007
BuildRequires: glibc-devel libglade-devel python-module-pycairo-devel python-module-pygobject-devel python-modules-encodings xsltproc
BuildRequires: python-module-pycairo-devel >= %pycairo_ver
BuildRequires: libgtk+2-devel >= %gtk_version
BuildRequires: libglade2-devel >= %glade_version
BuildRequires: python-module-pygobject-devel >= %pygobject_ver
BuildRequires: rpm-build-compat
%{?_enable_numpy:BuildRequires: python-module-numpy}
# Why we do not catch it automatically?
Requires: python-module-pycairo >= %pycairo_ver
Requires: python-module-pygobject >= %pygobject_ver
%description
PyGTK is an extension module for python that gives you access to the GTK+
widget set. Just about anything you can write in C with GTK+ you can write
in python with PyGTK (within reason), but with all the benefits of python.
%package libglade
Summary: A wrapper for the libglade library for use with PyGTK
Group: Development/Python
Requires: %name = %version-%release libglade2
Provides: pygtk2-libglade
Obsoletes: pygtk2-libglade
%py_provides libglade
%description libglade
This module contains a wrapper for the libglade library. Libglade allows
a program to construct its user interface from an XML description, which
allows the programmer to keep the UI and program logic separate.
%package devel
Summary: files needed to build wrappers for GTK+ addon libraries
Group: Development/Python
Requires: %name = %version-%release
Provides: pygtk2-devel = %version-%release
Obsoletes: pygtk2-devel
%description devel
This package contains files required to build wrappers for GTK+ addon
libraries so that they interoperate with pygtk.
%package examples
Summary: pygtk2 examples
Group: Development/Python
BuildArch: noarch
Requires: %name-libglade = %version-%release
Provides: pygtk2-examples
Obsoletes: pygtk2-examples
%description examples
This package contains pygtk2 examples
%package demo
Summary: pygtk2 demo
Group: Development/Python
%description demo
This package contains pygtk2 demo
%package doc
Summary: pygtk2 doc
Group: Development/Python
BuildArch: noarch
%description doc
This package contains pygtk2 doc
%prep
%setup -q -n %modulename-%version
%patch
#%patch1
#%patch2 -p2
%__subst "s| at PYTHON at |%_bindir/env python|g" pygtk-codegen-2.0.in examples/pygtk-demo/pygtk-demo.in
# create our version of gdkconfig.h
#cp %_libdir/gtk-2.0/include/gdkconfig.h ./
#%__subst "s|GDK_WINDOWING_X11|GDK_WINDOWING_DIRECTFB|g" gdkconfig.h
# disable direct X11 using in python module
#%__subst "s|-DGDK_TARGET_X11||g" ./configure.ac
%build
#%%autoreconf
NOCONFIGURE=1 gnome-autogen.sh
%configure --disable-static \
%{subst_enable numpy} \
--enable-docs
%make_build
%install
%makeinstall
mkdir -p %buildroot%_includedir/python%__python_version
mv %buildroot%_includedir/pygtk-2.0 %buildroot%_includedir/python%__python_version/pygtk
%__subst "s|\${includedir}/pygtk-2.0|\${includedir}/python%__python_version/pygtk|g" %buildroot/%_pkgconfigdir/*.pc
# something broken if gobject still here
test -f %buildroot%python_sitelibdir/gtk-2.0/gobject.so && exit 1
# don't like x11 symbols due directfb
#objdump -t %buildroot%python_sitelibdir/gtk-2.0/gtk/_gtk.so | grep -i x11 && exit 1
%files
%doc AUTHORS NEWS README MAPPING ChangeLog THREADS TODO
%python_sitelibdir/gtk-2.0/*
%exclude %python_sitelibdir/gtk-2.0/gtk/glade.so
#%python_sitelibdir/pygtk.*
%files examples
%doc examples/*
%files demo
%_bindir/pygtk-demo
%_libdir/%modulename/
%files libglade
%python_sitelibdir/gtk-2.0/gtk/glade.so
%files devel
%_bindir/pygtk-codegen-2.0
%python_includedir/pygtk/pygtk/
%_pkgconfigdir/pygtk*.pc
%_datadir/%modulename/
%files doc
%_gtkdocdir/pygtk/
%changelog
…
Полный changelog можно просмотреть здесь