Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37038278
en ru br
ALT Linux repositórios
S:2.24.0-alt11
5.0: 2.14.1-alt1
4.1: 2.12.1-alt1
4.0: 2.10.4-alt0.1
3.0: 2.6.1-alt1

Group :: Desenvolvimento/Python
RPM: python-module-pygtk

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

%def_disable numpy
%def_disable docs

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

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>

# Source-url: http://ftp.gnome.org/pub/GNOME/sources/pygtk/%major/pygtk-%version.tar.bz2

Source: pygtk-%version.tar

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: 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}
%if_enabled docs
BuildRequires: gtk-doc
# style.css from this package required to build documentation
BuildRequires: python-module-pygobject-devel-doc
%endif

%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
%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

%prep
%setup -n %modulename-%version
%patch
%patch1

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

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

%install
%makeinstall_std
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
subst "s|\${PYTHON_EXEC_PREFIX}|%_prefix|g" %buildroot/%_pkgconfigdir/*.pc

# something broken if gobject still here

test -f %buildroot%python_sitelibdir/gtk-2.0/gobject.so && exit 1

%files
%python_sitelibdir/gtk-2.0/*
%exclude %python_sitelibdir/gtk-2.0/gtk/glade.so
%doc AUTHORS NEWS README MAPPING THREADS TODO

%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/

%if_enabled docs
%files doc
%_datadir/gtk-doc/html/pygtk/
%endif

%changelog

Todas as alterações você pod ver aqui

 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009