Import rpm: 6f95a814300e0ee99690603b5aec87b4ce3664fc

This commit is contained in:
James Antill 2023-02-23 12:41:04 -05:00
parent c9660dda45
commit cc1d36b017
3 changed files with 104 additions and 98 deletions

View File

@ -0,0 +1,29 @@
--- pygtk-2.10.4/gtk/__init__.py.orig 2007-01-16 07:50:07.000000000 -0500
+++ pygtk-2.10.4/gtk/__init__.py 2007-02-05 17:09:37.000000000 -0500
@@ -59,19 +59,14 @@
def _init():
import sys
- try:
- sys_path = sys.path[:]
+ sys_path = sys.path[:]
- try:
- _gtk.init_check()
- except RuntimeError, e:
- import warnings
- warnings.warn(str(e), _gtk.Warning)
- finally:
- # init_check calls PySys_SetArgv which calls sys.path.insert(0, ''),
- # which causes problems for pychecker, restore it if modified.
- if sys.path != sys_path:
- sys.path[:] = sys_path
+ _gtk.init_check()
+
+ # init_check calls PySys_SetArgv which calls sys.path.insert(0, ''),
+ # which causes problems for pychecker, restore it if modified.
+ if sys.path != sys_path:
+ sys.path[:] = sys_path
# install the default log handlers
_gtk.add_log_handlers()

View File

@ -1,28 +1,32 @@
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
# Last updated for version 2.17.0
%define glib2_version 2.8.0
%define pango_version 1.16.0
%define gtk2_version 2.9.0
%define libglade2_version 2.5.0
%define pycairo_version 1.0.2
%define pygobject2_version 2.21.3
%define python2_version 2.3.5
%define buildglade %(pkg-config libglade-2.0 && echo 1 || echo 0)
### Abstract ###
Name: pygtk2
Version: 2.24.0
Release: 24%{?dist}
Release: 9%{?dist}
License: LGPLv2+
Group: Development/Languages
Summary: Python bindings for GTK+
URL: http://www.pygtk.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Source: http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.24/pygtk-%{version}.tar.bz2
### Patches ###
# https://bugzilla.gnome.org/show_bug.cgi?id=660216
# https://git.gnome.org/browse/pygtk/commit/?id=eca72baa56
Patch0: 0001-Fix-leaks-of-Pango-objects.patch
# RH bug #208608
Patch0: pygtk-nodisplay-exception.patch
# This was dropped from gnome-python; obsolete it here because, well,
# we have to put it somewhere
@ -32,7 +36,7 @@ Obsoletes: gnome-python2-applet < 2.32.0-5
# Leave these requirements alone! RPM isn't smart enough
# to derive these from the build requirements below.
Requires: python2-cairo
Requires: pycairo
Requires: pygobject2
### Build Dependencies ###
@ -41,11 +45,12 @@ BuildRequires: automake
BuildRequires: docbook-style-xsl
BuildRequires: glib2-devel >= %{glib2_version}
BuildRequires: gtk2-devel >= %{gtk2_version}
BuildRequires: libglade2-devel >= %{libglade2_version}
BuildRequires: libtool
BuildRequires: libxslt
BuildRequires: python2-numpy
BuildRequires: numpy
BuildRequires: pango-devel >= %{pango_version}
BuildRequires: python2-cairo-devel >= %{pycairo_version}
BuildRequires: pycairo-devel >= %{pycairo_version}
BuildRequires: pygobject2-devel >= %{pygobject2_version}
BuildRequires: python2-devel >= %{python2_version}
@ -62,13 +67,24 @@ Group: Development/Languages
%description codegen
This package contains the C code generation program for PyGTK.
%package libglade
Summary: A wrapper for the libglade library for use with PyGTK
Group: Development/Languages
Requires: %{name} = %{version}-%{release}
%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: Development files for building add-on libraries
Group: Development/Languages
Requires: %{name} = %{version}-%{release}
Requires: %{name}-codegen = %{version}-%{release}
Requires: %{name}-doc = %{version}-%{release}
Requires: python2-cairo-devel
Requires: pkgconfig
Requires: pycairo-devel
Requires: pygobject2-devel
%description devel
@ -85,114 +101,75 @@ This package contains documentation files for %{name}.
%prep
%setup -q -n pygtk-%{version}
%patch0 -p1 -b .Fix-leaks-of-Pango-objects
# Fix shebangs to system Python2.x
for file in $(%{_bindir}/find . -name '*.py' -type f)
do
%{__sed} -i.orig \
-e 's~#!/usr/bin/python(2\?)~#!%{__python2}~'\
-e 's~#!/usr/bin/env python(2\?)~#!%{__python2}~'\
${file}
/bin/touch -r ${file}.orig ${file}
%{__rm} -f ${file}.orig
done
%patch0 -p1
%build
%configure --enable-thread --enable-numpy --without-glade
%{make_build}
%configure --enable-thread --enable-numpy
export tagname=CC
make LIBTOOL=/usr/bin/libtool
%install
%{make_install}
find %{buildroot} -name '*.la' -or -name '*.a' | xargs rm -f
rm -rf $RPM_BUILD_ROOT
export tagname=CC
make LIBTOOL=/usr/bin/libtool DESTDIR=$RPM_BUILD_ROOT install
find $RPM_BUILD_ROOT -name '*.la' -or -name '*.a' | xargs rm -f
# Fix python shebangs
sed -i 's|^#! /usr/bin/python(2\?)|#!%{__python2}|' %{buildroot}/usr/bin/pygtk-demo
%clean
rm -fr $RPM_BUILD_ROOT
%files
%doc AUTHORS NEWS README MAPPING
%license COPYING
%defattr(644, root, root, 755)
%doc AUTHORS NEWS README MAPPING COPYING
%dir %{python_sitearch}/gtk-2.0
%dir %{python_sitearch}/gtk-2.0/gtk
%{python_sitearch}/gtk-2.0/gtk/*.py*
%dir %{_libdir}/pygtk
%dir %{_libdir}/pygtk/2.0
%{_libdir}/pygtk/2.0/*
%defattr(755, root, root, 755)
%{_bindir}/pygtk-demo
%{_libdir}/pygtk/
%dir %{python2_sitearch}/gtk-2.0
%dir %{python2_sitearch}/gtk-2.0/gtk
%{python2_sitearch}/gtk-2.0/gtk/*.py*
%{python2_sitearch}/gtk-2.0/gtk/_gtk.so
%{python2_sitearch}/gtk-2.0/*.so
%{python_sitearch}/gtk-2.0/atk.so
%{python_sitearch}/gtk-2.0/pango.so
%{python_sitearch}/gtk-2.0/gtk/_gtk.so
%{python_sitearch}/gtk-2.0/gtkunixprint.so
%{python_sitearch}/gtk-2.0/pangocairo.so
%if %{buildglade}
%files libglade
%defattr(755, root, root, 755)
%{python_sitearch}/gtk-2.0/gtk/glade.so
%endif
%files codegen
%{_bindir}/pygtk-codegen-2.0
%defattr(755, root, root, 755)
%{_prefix}/bin/pygtk-codegen-2.0
%files devel
%{_includedir}/pygtk-2.0/
%defattr(644, root, root, 755)
%dir %{_prefix}/include/pygtk-2.0
%dir %{_prefix}/include/pygtk-2.0/pygtk
%{_prefix}/include/pygtk-2.0/pygtk/*.h
%{_libdir}/pkgconfig/pygtk-2.0.pc
%{_datadir}/pygtk/
%dir %{_prefix}/share/pygtk
%dir %{_prefix}/share/pygtk/2.0
%dir %{_prefix}/share/pygtk/2.0/defs
%{_prefix}/share/pygtk/2.0/defs/*.defs
%{_prefix}/share/pygtk/2.0/defs/pangocairo.override
%files doc
%defattr(644, root, root, 755)
%doc examples
%{_datadir}/gtk-doc/html/pygtk/
%{_datadir}/gtk-doc/html/pygtk
%changelog
* Wed Sep 12 2018 Josef Ridky <jridky@redhat.com> - 2.24.0-24
- remove libglade dependency and sub-package (#1622134)
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 2.24.0-9
- Mass rebuild 2014-01-24
* Tue Aug 14 2018 Josef Ridky <jridky@redhat.com> - 2.24.0-23.1
- fix python2 regex in sed command
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 2.24.0-8
- Mass rebuild 2013-12-27
* Tue Aug 14 2018 Josef Ridky <jridky@redhat.com> - 2.24.0-23
- resotre doc sub package
* Mon Aug 13 2018 Josef Ridky <jridky@redhat.com> - 2.24.0-22
- fix python2 macros
* Fri Jun 22 2018 Troy Dawson <tdawson@redhat.com> - 2.24.0-21.1
- Fix python shebangs (#1580855)
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.24.0-21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Feb 01 2018 Leigh Scott <leigh123linux@googlemail.com> - 2.24.0-20
- Try again to fix shebangs
* Thu Feb 01 2018 Leigh Scott <leigh123linux@googlemail.com> - 2.24.0-19
- Fix shebangs
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.24.0-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.24.0-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.24.0-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.24.0-15
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Sun Apr 17 2016 Leigh Scott <leigh123linux@googlemail.com> - 2.24.0-14
- Fix leaks of Pango objects (bz 660216)
- Update macros in files section
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.24.0-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Thu Jun 18 2015 Leigh Scott <leigh123linux@googlemail.com> - 2.24.0-12
- use license tag for COPYING
* Sat Dec 06 2014 Leigh Scott <leigh123linux@googlemail.com> - 2.24.0-11
- update spec file
- drop patch (system-config-authentication is a gui app that requires X and I don't give a damn if it segfaults because someone runs it without X)
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.24.0-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.24.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.24.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Sat Mar 02 2013 Colin Walters <walters@verbum.org> - 2.24.0-7
* Tue Mar 02 2013 Colin Walters <walters@verbum.org> - 2.24.0-7
- Patch from mbarnes to hopefully fix multilib conflict
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.24.0-6
@ -444,7 +421,7 @@ sed -i 's|^#! /usr/bin/python(2\?)|#!%{__python2}|' %{buildroot}/usr/bin/pygtk-d
python support is added
- Add a Requires on python-numeric as well
* Thu Aug 18 2005 John (J5) Palmieri <johnp@redhat.com> - 2.7.3-2
* Tue Aug 18 2005 John (J5) Palmieri <johnp@redhat.com> - 2.7.3-2
- Bump and rebuild for cairo ABI changes
* Wed Aug 10 2005 <jrb@redhat.com> - 2.7.3-1

View File

@ -1 +1 @@
SHA512 (pygtk-2.24.0.tar.bz2) = 64f4344fcf7636e0b2016ffd5310250b5c02a1bf87e44aef39b5d4cf4a5fc50d27cb4f030d4c6802cff61fffb88dee7752821e3d8a4cd1c34dc3745d9ff2f0da
SHA1 (pygtk-2.24.0.tar.bz2) = 344e6a32a5e8c7e0aaeb807e0636a163095231c2