Accepting request 74061 from devel:languages:python

Create python3-gobject source package, sharing the same original .spec to build python3 module. Please add a python-gobject3 link in devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/74061
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-gobject?expand=0&rev=8
This commit is contained in:
Sascha Peilicke 2011-06-24 08:50:51 +00:00 committed by Git OBS Bridge
parent c1f8f2d500
commit 5d90661874
6 changed files with 838 additions and 15 deletions

4
pre_checkin.sh Normal file
View File

@ -0,0 +1,4 @@
#!/bin/sh
sed 's,build_for_python3 0,build_for_python3 1,;s,^\(Name: *\)python-gobject,\1python3-gobject,' python-gobject.spec > python3-gobject.spec
cp python-gobject.changes python3-gobject.changes

View File

@ -0,0 +1,91 @@
From 4e5833d0c2fe548617e5ea510f05920fd0caf73b Mon Sep 17 00:00:00 2001
From: Ignacio Casal Quinteiro <icq@gnome.org>
Date: Thu, 21 Apr 2011 14:52:20 +0000
Subject: [python3] fix build. PYcairo_IMPORT doesn't exists anymore
---
(limited to 'gi/pygi-foreign-cairo.c')
diff --git a/gi/pygi-foreign-cairo.c b/gi/pygi-foreign-cairo.c
index 10d5643..8353294 100644
--- a/gi/pygi-foreign-cairo.c
+++ b/gi/pygi-foreign-cairo.c
@@ -30,7 +30,7 @@
#include <pycairo/py3cairo.h>
#endif
-Pycairo_CAPI_t *Pycairo_CAPI;
+static Pycairo_CAPI_t *Pycairo_CAPI;
#include "pygi-foreign.h"
@@ -115,7 +115,12 @@ cairo_surface_release (GIBaseInfo *base_info,
static PyMethodDef _gi_cairo_functions[] = {};
PYGLIB_MODULE_START(_gi_cairo, "_gi_cairo")
{
+#if PY_VERSION_HEX < 0x03000000
Pycairo_IMPORT;
+#else
+ Pycairo_CAPI = (Pycairo_CAPI_t*) PyCObject_Import("cairo", "CAPI");
+#endif
+
if (Pycairo_CAPI == NULL)
return PYGLIB_MODULE_ERROR_RETURN;
--
cgit v0.9
From 426c7109d4c0dbf0d56cc075f97f33b3451f79a8 Mon Sep 17 00:00:00 2001
From: John (J5) Palmieri <johnp@redhat.com>
Date: Wed, 27 Apr 2011 19:47:19 +0000
Subject: use PyCapsule when importing pycairo/require pycairo 1.10.0 for python3 builds
* PyCObject is deprecated and pycairo 1.10.0 is first release to fix this issue
---
diff --git a/configure.ac b/configure.ac
index 0cc920b..fb69237 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,7 +17,8 @@ m4_define(pygobject_version, pygobject_major_version.pygobject_minor_version.pyg
dnl versions of packages we require ...
m4_define(introspection_required_version, 0.10.2)
-m4_define(pycairo_required_version, 1.2.0)
+m4_define(py2cairo_required_version, 1.2.0)
+m4_define(py3cairo_required_version, 1.10.0)
m4_define(glib_required_version, 2.24.0)
m4_define(gio_required_version, 2.24.0)
m4_define(giounix_required_version, 2.22.4)
@@ -226,9 +227,15 @@ if test "$enable_introspection" != no; then
AC_SUBST(GI_DATADIR)
if test "$enable_cairo" != no; then
- PKG_CHECK_MODULES(PYCAIRO,
- pycairo >= pycairo_required_version
- )
+ if test $build_py3k = true; then
+ PKG_CHECK_MODULES(PYCAIRO,
+ py3cairo >= py3cairo_required_version
+ )
+ else
+ PKG_CHECK_MODULES(PYCAIRO,
+ pycairo >= py2cairo_required_version
+ )
+ fi
fi
fi
AM_CONDITIONAL(ENABLE_INTROSPECTION, test "$enable_introspection" = "yes")
diff --git a/gi/pygi-foreign-cairo.c b/gi/pygi-foreign-cairo.c
index 8353294..af84733 100644
--- a/gi/pygi-foreign-cairo.c
+++ b/gi/pygi-foreign-cairo.c
@@ -118,7 +118,7 @@ PYGLIB_MODULE_START(_gi_cairo, "_gi_cairo")
#if PY_VERSION_HEX < 0x03000000
Pycairo_IMPORT;
#else
- Pycairo_CAPI = (Pycairo_CAPI_t*) PyCObject_Import("cairo", "CAPI");
+ Pycairo_CAPI = (Pycairo_CAPI_t*) PyCapsule_Import("cairo.CAPI", 0);
#endif
if (Pycairo_CAPI == NULL)
--
cgit v0.9

View File

@ -1,3 +1,27 @@
-------------------------------------------------------------------
Fri Jun 17 11:53:53 CEST 2011 - vuntz@opensuse.org
- Change the source package so we can build both python 2
(python-gobject) and python 3 (python3-gobject) versions, based
on the same .spec file:
+ define a build_for_python3 variable to control the behavior
+ use local_py_requires and local_py_sitedir variables, that
proxy the appropriate values depending on what is being built
+ do not change anything for the python 2 build
+ for the python 3 build:
. replace python-cairo-devel and python-devel BuildRequires
with python3-cairo-devel and python3-devel
. do not keep any Provides/Obsoletes that are related to
python-gobject2
. add Conflicts with python-gobject-devel to the devel
subpackage, as both devel subpackages install the same files
. export PYTHON=python3 for the build
- Add libffi-devel BuildRequires that will now work, since
libffi-devel finally comes with a pkg-config file.
- Add python-gobject-python3.patch: patches taken from git, to fix
build with python 3. Add call to autoreconf, as configure.ac is
modified.
-------------------------------------------------------------------
Fri Jun 17 06:17:54 CEST 2011 - vuntz@opensuse.org

View File

@ -17,9 +17,18 @@
# norootforbuild
%define build_for_python3 0
%if %{build_for_python3}
%define local_py_requires Requires: python3
%define local_py_sitedir %{_libdir}/python3.1/site-packages
%else
%define local_py_requires %{py_requires}
%define local_py_sitedir %{py_sitedir}
%endif
Name: python-gobject
%define _name pygobject
%define _name pygobject
Summary: Python bindings for GObject
Version: 2.28.6
Release: 1
@ -27,17 +36,23 @@ License: LGPLv2.1+
Group: Development/Libraries/Python
Url: http://ftp.gnome.org/pub/GNOME/sources/pygobject/
Source: http://ftp.gnome.org/pub/GNOME/sources/pygobject/2.28/%{_name}-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM python-gobject-python3.patch vuntz@opensuse.org -- Taken from git, various fixes for python3
Patch0: python-gobject-python3.patch
BuildRequires: fdupes
BuildRequires: glib2-devel
BuildRequires: gobject-introspection-devel
BuildRequires: libffi-devel
%if %{build_for_python3}
BuildRequires: python3-cairo-devel
BuildRequires: python3-devel
%else
BuildRequires: python-cairo-devel
# our libffi package doesn't have a pkg-config file
# BuildRequires: libffi-devel
BuildRequires: python-devel
Provides: python-gobject2 = %{version}
Obsoletes: python-gobject2 < %{version}
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{py_requires}
%{local_py_requires}
%description
Pygobjects is an extension module for python that gives you access to
@ -48,9 +63,11 @@ License: LGPLv2.1+
Summary: Python bindings for GObject -- Cairo bindings
Group: Development/Libraries/Python
Requires: %{name} = %{version}
%if ! %{build_for_python3}
Provides: python-gobject2-cairo = %{version}
Obsoletes: python-gobject2-cairo < %{version}
%define cairo_real_package %(rpm -q --qf '%{NAME}' --whatprovides cairo)
%endif
%define cairo_real_package %(rpm -q --qf '%%{NAME}' --whatprovides cairo)
Supplements: packageand(%{name}:%{cairo_real_package})
%description cairo
@ -63,11 +80,16 @@ This package contains the Python Cairo bindings for GObject.
License: LGPLv2.1+
Summary: Python bindings for GObject
Group: Development/Libraries/Python
Requires: %{name} = %{version} glib2-devel
Requires: %{name} = %{version}
%if %{build_for_python3}
# Several files are conflicting between python2 and python3 builds
Conflicts: python-gobject-devel
%else
Provides: python-gobject2-devel = %{version}
Obsoletes: python-gobject2-devel < %{version}
Provides: python-gobject2-doc = %{version}
Obsoletes: python-gobject2-doc < %{version}
%endif
%description devel
This package contains files required to build wrappers for gobject
@ -75,8 +97,13 @@ addon libraries such as pygtk.
%prep
%setup -q -n %{_name}-%{version}
%patch0 -p1
autoreconf -fi
%build
%if %{build_for_python3}
export PYTHON=python3
%endif
%configure
make %{?jobs:-j%jobs} V=1
@ -96,20 +123,20 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc AUTHORS NEWS README ChangeLog examples
%dir %{py_sitedir}/gtk-2.0
%{py_sitedir}/gi/
%{py_sitedir}/gtk-2.0/gio/
%{py_sitedir}/glib/
%{py_sitedir}/gobject/
%{py_sitedir}/gtk-2.0/dsextras.py*
%{py_sitedir}/pygtk.*
%dir %{local_py_sitedir}/gtk-2.0
%{local_py_sitedir}/gi/
%{local_py_sitedir}/gtk-2.0/gio/
%{local_py_sitedir}/glib/
%{local_py_sitedir}/gobject/
%{local_py_sitedir}/gtk-2.0/dsextras.py*
%{local_py_sitedir}/pygtk.*
%{_libdir}/*.so.*
# Live in cairo subpackage
%exclude %{py_sitedir}/gi/_gi_cairo.so
%exclude %{local_py_sitedir}/gi/_gi_cairo.so
%files cairo
%defattr(-,root,root)
%{py_sitedir}/gi/_gi_cairo.so
%{local_py_sitedir}/gi/_gi_cairo.so
%files devel
%defattr(-,root,root)

515
python3-gobject.changes Normal file
View File

@ -0,0 +1,515 @@
-------------------------------------------------------------------
Fri Jun 17 11:53:53 CEST 2011 - vuntz@opensuse.org
- Change the source package so we can build both python 2
(python-gobject) and python 3 (python3-gobject) versions, based
on the same .spec file:
+ define a build_for_python3 variable to control the behavior
+ use local_py_requires and local_py_sitedir variables, that
proxy the appropriate values depending on what is being built
+ do not change anything for the python 2 build
+ for the python 3 build:
. replace python-cairo-devel and python-devel BuildRequires
with python3-cairo-devel and python3-devel
. do not keep any Provides/Obsoletes that are related to
python-gobject2
. add Conflicts with python-gobject-devel to the devel
subpackage, as both devel subpackages install the same files
. export PYTHON=python3 for the build
- Add libffi-devel BuildRequires that will now work, since
libffi-devel finally comes with a pkg-config file.
- Add python-gobject-python3.patch: patches taken from git, to fix
build with python 3. Add call to autoreconf, as configure.ac is
modified.
-------------------------------------------------------------------
Fri Jun 17 06:17:54 CEST 2011 - vuntz@opensuse.org
- Update to version 2.28.6:
+ Fixes for GVariant.
+ Added __eq__ method for Gdk.Color and Gdk.RGBA
+ Fix symbol names to be locale independent
+ closure: Check the out arg is not null (bgo#651812)
+ Use _gi.Struct to wrap fundamentals
+ Fix two crashes.
-------------------------------------------------------------------
Wed May 4 16:26:18 UTC 2011 - dimstar@opensuse.org
- Update to version 2.28.4:
+ [gi] Don't create variant twice
+ [gi] Removed hack to avoid using GLib.Variant.new_variant.
+ [gi] Added additional test case for GVariant handling
+ [gi] Added support for GVariant arguments
+ pygi-convert.sh: Make sure the uppercase GObject module is
imported instead of the lowercase
+ Fix ABI break in old static bindings
+ Fetch size from an enum type
+ dsextras.py: ensure eol characters are preserved when writing
template files (so \n does not become \r\n)
- Use full URL to tarball as Source: tag.
-------------------------------------------------------------------
Wed Mar 23 17:39:40 UTC 2011 - fcrozat@novell.com
- Update to version 2.28.3:
+ fix a typo when converting objects to strings gvalues
- Changes from version 2.28.2:
+ fixed an ABI break in the static bindings when setting string
gvalues e.g. passing an int to a Gtk.ListStore column which
expects a string automatically converts the int to a string
instead of throwing an error.
- Changes from version 2.28.1:
+ pygi-convert.sh now supports webkit conversions and favors
using GObject over gobject.
+ Raw closures can now be passed from a signal/vfunc callback to
a method.
+ Revert linking to the python libs because the python runtime
statically links it in TreeModel column marshalling is now more
robust (supports GObject Python Object storing).
+ Gtk.MessageDialog now respects the MessageType
+ You can now send None in for the signature of GDBus messages
that have no parameters.
+ TreeViewColumn.set_cell_data_func can take None for the func_data
+ Fix syntax error so we can run in Python 2.5
+ Add pickers and menu demos
- Changes from version 2.28.0:
+ fix sinking of floating objects
+ fix leaks when setting properties
+ add basic icon view demo
+ add search entry demo
+ override Gdk.RGBA so you can construct it like
Gdk.RGBA(1.0, 1.0, 1.0, 1.0).
+ handle unichar gvalues in TreeModels
+ check for _thread module when configuring threading
+ package config file now contains overridesdir variable for 3rd
party overrides.
+ on windows set bdist_wininst user-access-control property when
installing.
+ Gtk.stock_lookup return None on failure instead of a success
value.
+ Python 2.5 fixes
+ Python 3 fixes
-------------------------------------------------------------------
Tue Mar 1 08:30:34 UTC 2011 - fcrozat@novell.com
- Update to version 2.27.91:
+ Typelibs now loaded at import time instead of lazy loading.
+ Various fixes for GTK+/GDK support via gi.
+ Various other fixes.
- Changes from version 2.27.90:
+ Faster handling of virtual methods when constructing objects
+ Enhanced gdbus and gvarient handling.
+ Enhanced drag and drop support.
+ Enhanced GtkTextBuffer support
+ Enhanced pygi-convert.sh script for automating PyGtk to
PyGObject Introspection migration.
+ Many introspection fixes.
+ Add/improve various overrides for GTK+.
+ Python 3 fixes.
- Changes from version 2.27.0:
+ Implement richcompare for GIBaseInfo
+ Add a overrides registry so we can reference overrides inside
the module
+ Add/improve various overrides for GTK+.
+ Many introspection fixes.
+ Python 3 fixes.
+ Various other fixes.
- Remove pygobject-2.26.0-capsule.patch: fixed upstream.
- Change python-gobject2, python-gobject2-cairo and
python-gobject2-devel Obsoletes to be < instead of <= now that we
have a new version.
-------------------------------------------------------------------
-Wed Feb 9 18:09:19 UTC 2011 - jmatejek@novell.com
- added patch that switches to new Capsule API, because the deprecated
PyCObject API will cause a segfault when warnings are exceptions
(bnc#669802)
-------------------------------------------------------------------
Fri Jan 7 15:05:51 CET 2011 - vuntz@opensuse.org
- Rename source package and binary package from python-gobject2 to
python-gobject: there's no reason to have the trailing 2 here.
- Add appropriate Provides/Obsoletes for migration.
-------------------------------------------------------------------
Mon Sep 27 20:37:08 CEST 2010 - vuntz@opensuse.org
- Update to version 2.26.0:
+ A lot of work for introspection support.
+ A lot of work for python3 support.
+ Wrap g_get_system_{config,data}_dirs()
+ Wrap g_uri_list_extract_uris.
+ Add override for GLib.Variant.new_tuple
+ Use Bytes instead of Unicode when reading io
+ Many bug fixes.
+ Fix warnings.
+ Code cleanup.
-------------------------------------------------------------------
Fri Aug 27 16:00:44 CEST 2010 - vuntz@opensuse.org
- Fix Supplements of python-gobject2-cairo subpackage to reference
the name of the package providing cairo, instead of
name-version-arch.
-------------------------------------------------------------------
Sun Aug 8 16:49:36 CEST 2010 - vuntz@opensuse.org
- Merge doc subpackage in devel subpackage, since the files in
there are needed when building API docs for other python
bindings.
-------------------------------------------------------------------
Sun Aug 8 14:29:38 CEST 2010 - vuntz@opensuse.org
- Update to version 2.21.5:
+ Adjust to API break in GObject-Introspection
+ Override test fixes for new GTK+ annotations
+ Fix up treeiter usage due to caller-allocates annotations in
gtk+
+ Add __name__ to DynamicModule class.
+ Do not override GdkRectangle.
+ Add override for TreeModel implementing __len__()
+ Fix warnings
+ Various fixes to demos, and new demos
- Changes from version 2.21.4:
+ Merge PyGI
+ Various fixes to demos, and new demos
- Changes from version 2.21.3:
+ Proper handling of null-ok in virtual methods
+ Fall back to use the floating references API in glib if there
isn't a sinkfunc defined.
+ Revert "Drop sinkfuncs."
+ [giounix] Make it possible to compile on glib 2.20
+ Release the lock when potentially invoking Python code.
- Changes from version 2.21.2:
+ Drop sinkfuncs.
+ Clear error if we failed the import
+ Added missing , to keyword list of gio.GFile.set_attribute
+ Fix arg conversion in gio.GFile.set_attribute
+ Set constants under python 2.5 or before
+ Doc Extractor: Use replacements that make sense for &...;
expressions.
+ Setup.py cosmetic tidy
+ Fix crash when importing gio
+ Include pygsource.h
+ codegen/docextract_to_xml.py: One more &...; replacement
(&nbsp;).
+ codegen/docextract_to_xml.py: Replace some &..; that cause
errors.
+ codegen/docextract_to_xml.py: Handle C++ multi-line comments.
+ codegen/docextract.py: Stop final section processing on first
match.
+ Update doc extraction tool to handle GObjectIntrospection
annotations.
+ bgo#613341 - pygobject tests seem to require pygtk causing a
circular dependencies problem
+ Don't raise an error in _pygi_import if pygi support is
disabled
+ Initialize PyGPollFD_Type.fd_obj to NULL
+ Wrap gio.Cancellable.make_pollfd() and add a test
+ Make cancellable an optional parameter in many methods
+ Documentation fixes.
+ Build fixes.
- Add gobject-introspection-devel, python-cairo-devel
BuildRequires.
- Remove non-existing --enable-pygi configure flag.
- Create a cairo subpackage, for the pygi cairo binding, so that
cairo is not installed by default with the main package (since
cairo implies installing X).
- Move /usr/bin/pygobject-codegen-2.0 and /usr/share/pygobject/ to
devel subpackage.
-------------------------------------------------------------------
Wed Jan 6 12:26:38 CET 2010 - vuntz@opensuse.org
- Update to version 2.21.1:
+ Wrap a lot of new API.
+ Make cancellable optional in gio.SocketClient.connect_to_host,
gio.SocketAddressEnumerator.next,
gio.Resolver.lookup_by_address, GFile.create_readwrite
+ Deprecate old gio.Drive methods
+ Strip g_ prefix for many other functions
+ Strip g_ prefix from InetAddress functions
+ Fix function name gio.resolver_get_default
+ Register enums and flags in PyGI if needed (bgo#603534)
+ Remove a duplicate entry in gio.defs
+ Fix handling of uchar in pyg_value_from_pyobject
-------------------------------------------------------------------
Sun Dec 20 11:57:27 CET 2009 - vuntz@opensuse.org
- Update to version 2.21.0:
+ pygmainloop: fix use of PySignal_WakeUpFD API for nested loops
(bgo#481569)
+ Add capabilities to import wrappers from pygi
+ Move threads_init() function from 'gobject' to 'glib'
+ Fix wrong minimum checking in float properties (bgo#587637)
+ Wrap new API added in GIO 2.22
+ Fix bad name when rebuilding the unix source module
+ Add the missing limit constants from glibconfig.h (bgo#603244)
+ Suppress warnings about format conversion (bgo#603355)
+ Properly define Connectable as interface type and not object
type
+ Wrap new API added in GIO-UNIX 2.22
+ Wrap g_find_program_in_path (bgo#598435)
+ Add pygi-external.h into Makefile SOURCES
- Pass --enable-pygi to configure to have introspection support.
-------------------------------------------------------------------
Thu Dec 17 17:54:09 CET 2009 - jengelh@medozas.de
- Package documentation as noarch
-------------------------------------------------------------------
Tue Sep 29 10:20:43 CEST 2009 - vuntz@opensuse.org
- Update to version 2.20.0:
- Allow to use automake 1.11
- Specify programming language in .devhelp file
- Plug reference leak of GSource in pyg_main_loop_init
- Updated uninstalled.pc file
- Changes from version 2.19.0:
- Add macros to help with Python list to/from GList/GSList
conversions.
- GIO docs practically completed
- GFileInfo.list_attributes should accept None/NULL
- Strip out Windows DLL API macros
- Document that many functions got moved gobject -> glib
- Allow h2def.py to work when there are tabs or multiple spaces
after the struct keyword.
- Fix build when builddir is not the same as srcdir
- Make gio.Emblem constructor new-style
- Cleanup GIO overrides to use Python function/method names
- Make codegen report errors using Python function/method names
- Fix object type in gio.BufferedInputStream_fill_async
- Wrap gio.BufferedInputStream.fill_async
- Add gio.BufferedOutputStream which was forgotten in the types
- Split overrides for gio.MemoryOutputStream
- Wrap gio.memory_input_stream_new_from_data
- Introduces the girepository module from the former PyBank
- Add API appeared in 2.20 but not marked as such in gio docs
- Wrap gio.FileOutputStream.query_info_async
- Wrap gio.FileInputStream.query_async
- Install executable codegen parts with executing permissions
- Wrap gio.DataInputStream.read_line_async and read_until_async
- Fix gio.OutputStream.splice_async
- Add GIO 2.20 API and update docs
- Remove AutoReqProv: it's default now.
-------------------------------------------------------------------
Wed May 27 12:25:51 CEST 2009 - vuntz@novell.com
- Update to version 2.18.0:
+ Improve gio docs with some more classes
+ Wrap gio.OutputStream.splice_async()
+ Add Python ver into installed libpyglib name
+ Wrap gio.OutputStream.flush_async()
+ Use 'Requires.private' for libffi in '.pc' files
+ Add wrapper for gio.FileAttributeMatcher
+ Mark relevant glib.IOChannel methods as METH_NOARGS
+ Retire hand-written ChangeLog; autocreate from Git history
+ Wrap gio.InputStream.skip_async()
+ Add in codegen -n --namespace option and the code to remove dll
API in headers, added documentation
+ Properly mark glib.get_user_special_dir() as a keywords method
-------------------------------------------------------------------
Fri May 1 12:45:48 CEST 2009 - mboman@suse.de
- Update to version 2.17.0:
+ Write a good part of the docs for gio
+ Wrap g_mount_guess_content_type
g_mount_guess_content_type_finish
+ Swap first two arguments of gio.File.query_info_async
+ Fix a crash in pyg_type_add_interfaces
+ Remove an empty structure, use sizeof(PyObject)
+ Wrap four g_get_user_*_dir() functions
+ Remove 'ltihooks.py' as using deprecated Python module
+ Code maintenance: add .gitignore files
+ CellRendererPixbuf stock-size property has wrong type
+ Add a doap file after git migration
+ missing dep on libffi in pygobject-2.0.pc
+ g_volume_monitor_tp_new new function, return the singleton
object
+ Remove a DeprecationWarning under python 2.6
+ several scripts from codegen directory are not distributed
+ g_file_copy_async change argument order to keep it consistent
with the other methods
+ memory leak in gio.File.copy_async
+ g_file_monitor should accept None for cancellable and set the
default flag to G_FILE_MONITOR_NONE
+ pyg_notify_free needs to ensure it has GIL before calling
Py_XDECREF
+ Wrap g_file_set_display_name_async
+ Add a semi-private method to return the option context C object
from an option context wrapper
+ Converting a negative long Python value to a GUINT64 GValue
doesn't error out as it should
+ Wrap g_file_set_attributes_async and g_file_set_attributes_finish
+ g_file_query_filesystem_info_async fix a typo
+ Wrap g_file_query_filesystem_info_async
+ Add missing g_file_query_filesystem_info_async and
g_file_query_filesystem_info_finish
+ Wrap g_file_eject_mountable
+ g_file_copy callback cannot be optional
+ Swap various kwargs names to reflect the code
+ Update the address of the FSF
+ Add g_volume_should_automount
+ Wrap g_drive_enumerate_identifiers and
g_volume_enumerate_identifiers
+ Add a couple of convinence functions to convert from/to a
python list and an array of strings
+ Allow setting pytype wrapper class
+ Wrap g_file_enumerator_close_async
-------------------------------------------------------------------
Sun Feb 22 16:32:12 CET 2009 - vuntz@novell.com
- Update to version 2.16.1:
+ Apply the patch provided by Cygwin Ports maintainer
(bgo#564018)
+ Bad -I ordering can break build, patch from (bgo#566737)
+ Fix keyword list to be in sync with positional arguments
(bgo#566744)
+ Add a comment explaining why the two for loops for registering
interfaces
+ Huge cleanup of GIO overrides (bgo#566706)
+ gtk.Buildable interface method override is not recognized
(bgo#566571)
+ Do not escape the ampersand "&" in entity references. Replace
some unusual entity references in the output with their literal
values. (bgo#568485)
+ gio.InputStream.read_async can cause memory corruption.
(bgo#567792)
+ Inconsistent use of tabs and spaces in pygtk.py (bgo#569350)
+ Huge fix of memory leaks in GIO (bgo#568427)
+ non-async functions don't release python locks before calling
blocking C functions (bgo#556250)
+ Change comment to avoid false positives when grep'ing for
deprecated gtk functions
+ ltihooks.py updating license header from GPL to LGPL
- Remove gtk-doc BuildRequires.
- Use %makeinstall
- Stop using pygobject-acinclude.m4: it's not needed anymore, it
seems.
- Use fdupes.
- Move /usr/lib/libpyglib-2.0.so to devel package.
- Add post/postun with ldconfig call.
-------------------------------------------------------------------
Mon Jan 5 09:59:37 EST 2009 - mboman@suse.de
- Update to version 2.16.0:
+ gobject.timeout_add_seconds() not found in docs (bgo#547119)
+ _wrap_g_output_stream_write_async not adding a reference to the
buffer passed (bgo#564102)
+ gio.VolumeMonitor segfaults (bgo#555613)
+ Test if `domain' is not-null before using it to avoids segfaults
(bgo#561826)
+ g_output_stream_write_all use gsize instead of gssize
+ add __repr__ to gio.Drive, gio.Mount and gio.Volume (bgo#530935)
+ Missing AC_CONFIG_MACRO_DIR([m4]) (bgo#551227)
+ Make codegen not import when corresponding argument types are not
registered (bgo#551056)
+ Fix typos breaking compilation (bgo#551212)
+ GFile load_contents methods chop data at first \0 (bgo#551059)
-------------------------------------------------------------------
Thu Sep 04 23:07:17 CEST 2008 - mboman@novell.com
- Update to version 2.15.4:
+ Too many changes and fixes to list. Please see NEWS for full details.
-------------------------------------------------------------------
Mon Jun 30 23:07:17 CEST 2008 - maw@suse.de
- Update to version 2.14.2:
+ Allow gobject.property work with subclasses (bgo#523352)
+ Unbreak Source.prepare (bgo#523075)
+ Never override customly set 'tp_new' and 'tp_alloc'
+ Don't link against libffi if we cannot find libffi on the
system (bgo#496006)
+ Dist .m4 files (bgo#496011)
+ Don't return NULL after warning of enum comparsion
(bgo#519631).
-------------------------------------------------------------------
Thu Apr 3 07:20:21 CEST 2008 - hpj@suse.de
- Upgraded to version 2.14.1:
* Avoid wakeups when using Python trunk.
* Add an uninstalled.pc.
-------------------------------------------------------------------
Thu Sep 20 13:14:09 CEST 2007 - sbrabec@suse.cz
- Updated to version 2.14.0:
* Fix a Python 2.6 deprecation warning
* Wrap g_timeout_add_seconds, when compiling with glib 2.14
* Always fully initialize the PyGObject
* Fix compilation in Solaris, again
* Fix check for default value in boolean type
* Fix new style properties with subclasses
* Docs generation fixes
-------------------------------------------------------------------
Tue Jan 9 14:16:06 CET 2007 - sbrabec@suse.cz
- Splitted python-gobject2-doc from python-gobject2-devel.
-------------------------------------------------------------------
Tue Jan 9 00:05:30 CET 2007 - cthiel@suse.de
- update to version 2.12.3
* distutils build fixes
* documentation updates
* gobject.handler_block_by_func and friends now accept methods
* avoid truncating of gparamspec
* set __module__ on gobject derived types
* Ensure exceptions are raised on errors in gobject.OptionGroup
-------------------------------------------------------------------
Mon Nov 27 19:34:34 CET 2006 - sbrabec@suse.cz
- Preamble typo fix.
-------------------------------------------------------------------
Sat Oct 21 13:45:11 CEST 2006 - cthiel@suse.de
- update to version 2.12.2
* Make PyGObject 64-bit safe for Python 2.5
* All headers are now LGPL and not GPL
* Remove a couple of GCC warnings
* Revive distutils support
* Emission hook reference count bugfix
* MSVC/ANSI C compilation fix
* Bump Ctrl-C timeout handler from 100ms to 1000
-------------------------------------------------------------------
Sun Oct 1 15:25:51 CEST 2006 - cthiel@suse.de
- update to version 2.12.1
* Corrected version check
- changes from 2.11.4 to 2.12.0
* Install the html files even when using --disable-docs
- changes from 2.11.3 to 2.11.4
* Include pre-generated html docs in the tarball
* Fix bug in do_set_property called from constructor
* Fix type registration involving interfaces with signals and/or properties
- changes from 2.11.2 to 2.11.3
* Documentation updates
* Documentation build fixes
* PyGObject can now be compiled using a C++ compiler
* Type registration bug fix
-------------------------------------------------------------------
Thu Aug 10 18:34:07 CEST 2006 - cthiel@suse.de
- initial package (version 2.11.2)

162
python3-gobject.spec Normal file
View File

@ -0,0 +1,162 @@
#
# spec file for package python-gobject
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
%define build_for_python3 1
%if %{build_for_python3}
%define local_py_requires Requires: python3
%define local_py_sitedir %{_libdir}/python3.1/site-packages
%else
%define local_py_requires %{py_requires}
%define local_py_sitedir %{py_sitedir}
%endif
Name: python3-gobject
%define _name pygobject
Summary: Python bindings for GObject
Version: 2.28.6
Release: 1
License: LGPLv2.1+
Group: Development/Libraries/Python
Url: http://ftp.gnome.org/pub/GNOME/sources/pygobject/
Source: http://ftp.gnome.org/pub/GNOME/sources/pygobject/2.28/%{_name}-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM python-gobject-python3.patch vuntz@opensuse.org -- Taken from git, various fixes for python3
Patch0: python-gobject-python3.patch
BuildRequires: fdupes
BuildRequires: glib2-devel
BuildRequires: gobject-introspection-devel
BuildRequires: libffi-devel
%if %{build_for_python3}
BuildRequires: python3-cairo-devel
BuildRequires: python3-devel
%else
BuildRequires: python-cairo-devel
BuildRequires: python-devel
Provides: python-gobject2 = %{version}
Obsoletes: python-gobject2 < %{version}
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{local_py_requires}
%description
Pygobjects is an extension module for python that gives you access to
GLib's GObjects.
%package cairo
License: LGPLv2.1+
Summary: Python bindings for GObject -- Cairo bindings
Group: Development/Libraries/Python
Requires: %{name} = %{version}
%if ! %{build_for_python3}
Provides: python-gobject2-cairo = %{version}
Obsoletes: python-gobject2-cairo < %{version}
%endif
%define cairo_real_package %(rpm -q --qf '%%{NAME}' --whatprovides cairo)
Supplements: packageand(%{name}:%{cairo_real_package})
%description cairo
Pygobjects is an extension module for python that gives you access to
GLib's GObjects.
This package contains the Python Cairo bindings for GObject.
%package devel
License: LGPLv2.1+
Summary: Python bindings for GObject
Group: Development/Libraries/Python
Requires: %{name} = %{version}
%if %{build_for_python3}
# Several files are conflicting between python2 and python3 builds
Conflicts: python-gobject-devel
%else
Provides: python-gobject2-devel = %{version}
Obsoletes: python-gobject2-devel < %{version}
Provides: python-gobject2-doc = %{version}
Obsoletes: python-gobject2-doc < %{version}
%endif
%description devel
This package contains files required to build wrappers for gobject
addon libraries such as pygtk.
%prep
%setup -q -n %{_name}-%{version}
%patch0 -p1
autoreconf -fi
%build
%if %{build_for_python3}
export PYTHON=python3
%endif
%configure
make %{?jobs:-j%jobs} V=1
%install
%makeinstall
find $RPM_BUILD_ROOT -name '*.la' -or -name '*.a' | xargs rm -f
rm examples/Makefile*
%fdupes $RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc AUTHORS NEWS README ChangeLog examples
%dir %{local_py_sitedir}/gtk-2.0
%{local_py_sitedir}/gi/
%{local_py_sitedir}/gtk-2.0/gio/
%{local_py_sitedir}/glib/
%{local_py_sitedir}/gobject/
%{local_py_sitedir}/gtk-2.0/dsextras.py*
%{local_py_sitedir}/pygtk.*
%{_libdir}/*.so.*
# Live in cairo subpackage
%exclude %{local_py_sitedir}/gi/_gi_cairo.so
%files cairo
%defattr(-,root,root)
%{local_py_sitedir}/gi/_gi_cairo.so
%files devel
%defattr(-,root,root)
%{_includedir}/pygtk-2.0/
%{_libdir}/*.so
%{_libdir}/pkgconfig/pygobject-2.0.pc
## codegen
%{_bindir}/pygobject-codegen-2.0
# we explicitly list the directories here to be sure we don't include something
# that should live in the main package
%dir %{_datadir}/%{_name}
%dir %{_datadir}/%{_name}/2.0
%{_datadir}/%{_name}/2.0/codegen/
%{_datadir}/%{_name}/2.0/defs/
%{_datadir}/%{_name}/xsl/
## doc: we need the files there since building API docs for other python
## bindings require some files from here
# Own these repositories to not depend on gtk-doc while building:
%dir %{_datadir}/gtk-doc
%dir %{_datadir}/gtk-doc/html
%{_datadir}/gtk-doc/html/pygobject/
%changelog