update to upstream 2.27.0
- patches no longer needed as they are committed upstream
This commit is contained in:
parent
a781b5c135
commit
a44ae84da8
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
pygobject-2.21.5.tar.bz2
|
||||
/pygobject-2.26.0.tar.bz2
|
||||
/pygobject-2.27.0.tar.bz2
|
||||
|
||||
@ -1,42 +0,0 @@
|
||||
diff -up python3-pygobject2-2.26.0-1.fc14/configure.pygobject-py3m4 python3-pygobject2-2.26.0-1.fc14/configure
|
||||
--- python3-pygobject2-2.26.0-1.fc14/configure.pygobject-py3m4 2010-09-27 22:52:16.979414660 -0400
|
||||
+++ python3-pygobject2-2.26.0-1.fc14/configure 2010-09-27 22:53:00.437408582 -0400
|
||||
@@ -13854,7 +13854,7 @@ $as_echo_n "checking for $am_display_PYT
|
||||
if test "${am_cv_python_pythondir+set}" = set; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
- am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null ||
|
||||
+ am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX'))" 2>/dev/null ||
|
||||
echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5
|
||||
@@ -13871,7 +13871,7 @@ $as_echo_n "checking for $am_display_PYT
|
||||
if test "${am_cv_python_pyexecdir+set}" = set; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
- am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null ||
|
||||
+ am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX'))" 2>/dev/null ||
|
||||
echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"`
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5
|
||||
diff -up python3-pygobject2-2.26.0-1.fc14/m4/python.m4.pygobject-py3m4 python3-pygobject2-2.26.0-1.fc14/m4/python.m4
|
||||
--- python3-pygobject2-2.26.0-1.fc14/m4/python.m4.pygobject-py3m4 2010-07-28 09:04:44.000000000 -0400
|
||||
+++ python3-pygobject2-2.26.0-1.fc14/m4/python.m4 2010-09-27 22:40:07.937409005 -0400
|
||||
@@ -196,7 +196,7 @@ python2.1 python2.0])
|
||||
dnl doesn't work.
|
||||
AC_CACHE_CHECK([for $am_display_PYTHON script directory],
|
||||
[am_cv_python_pythondir],
|
||||
- [am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null ||
|
||||
+ [am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX'))" 2>/dev/null ||
|
||||
echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`])
|
||||
AC_SUBST([pythondir], [$am_cv_python_pythondir])
|
||||
|
||||
@@ -213,7 +213,7 @@ python2.1 python2.0])
|
||||
dnl doesn't work.
|
||||
AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
|
||||
[am_cv_python_pyexecdir],
|
||||
- [am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null ||
|
||||
+ [am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX'))" 2>/dev/null ||
|
||||
echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"`])
|
||||
AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
|
||||
|
||||
@ -1,185 +0,0 @@
|
||||
diff --git a/gi/gimodule.c b/gi/gimodule.c
|
||||
index 89caf4e..d42e7e4 100644
|
||||
--- a/gi/gimodule.c
|
||||
+++ b/gi/gimodule.c
|
||||
@@ -328,7 +328,7 @@ PYGLIB_MODULE_START(_gi, "_gi")
|
||||
_pygi_boxed_register_types (module);
|
||||
_pygi_argument_init();
|
||||
|
||||
- api = PyCObject_FromVoidPtr ( (void *) &CAPI, NULL);
|
||||
+ api = PYGLIB_PyCapsule_New ( (void *) &CAPI, "gi._API");
|
||||
if (api == NULL) {
|
||||
return;
|
||||
}
|
||||
diff --git a/gi/pygi.h b/gi/pygi.h
|
||||
index d1eaf05..551bb6f 100644
|
||||
--- a/gi/pygi.h
|
||||
+++ b/gi/pygi.h
|
||||
@@ -83,8 +83,11 @@ _pygi_import (void)
|
||||
if (PyGI_API != NULL) {
|
||||
return 1;
|
||||
}
|
||||
-
|
||||
+#if PY_VERSION_HEX >= 0x03000000
|
||||
+ PyGI_API = (struct PyGI_API*) PyCapsule_Import("gi._API", FALSE);
|
||||
+#else
|
||||
PyGI_API = (struct PyGI_API*) PyCObject_Import("gi", "_API");
|
||||
+#endif
|
||||
if (PyGI_API == NULL) {
|
||||
return -1;
|
||||
}
|
||||
diff --git a/glib/glibmodule.c b/glib/glibmodule.c
|
||||
index ebea163..f1c8168 100644
|
||||
--- a/glib/glibmodule.c
|
||||
+++ b/glib/glibmodule.c
|
||||
@@ -627,7 +627,7 @@ pyglib_uri_list_extract_uris(PyObject *self, PyObject *args, PyObject *kwargs)
|
||||
|
||||
ret = PyTuple_New(i);
|
||||
for (j = 0; j < i; j++)
|
||||
- PyTuple_SetItem(ret, j, PyString_FromString(uris[j]));
|
||||
+ PyTuple_SetItem(ret, j, PYGLIB_PyUnicode_FromString(uris[j]));
|
||||
|
||||
g_strfreev(uris);
|
||||
|
||||
@@ -797,7 +797,7 @@ pyglib_register_api(PyObject *d)
|
||||
|
||||
/* for addon libraries ... */
|
||||
PyDict_SetItemString(d, "_PyGLib_API",
|
||||
- o=PyCObject_FromVoidPtr(&pyglib_api,NULL));
|
||||
+ o=PYGLIB_PyCapsule_New(&pyglib_api,"glib._PyGLib_API"));
|
||||
Py_DECREF(o);
|
||||
|
||||
pyglib_init_internal(o);
|
||||
diff --git a/glib/pyglib-python-compat.h b/glib/pyglib-python-compat.h
|
||||
index bb7bcad..222fc8c 100644
|
||||
--- a/glib/pyglib-python-compat.h
|
||||
+++ b/glib/pyglib-python-compat.h
|
||||
@@ -41,6 +41,25 @@ typedef int Py_ssize_t;
|
||||
typedef inquiry lenfunc;
|
||||
#endif
|
||||
|
||||
+/* PyCObject superceded by PyCapsule on Python >= 2.7 */
|
||||
+#if PY_VERSION_HEX >= 0x03000000
|
||||
+# define PYGLIB_PyCapsule_Check PyCapsule_CheckExact
|
||||
+# define PYGLIB_PyCapsule_New(ptr, typename) \
|
||||
+ PyCapsule_New(ptr, typename, NULL)
|
||||
+# define PYGLIB_PyCapsule_GetPointer(obj, typename) \
|
||||
+ PyCapsule_GetPointer(obj, typename)
|
||||
+# define PYGLIB_PyCapsule_Import(module, symbol) \
|
||||
+ PyCapsule_Import(##module##.##symbol##, FALSE)
|
||||
+#else
|
||||
+# define PYGLIB_PyCapsule_Check PyCObject_Check
|
||||
+# define PYGLIB_PyCapsule_New(ptr, typename) \
|
||||
+ PyCObject_FromVoidPtr(ptr, NULL)
|
||||
+# define PYGLIB_PyCapsule_GetPointer(obj, typename) \
|
||||
+ PyCObject_AsVoidPtr(obj)
|
||||
+# define PYGLIB_PyCapsule_Import(module, symbol) \
|
||||
+ PyCObject_Import(module, symbol)
|
||||
+#endif
|
||||
+
|
||||
#if PY_VERSION_HEX < 0x03000000
|
||||
|
||||
#define PYGLIB_INIT_FUNCTION(modname, fullpkgname, functions) \
|
||||
diff --git a/glib/pyglib.c b/glib/pyglib.c
|
||||
index 07db579..7e1b106 100644
|
||||
--- a/glib/pyglib.c
|
||||
+++ b/glib/pyglib.c
|
||||
@@ -71,8 +71,8 @@ pyglib_init(void)
|
||||
}
|
||||
|
||||
cobject = PyObject_GetAttrString(glib, "_PyGLib_API");
|
||||
- if (cobject && PyCObject_Check(cobject))
|
||||
- _PyGLib_API = (struct _PyGLib_Functions *) PyCObject_AsVoidPtr(cobject);
|
||||
+ if (cobject && PYGLIB_PyCapsule_Check(cobject))
|
||||
+ _PyGLib_API = (struct _PyGLib_Functions *) PYGLIB_PyCapsule_GetPointer(cobject, "glib._PyGLib_API");
|
||||
else {
|
||||
PyErr_SetString(PyExc_ImportError,
|
||||
"could not import glib (could not find _PyGLib_API object)");
|
||||
@@ -88,7 +88,7 @@ pyglib_init(void)
|
||||
void
|
||||
pyglib_init_internal(PyObject *api)
|
||||
{
|
||||
- _PyGLib_API = (struct _PyGLib_Functions *) PyCObject_AsVoidPtr(api);
|
||||
+ _PyGLib_API = (struct _PyGLib_Functions *) PYGLIB_PyCapsule_GetPointer(api, "glib._PyGLib_API");
|
||||
}
|
||||
|
||||
gboolean
|
||||
diff --git a/glib/pygoptioncontext.c b/glib/pygoptioncontext.c
|
||||
index 1d67ac5..fe0a2b3 100644
|
||||
--- a/glib/pygoptioncontext.c
|
||||
+++ b/glib/pygoptioncontext.c
|
||||
@@ -288,7 +288,7 @@ pyg_option_context_richcompare(PyObject *self, PyObject *other, int op)
|
||||
static PyObject *
|
||||
pyg_option_get_context(PyGOptionContext *self)
|
||||
{
|
||||
- return PyCObject_FromVoidPtr(self->context, NULL);
|
||||
+ return PYGLIB_PyCapsule_New(self->context, "goption.context");
|
||||
}
|
||||
|
||||
static PyMethodDef pyg_option_context_methods[] = {
|
||||
diff --git a/gobject/gobjectmodule.c b/gobject/gobjectmodule.c
|
||||
index 4e9c07d..b6d6f1d 100644
|
||||
--- a/gobject/gobjectmodule.c
|
||||
+++ b/gobject/gobjectmodule.c
|
||||
@@ -2511,7 +2511,7 @@ pygobject_register_api(PyObject *d)
|
||||
{
|
||||
PyObject *api;
|
||||
|
||||
- api = PyCObject_FromVoidPtr(&pygobject_api_functions,NULL);
|
||||
+ api = PYGLIB_PyCapsule_New(&pygobject_api_functions, "gobject._PyGObject_API");
|
||||
PyDict_SetItemString(d, "_PyGObject_API", api);
|
||||
Py_DECREF(api);
|
||||
}
|
||||
diff --git a/gobject/pygobject.h b/gobject/pygobject.h
|
||||
index e75c890..c803634 100644
|
||||
--- a/gobject/pygobject.h
|
||||
+++ b/gobject/pygobject.h
|
||||
@@ -352,8 +352,14 @@ pygobject_init(int req_major, int req_minor, int req_micro)
|
||||
}
|
||||
|
||||
cobject = PyObject_GetAttrString(gobject, "_PyGObject_API");
|
||||
+#if PY_VERSION_HEX >= 0x03000000
|
||||
+ if (cobject && PyCapsule_CheckExact(cobject))
|
||||
+ _PyGObject_API = (struct _PyGObject_Functions *) PyCapsule_GetPointer(cobject, "gobject._PyGObject_API");
|
||||
+
|
||||
+#else
|
||||
if (cobject && PyCObject_Check(cobject))
|
||||
_PyGObject_API = (struct _PyGObject_Functions *) PyCObject_AsVoidPtr(cobject);
|
||||
+#endif
|
||||
else {
|
||||
PyErr_SetString(PyExc_ImportError,
|
||||
"could not import gobject (could not find _PyGObject_API object)");
|
||||
diff --git a/gobject/pygtype.c b/gobject/pygtype.c
|
||||
index c875aa2..19d8b64 100644
|
||||
--- a/gobject/pygtype.c
|
||||
+++ b/gobject/pygtype.c
|
||||
@@ -864,8 +864,8 @@ pyg_value_from_pyobject(GValue *value, PyObject *obj)
|
||||
else if (PyObject_TypeCheck(obj, &PyGPointer_Type) &&
|
||||
G_VALUE_HOLDS(value, ((PyGPointer *)obj)->gtype))
|
||||
g_value_set_pointer(value, pyg_pointer_get(obj, gpointer));
|
||||
- else if (PyCObject_Check(obj))
|
||||
- g_value_set_pointer(value, PyCObject_AsVoidPtr(obj));
|
||||
+ else if (PYGLIB_PyCapsule_Check(obj))
|
||||
+ g_value_set_pointer(value, PYGLIB_PyCapsule_GetPointer(obj, NULL));
|
||||
else
|
||||
return -1;
|
||||
break;
|
||||
@@ -910,15 +910,15 @@ pyg_value_from_pyobject(GValue *value, PyObject *obj)
|
||||
}
|
||||
else if ((bm = pyg_type_lookup(G_VALUE_TYPE(value))) != NULL)
|
||||
return bm->tovalue(value, obj);
|
||||
- else if (PyCObject_Check(obj))
|
||||
- g_value_set_boxed(value, PyCObject_AsVoidPtr(obj));
|
||||
+ else if (PYGLIB_PyCapsule_Check(obj))
|
||||
+ g_value_set_boxed(value, PYGLIB_PyCapsule_GetPointer(obj, NULL));
|
||||
else
|
||||
return -1;
|
||||
break;
|
||||
}
|
||||
case G_TYPE_PARAM:
|
||||
if (PyGParamSpec_Check(obj))
|
||||
- g_value_set_param(value, PyCObject_AsVoidPtr(obj));
|
||||
+ g_value_set_param(value, PYGLIB_PyCapsule_GetPointer(obj, NULL));
|
||||
else
|
||||
return -1;
|
||||
break;
|
||||
@ -1,38 +0,0 @@
|
||||
diff --git a/dsextras.py b/dsextras.py
|
||||
index 10973e2..db771f2 100644
|
||||
--- a/dsextras.py
|
||||
+++ b/dsextras.py
|
||||
@@ -122,8 +122,8 @@ class BuildExt(build_ext):
|
||||
msnative_struct = { '2' : '-fnative-struct',
|
||||
'3' : '-mms-bitfields' }
|
||||
gcc_version = getoutput('gcc -dumpversion')
|
||||
- print 'using MinGW GCC version %s with %s option' % \
|
||||
- (gcc_version, msnative_struct[gcc_version[0]])
|
||||
+ print ('using MinGW GCC version %s with %s option' % \
|
||||
+ (gcc_version, msnative_struct[gcc_version[0]]))
|
||||
self.extra_compile_args.append(msnative_struct[gcc_version[0]])
|
||||
|
||||
def modify_compiler(self):
|
||||
@@ -312,9 +312,9 @@ class PkgConfigExtension(Extension):
|
||||
self.can_build_ok = 1
|
||||
return 1
|
||||
else:
|
||||
- print "Warning: Too old version of %s" % self.pkc_name
|
||||
- print " Need %s, but %s is installed" % \
|
||||
- (version, orig_version)
|
||||
+ print ("Warning: Too old version of %s" % self.pkc_name)
|
||||
+ print (" Need %s, but %s is installed" % \
|
||||
+ (version, orig_version))
|
||||
self.can_build_ok = 0
|
||||
return 0
|
||||
|
||||
@@ -343,7 +343,8 @@ try:
|
||||
from codegen.codegen import register_types, SourceWriter, \
|
||||
FileOutput
|
||||
import codegen.createdefs
|
||||
-except ImportError, e:
|
||||
+except ImportError:
|
||||
+ (etype, e) = sys.exc_info()[:2]
|
||||
template_classes_enabled=False
|
||||
|
||||
class Template(object):
|
||||
@ -11,8 +11,8 @@
|
||||
### Abstract ###
|
||||
|
||||
Name: pygobject2
|
||||
Version: 2.26.0
|
||||
Release: 4%{?dist}
|
||||
Version: 2.27.0
|
||||
Release: 1%{?dist}
|
||||
License: LGPLv2+
|
||||
Group: Development/Languages
|
||||
Summary: Python 2 bindings for GObject
|
||||
@ -20,9 +20,6 @@ URL: http://www.pygtk.org/
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||
#VCS: git:git://git.gnome.org/pygobject
|
||||
Source: http://ftp.gnome.org/pub/GNOME/sources/pygobject/2.21/pygobject-%{version}.tar.bz2
|
||||
Patch1: pygobject-py3m4.patch
|
||||
Patch2: pygobject2-py3k-dist.patch
|
||||
Patch3: pygobject-pycapsule.patch
|
||||
### Build Dependencies ###
|
||||
|
||||
BuildRequires: glib2-devel >= %{glib2_version}
|
||||
@ -92,9 +89,6 @@ for use in Python 3 programs.
|
||||
|
||||
%prep
|
||||
%setup -q -n pygobject-%{version}
|
||||
%patch1 -p1 -b .pygobject-py3m4
|
||||
%patch2 -p1 -b .pygobject-py3k-dist
|
||||
%patch3 -p1 -b .pygobject-pycapsule
|
||||
|
||||
%if 0%{?with_python3}
|
||||
rm -rf %{py3dir}
|
||||
@ -183,6 +177,9 @@ rm examples/Makefile*
|
||||
%endif # with_python3
|
||||
|
||||
%changelog
|
||||
* Wed Nov 10 2010 John (J5) Palmieri <johnp@redhat.com> - 2.27.0-1
|
||||
- update to upstream version 2.27.0
|
||||
|
||||
* Thu Sep 30 2010 John (J5) Palmieri <johnp@redhat.com> - 2.26.0-4
|
||||
- Edit PyCapsule patch to only use PyCapsule in Python 3.x
|
||||
since this effects header files which require other modules to
|
||||
|
||||
Loading…
Reference in New Issue
Block a user