Репозиторий Sisyphus
Последнее обновление: 3 декабря 2022 | Пакетов: 17961 | Посещений: 25477117
en ru br
Репозитории ALT
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 snapshot
%def_enable numpy
%def_disable docs

%define major 2.24
Name: python-module-pygtk
Version: %major.0
Release: alt9

Summary: Python bindings for the GTK+ widget set

Group: Development/Python
License: LGPL-2.1
Url: http://www.pygtk.org/
Packager: GNOME Maintainers Team <gnome at packages.altlinux.org>

%if_enabled snapshot
Source: pygtk-%version.tar
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.24.0-alt-pango-1.44.7.patch

%setup_python_module pygtk
%add_python_req_skip gdk

Provides: pygtk2 = %version-%release
Obsoletes: pygtk2

%py_provides argtypes

%define pygobject_ver 2.26.0
%define pycairo_ver 1.4.12
%define gtk_ver 2.22.0
%define glade_ver 2.5.1

# don't reqs automatically

Requires: python-module-pycairo >= %pycairo_ver
%{?_enable_numpy:Requires:python-module-numpy python-module-numpy-addons}

BuildRequires(pre): rpm-build-compat rpm-build-python
BuildRequires: gtk-doc python-devel gnome-common
BuildRequires: python-module-pygobject-devel >= %pygobject_ver
BuildRequires: python-module-pycairo-devel >= %pycairo_ver
BuildRequires: libgtk+2-devel >= %gtk_ver
BuildRequires: libglade-devel >= %glade_ver
%{?_enable_numpy:BuildRequires: libnumpy-devel}
# style.css from this package required to build documentation
BuildRequires: python-module-pygobject-devel-doc

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
%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
Requires: python-module-pygobject-devel
%filter_from_requires /pkgconfig(pygobject-2.0)/d

%description devel
This package contains files required to build wrappers for GTK+ addon
libraries so that they interoperate with pygtk.

%package examples
Summary: PyGTK examples
Group: Development/Python
BuildArch: noarch
Requires: %name-libglade = %version-%release

%description examples
This package contains PyGTK examples

%package demo
Summary: PyGTK demo
Group: Development/Python
Requires: %name = %version-%release

%description demo
This package contains PyGTK demo

%package doc
Summary: PyGTK doc
Group: Development/Python
BuildArch: noarch

%description doc
This package contains PyGTK doc

%setup -n %modulename-%version

%__subst "s| at PYTHON at |%_bindir/python2|g" examples/pygtk-demo/pygtk-demo.in

#NOCONFIGURE=1 gnome-autogen.sh
%autoreconf -I m4
%configure --disable-static \
%{subst_enable numpy} \
%{subst_enable docs} \

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

%exclude %python_sitelibdir/gtk-2.0/gtk/glade.so

%files examples
%doc examples/*

%files demo

%files libglade

%files devel

%files doc


Полный changelog можно просмотреть здесь

дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin