debian/0000755000000000000000000000000012302376233007167 5ustar debian/control.in0000644000000000000000000000713012143110551011170 0ustar Source: pygobject-2 Section: oldlibs Priority: optional Maintainer: Josselin Mouette Uploaders: @GNOME_TEAM@ Build-Depends: debhelper (>= 7), gnome-pkg-tools (>= 0.10), dh-autoreconf, cdbs (>= 0.4.90~), quilt, python-all-dev (>= 2.6.6-3~), libglib2.0-dev (>= 2.24.0), libcairo2-dev, libffi-dev (>= 3.0.5), python-cairo-dev (>= 1.2.0), xsltproc, xvfb, xauth, dbus-x11, docbook-xsl, autotools-dev, python-all-dbg, python-apt-dbg, python-cairo-dbg X-Python-Version: >= 2.5 Standards-Version: 3.9.4 Vcs-Svn: svn://svn.debian.org/svn/pkg-gnome/packages/unstable/pygobject-2 Vcs-Browser: http://svn.debian.org/viewsvn/pkg-gnome/packages/unstable/pygobject-2 Package: python-gobject-2 Architecture: any Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends} Provides: ${python:Provides}, python2.7-gobject Breaks: python-gobject (<< 2.90) Replaces: python-gobject (<< 2.90) Suggests: python-gobject-2-dbg Description: deprecated static Python bindings for the GObject library GObject is an abstraction layer that allows programming with an object paradigm that is compatible with many languages. It is a part of Glib, the core library used to build GTK+ and GNOME. . This package contains the static Python bindings for gobject, glib, and gio. These are deprecated by dynamic gobject-introspection bindings (which are provided with the python-gobject package), and should not be used in newly written code. These static bindings just exist to provide backwards compatibility for GNOME 2 based software. Package: python-gobject-2-dev Architecture: all Depends: ${python:Depends}, ${misc:Depends}, python-gobject-2 (>= ${source:Version}), python-dev, libglib2.0-dev (>= 2.24.0), libffi-dev (>= 3.0.5) Recommends: docbook-xsl Breaks: python-gobject-dev (<< 2.90) Replaces: python-gobject-dev (<< 2.90) Description: development headers for the static GObject Python bindings GObject is an abstraction layer that allows programming with an object paradigm that is compatible with many languages. It is a part of Glib, the core library used to build GTK+ and GNOME. . This package contains the development headers needed to build static Python bindings relying on pygobject. Note that this is obsolete, new libraries and applications should use the dynamic gobject-introspection bindings (which are provided with the python-gobject package). Package: python-gobject-2-dbg Section: debug Priority: extra Architecture: any Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends}, python-gobject-2 (= ${binary:Version}) Breaks: python-gobject-dbg (<< 2.90) Replaces: python-gobject-dbg (<< 2.90) Description: deprecated static Python bindings for the GObject library (debug extension) GObject is an abstraction layer that allows programming with an object paradigm that is compatible with many languages. It is a part of Glib, the core library used to build GTK+ and GNOME. . This package contains the static Python bindings for gobject, glib, and gio. These are deprecated by dynamic gobject-introspection bindings (which are provided with the python-gobject package), and should not be used in newly written code. These static bindings just exist to provide backwards compatibility for GNOME 2 based software. . This package contains the extensions built for the Python debug interpreter. debian/docs0000644000000000000000000000002410506320627010036 0ustar NEWS README AUTHORS debian/copyright0000644000000000000000000000542211727704226011134 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: pygobject Source: http://ftp.gnome.org/pub/GNOME/sources/pygobject/ Files: * Copyright: Copyright (C) 1998-2003 James Henstridge Copyright (C) 2004 Johan Dahlin Copyright (C) 2005-2009 Johan Dahlin Copyright (C) 2005 Oracle Copyright (C) 2006 Johannes Hoelzl Copyright (C) 2007 Johan Dahlin Copyright (C) 2008 Gian Mario Tagliaretti Copyright (C) 2008 Johan Dahlin Copyright (C) 2009 Simon van der Linden Copyright (C) 2010 Collabora Ltd. Copyright (c) 2011 Laszlo Pandy License: LGPL-2.1+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. . You should have received a copy of the GNU Lesser General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA . On Debian systems, the complete text of the GNU Lesser General Public License can be found in `/usr/share/common-licenses/LGPL-2'. Files: gi/pygi-property.* gi/pygi-signal-closure.h gi/pygi-foreign* Copyright: Copyright (c) 2010 Collabora Ltd. Copyright (c) 2011 Laszlo Pandy Copyright (c) 2010 litl, LLC License: MIT/X11 (BSD like) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. debian/python-gobject-2.examples0000644000000000000000000000001611622703451014017 0ustar examples/*.py debian/changelog0000644000000000000000000006165612302376233011057 0ustar pygobject-2 (2.28.6-12build1) trusty; urgency=medium * Rebuild to drop files installed into /usr/share/pyshared. -- Matthias Klose Sun, 23 Feb 2014 13:50:19 +0000 pygobject-2 (2.28.6-12) unstable; urgency=low * Rebuild to use Python 2.7 by default. (Closes: #701972) * Bump Standards-Version to 3.9.4, no changes necessary. -- Martin Pitt Fri, 10 May 2013 08:19:32 +0200 pygobject-2 (2.28.6-11) unstable; urgency=low * debian/control.in: Drop the "Provides: python2.6-gobject". There are no reverse dependencies anyway, and we don't encourage any new ones. * Add 00git_class_init.patch: Move property and signal creation into _class_init(). This allows old PyGTK applications to work with static PyGObject and GLib 2.35.x. (LP: #1129309) -- Martin Pitt Tue, 19 Feb 2013 16:19:52 +0100 pygobject-2 (2.28.6-10) unstable; urgency=low [ Josselin Mouette ] * Update repository URL. [ Martin Pitt ] * Add 00git_fix_qdata_warning.patch: Fix set_qdata warning on accessing NULL gobject property. Backported from upstream git. * Add 00git_gio_flag_type.patch: Fix definition of flag types. Backported from upstream git. (LP: #918607) * debian/copyright: Update to copyright format 1.0. * debian/control.in: Bump Standards-Version to 3.9.3. -- Martin Pitt Tue, 13 Mar 2012 18:52:21 +0100 pygobject-2 (2.28.6-9) unstable; urgency=high * Urgency high as this blocks the testing migration of g-i, pygobject, and others, and this is a trivial change. * debian/control.in: Add "Provides: python2.x-gobject" to python-gobject-2 to also satisfy dependencies for packages which use the obsolete explicit dependencies, such as python-insanity. (Closes: #651824) -- Martin Pitt Mon, 12 Dec 2011 14:15:29 +0100 pygobject-2 (2.28.6-8) unstable; urgency=low * Upload to unstable -- Sjoerd Simons Sun, 20 Nov 2011 11:32:42 +0000 pygobject-2 (2.28.6-7) experimental; urgency=low * debian/control.in, debian/rules: Rename python-gobject-dev to python-gobject-2-dev. pygobject 2.90 now also builds a python-gobject-dev which depends on python-gobject-2-dev. * debian/control.in: Fix "Conflicts/Breaks" pairs to actually be what I mean: "Breaks/Replaces". -- Martin Pitt Mon, 05 Sep 2011 07:49:29 +0200 pygobject-2 (2.28.6-6) experimental; urgency=low * debian/copyright: Update to current licenses/copyrights, and convert to DEP-5. -- Martin Pitt Thu, 18 Aug 2011 07:51:59 +0200 pygobject-2 (2.28.6-5) experimental; urgency=low * Split package: The 2.28 version is now deprecated and called pygobject-2; it will only contain the old static bindings without introspection. The pygobject 3.0 version only contains the introspection bindings now, and will depend on python-gobject-2 for backwards compatibility until all packages get ported to use introspection. - debian/control.in, debian/rules: Rename packages to *-2 and update description to point out that these are deprecated and only provided for backwards compatibility. - debian/control.in, debian/rules: Drop python 3 packages; python3-gobject does not yet have any reverse dependencies, and we don't want to encourage porting to Python 3 without porting to GI as well. - debian/control.in: Update Vcs-* for pygobject-2 branch. - debian/rules: Disable introspection support. Drop gobject-introspection and libgirepository1.0-dev build dependencies. - debian/control.in: Conflicts/Breaks python-gobject{,-dbg} << 2.90. -- Martin Pitt Wed, 17 Aug 2011 11:24:46 +0200 pygobject (2.28.6-4) unstable; urgency=low * debian/rules: Create shlibs for python3 packages, too. * debian/rules: Call dh_strip on python3-gobject, too. -- Martin Pitt Thu, 14 Jul 2011 11:43:08 +0200 pygobject (2.28.6-3) unstable; urgency=low * Cherrypick some fixes from pygobject-2-28 upstream branch: - 00git_test_case_hang.patch: Fix hang in test suite when TestGDBusClient.test_native_calls_async() test case fails. - 00git_messagebox_type.patch: Fix MessageBox so it correctly handles the type constructor param. - 00git_python3_build.patch, 00git_python3-maketrans.patch: Python 3 fixes. - 00git_gio_test.patch: Port test_properties from static gio to GI Gio, so that the tests will also work with Python 3. * debian/control.in, debian/rules: Add and build python3-gobject and python3-gobject-dbg packages. Until we get py3cairo packaged in Debian (in the works), we need to build the python3 flavour with --disable-cairo, and apply some workarounds in debian/rules (see the "FIXME"s); these will disappear again with py3cairo. -- Martin Pitt Thu, 14 Jul 2011 11:17:05 +0200 pygobject (2.28.6-2) unstable; urgency=low * Cherrypick some fixes from pygobject-2-28 upstream branch: - Add 00git_enum_properties.patch: Add support for enums in gobject.property - Add 00git_cairo_init.patch: Correctly initialize the _gi_cairo_functions array to be zero filled - 00git_textiter_crash.patch: Fix crash in Gtk.TextIter overrides -- Martin Pitt Fri, 08 Jul 2011 12:01:44 +0200 pygobject (2.28.6-1) unstable; urgency=low * New upstream bug fix release. * Drop 21_fix_symbol_names_to_be_locale_independent.patch, fixed upstream. * debian/watch: Fix syntax to actually catch current versions. * debian/watch: Move to .bz2 tarballs, upstream stopped publishing gz. -- Martin Pitt Tue, 14 Jun 2011 11:05:13 +0200 pygobject (2.28.4-1) unstable; urgency=low [ Josselin Mouette ] * Drop ${python:Provides} for python-gobject-cairo (it depends on python-cairo). [ Laurent Bigonville ] * New upstream release. - Revert ABI break (Closes: #625703) * debian/control.in: Bump Standards-Version to 3.9.2 (no further changes) * debian/patches/21_fix_symbol_names_to_be_locale_independent.patch: Fix case conversion issue (Taken from upstream) -- Laurent Bigonville Fri, 06 May 2011 14:05:14 +0200 pygobject (2.28.3-3) unstable; urgency=low * Rebuild for python 2.7 transition, no source changes. -- Laurent Bigonville Tue, 19 Apr 2011 21:38:48 +0200 pygobject (2.28.3-2) unstable; urgency=low * Upload to unstable -- Laurent Bigonville Sun, 10 Apr 2011 23:41:56 +0200 pygobject (2.28.3-1) experimental; urgency=low [ Laurent Bigonville ] * New upstream release (Closes: #619338). * debian/control.in: - Bump cdbs and python-all-dev build-dependencies - Drop XB-Python-Version: ${python:Versions} - Make python-gobject-dbg Depends against ${python:Depends} instead of python-dbg - Build-dependends against dh-autoreconf - Add xauth, gir1.2-glib-2.0, gir1.2-gtk-3.0 and gir1.2-freedesktop to build-depends, needed by the tests * Drop d/p/40_revert_libpython_link.patch, d/p/30_[gi-overrides]-fix-exception-block-so-it-works-in-Python-2.5.patch: Applied upstream * Drop debian/patches/99_autoreconf.patch: Not needed anymore * debian/rules: Call dh_autoreconf{_clean} instead of handeling this by hand, should Closes: #558530 [ Martin Pitt ] * debian/rules: Move from pysupport (which is being deprecated) to dh_python2. Drop python-support build dependency. (Closes: #614764) * debian/rules: Install a library search path for a pysupport compatible gtk-2.0 directory, to avoid instantly breaking all reverse dependencies. This needs to stay until they get converted to dh_python2. * Fix test suite calls during package build (Closes: #619257): - debian/rules: Copy Python files from our modules into build tree, so that the tests actually find them. In Python you can't have Python modules and compiled extensions which belong to the same import in different directories. (Unfortunately it's hard to upstream this, so keep it as a Debian specific hack for now.) - debian/rules: Run the tests under xvfb so that the Gdk/Gtk ones can succeed. - debian/rules: Disable fakeroot for the tests by unsetting $LD_PRELOAD. Otherwise the tests try to connect to root's session D-BUS. - debian/control.in: Add build dependencies: xvfb (as we now use it in debian/rules), dbus-x11 (as the test suite uses dbus-launch), and python-apt-dbg/python-cairo-dbg, so that the test cases for the debug builds have all dependencies met. -- Laurent Bigonville Thu, 24 Mar 2011 16:05:06 +0100 pygobject (2.28.0-2) experimental; urgency=low * Add debian/patches/40_revert_libpython_link.patch: Do not link against libpython, taken from upstream (Closes: #618749) * Add debian/patches/99_autoreconf.patch: Run autoreconf -- Laurent Bigonville Mon, 21 Mar 2011 14:15:03 +0100 pygobject (2.28.0-1) experimental; urgency=low * New upstream stable release: - Fix glib.main_context_default() causes immediate segfault (Closes: #580791) - Fix import error with GTK3 gir binding (Closes: #618557) * debian/control.in: - Bump python-cairo-dev and gobject-introspection build-dependencies - Bump python-gobject-dev dependency against libglib2.0-dev - Drop Build-Conflicts against python2.3-dev (<< 2.3.5) - Drop C/R/P against python-gobject-doc - Drop Conflicts against python-gtk2{-dev,} (<< 2.10) * debian/rules: Adjust installation path for cairo binding * debian/copyright: Update copyright file * debian/rules: Remove explicit calls to quilt as we are using '3.0 (quilt)' format * d/p/30_[gi-overrides]-fix-exception-block-so-it-works-in-Python-2.5.patch: Make exception compatible with python 2.5 (taken from upstream) -- Laurent Bigonville Wed, 16 Mar 2011 13:28:29 +0100 pygobject (2.27.0-2) experimental; urgency=low * debian/control.in: - Depend on gir1.2-glib-2.0 instead of in gir1.0-glib-2.0. - Build depend on libglib2.0-dev >= 2.24. Closes: #609277. -- Emilio Pozuelo Monfort Sat, 08 Jan 2011 02:34:41 +0000 pygobject (2.27.0-1) experimental; urgency=low * New upstream release. * debian/control.in: - Bump Standards-Version to 3.9.1 (no further changes) - Build-depend on libgirepository1.0-dev, libcairo2-dev, python-cairo-dev and gobject-introspection - python-gobject: Conflicts/Replaces/Provides python-gi - python-gobject: Add dependency against gir1.0-glib-2.0 - Add python-gobject-cairo package and make python-gobject Recommends it - Bump minimal python version to 2.5.2 * debian/rules: - Don't need --enable-pygi, it is now merged - Install files for python-gobject-cairo * Drop debian/patches/03_maintainer_mode.patch: Merged upstream * Drop debian/patches/90_autofoo.patch: Not needed anymore * debian/watch: Bump version to 3 -- Laurent Bigonville Wed, 24 Nov 2010 22:10:22 +0100 pygobject (2.21.4+is.2.21.3-1) unstable; urgency=low * Downgrade to version 2.21.3 since PyGI is absolutely not ready to make it to a stable release. Closes: #590680, #592570. * Revert all Laurent’s corresponding packaging changes, except the following: + 04_testsuite_gtk.patch: dropped, not needed anymore. + 64_gil_locking.patch: dropped, finally merged upstream. + 90_autofoo.patch: refreshed. + Bump Standards-Version to 3.9.0 (no further changes). + Bump debhelper version to 7. + Replace dh_clean -k by dh_prep. * 20_deprecated_spam.patch: new patch. Avoid spamming the console for using deprecated functions that every program uses. -- Josselin Mouette Mon, 16 Aug 2010 18:14:38 +0200 pygobject (2.21.4-1) unstable; urgency=low [ Laurent Bigonville ] * New upstream release. * Bump Standards-Version to 3.9.0 (no further changes) * Bump debhelper version to 7 * debian/control.in: - Build-depend on libgirepository1.0-dev, libcairo2-dev, python-cairo-dev - python-gobject: Conflicts/Replaces/Provides python-gi - Add python-gobject-cairo package and make python-gobject Recommends it * debian/rules: - Don't need --enable-pygi, it is now merged - Install files for python-gobject-cairo - Replace dh_clean -k by dh_prep - Make pygobject-codegen-2.0 call the default version of python * Dropped debian/patches/03_maintainer_mode.patch debian/patches/04_testsuite_gtk.patch, debian/patches/64_gil_locking.patch, debian/patches/90_autofoo.patch: not needed anymore [ Emilio Pozuelo Monfort ] * debian/rules: - Drop above change to make pygobject-codegen-2.0 call the default Python version. Build with the default Python version after all the other ones instead. Closes: #590358. -- Emilio Pozuelo Monfort Mon, 26 Jul 2010 21:16:58 +0200 pygobject (2.21.1-2) unstable; urgency=low [ Emilio Pozuelo Monfort ] * debian/control.in: - Drop python2.5{,-dev} (build) dependencies. They were there to make sure Python had wakeupfd support, but that's already in stable and the 2.5 dependency will be problematic in the future, so drop it already. [ Laurent Bigonville ] * debian/control: - Bump Standards-Version to 3.8.4 - Add Vcs-Svn and Vcs-Browser field - Be more explicit in -dbg long description * debian/rules: Enable pygi support (Closes: #579018) * Switch to dpkg-source 3.0 (quilt) format -- Laurent Bigonville Mon, 07 Jun 2010 20:05:07 +0200 pygobject (2.21.1-1) unstable; urgency=low [ Josselin Mouette ] * Suggest gir1.0-glib-2.0 instead of gobject-introspection-*. [ Loïc Minier ] * Split out make check runs in their own targets. * Also make check the dbg builds. * Don't make check when nocheck is in DEB_BUILD_OPTIONS; thanks Daniel Schepler. [ Emilio Pozuelo Monfort ] * debian/patches/64_gil_locking.patch: - Add header. [ Josselin Mouette ] * New upstream release. * Introspection stuff has been moved to pygi. * 61_wakeupfd-fctnl-and-read.patch: dropped, merged upstream. * 90_autofoo.patch: regenerated. -- Josselin Mouette Mon, 12 Apr 2010 23:41:32 +0200 pygobject (2.20.0-1) unstable; urgency=low [ Emilio Pozuelo Monfort ] * python-gobject-dbg is section debug. [ Josselin Mouette ] * New upstream release. * Switch installation path to /usr/lib/pymodules instead of /var/lib/python-support. * Enable girepository support; build-depend on libgirepository1.0-dev. * Suggest some introspection packages. * 90_autofoo.patch: regenerated for the new version. -- Josselin Mouette Thu, 24 Sep 2009 18:53:49 +0200 pygobject (2.18.0-1) unstable; urgency=low * Fix English mistake in long descriptions. Closes: #524545. * New upstream release. + Fixes argument passing for glib.IOChannel. Closes: #528459. * 01_pkgconfig-private.patch, 62_install-pyglib-in-libdir-with-python-version.patch: dropped, merged upstream. * 90_autofoo.patch: regenerated. -- Josselin Mouette Fri, 14 Aug 2009 13:37:12 +0200 pygobject (2.16.1-1) unstable; urgency=low * New upstream release. + 90_autofoo.patch: regenerated. -- Josselin Mouette Wed, 11 Mar 2009 22:51:50 +0100 pygobject (2.16.0-1) unstable; urgency=low [ Loic Minier ] * Pass PYTHON to $(MAKE) runs for robustness in case of timestamp skews; thanks Colin Watson; closes: #509192. * Pass --disable-maintainer-mode to configure. * Rework patch and config.sub/.guess handling: backup config.guess and .sub, call quilt instead of relying on cdbs' quilt patchsys, restore config.guess and .sub after unpatching. This avoids config.guess and .sub in the diff, and allows control over fully working and fully patched trees. * Call dh_* -s instead of -a in binary-arch. * Rework install rules and dependencies completely to avoid .PHONY implicit targets. [ Josselin Mouette ] * Install files to the python-support directory since objcopy is completely stupid and doesn’t add the full pathname to the .gnu_debuglink section. Closes: #518026. * New upstream release. * 63_macro-dir.patch: removed, merged upstream. * 90_autofoo.patch: regenerated. * Fix quilt invocation so that patches are applied. * Pass echo=/bin/echo to the environment to work around the ☠☢☣⚡⚠✈║ libtool bug that is not able to find a command as simple as echo, is that really too much to ask? * 04_testsuite_gtk.patch: new patch. Don’t run tests that require pygtk being installed. -- Josselin Mouette Sun, 08 Mar 2009 12:44:24 +0100 pygobject (2.15.4-2) experimental; urgency=low * debian/patches/64_gil_lock.patch, added. + Release the python GIL lock when getting properties and unreffing objects. Prevents deadlocks when using farsight2. -- Sjoerd Simons Fri, 28 Nov 2008 16:07:42 +0100 pygobject (2.15.4-1) experimental; urgency=low [ Emilio Pozuelo Monfort ] * Merged 2.15 updates from Ubuntu, thanks to Sebastien Bacher and Loïc Minier: - Build-Depend on libglib2.0-dev >= 2.14. - debian/patches/60_use-python-config-for-includes.patch, debian/patches/02_ffi-use-pkgconfig: + Dropped, fixed upstream. - debian/patches/debian/patches/61_wakeupfd-fix.patch: + Renamed as 61_wakeupfd-fctnl-and-read.patch, updated. - debian/patches/62_install-pyglib-in-libdir-with-python-version.patch: + installs the new pyglib public library to the private directory libdir/pygobject/python to have one lib per python version - debian/patches/63_macro-dir.patch: + Add AC_CONFIG_MACRO_DIR for libtoolize. GNOME #551227. - debian/patches/69_pyg-register-pointer-typo: + fixes crash on x86-64 due to a typo. GNOME #550463. - debian/patches/90_autofoo.patch: + Updated. - debian/rules: + Call dh_makeshlibs to generate shlibs on python-gobject >= 2.15.2. + Rework -dbg support for the new pyglib shared lib. - Bump Standards-Version to 3.8.0. - debian/rules: + Use find -print0/xargs -0. * New upstream release. Closes: #492647. - Build-Depend on libglib2.0-dev >= 2.16.0 for GIO support. - debian/patches/69_pyg-register-pointer-typo: + Removed, fixed upstream. * debian/patches/62_install-pyglib-in-libdir-with-python-version.patch: - Changed so that libpyglib is in /usr/lib and shared objects linking to it don't need an RPATH. The library is now in $libdir/libpyglib-2.0-pythonX.Y.so Thanks a lot to Loïc Minier for his help and guidance! * debian/rules: - Adjusted for the above patch. - Copy config.* in build and restore it in clean, so that changes don't end up in the diff.gz. * debian/patches/90_autofoo.patch: - Regenerated. [ Josselin Mouette ] * Re-add references in 61_wakeupfd-fctnl-and-read.patch. * 90_autofoo.patch: remove autom4te.cache. * Depend on python 2.5, since the test suite does not run with python 2.4. * Use pyversions -vr to really disable the 2.4 build. * Pass /usr/share/pygobject to dh_pysupport. * Don’t move the -dbg symbolic link to the -dev package. * Run dh_makeshlibs separately for python-gobject-dbg. -- Josselin Mouette Wed, 12 Nov 2008 15:49:34 +0100 pygobject (2.14.2-1) unstable; urgency=low * Switch to quilt; build-depend on quilt. * New upstream release. + Refresh patches. * 03_maintainer_mode.patch: add AM_MAINTAINER_MODE. * 61_wakeupfd-fix.patch: do not use the wakeupfd in non-threaded applications, as it is not initialized. -- Josselin Mouette Sat, 07 Jun 2008 15:05:11 +0200 pygobject (2.14.1-8) unstable; urgency=low * Revert last upload, the pygobject patch was fine and the bug lies in pygtk. Furthermore, wakeupfd gets used anyway since Python supports it, so we *need* this patch. -- Josselin Mouette Wed, 04 Jun 2008 00:08:02 +0200 pygobject (2.14.1-7) unstable; urgency=low * Also add an explicit python2.5 (>= 2.5.2-5) dep; closes: #481936. * Drop patch 61_wakeupfd-fix, it seems to expose some python2.5 64-bits issue; revert build-deps and deps bumps from 2.12.1-3 and -4. -- Loic Minier Tue, 20 May 2008 11:26:02 +0200 pygobject (2.14.1-6) unstable; urgency=low * Update 61_wakeupfd-fix to use more ifdefs for python without the wakeupfd support; see #481457. * Build-dep and dep on python2.5-dev >= 2.5.2-5 for wakeupfd support. -- Loic Minier Fri, 16 May 2008 14:14:06 +0200 pygobject (2.14.1-5) unstable; urgency=low * New patch, 61_wakeupfd-fix, from the fix to the initial SETWAKEUPFD support in GNOME #481569. -- Loic Minier Thu, 15 May 2008 14:56:58 +0200 pygobject (2.14.1-4) unstable; urgency=low * Depend and build-depend on libffi-dev >= 3.0.5 so that the older package without a .pc file is not used. -- Josselin Mouette Thu, 17 Apr 2008 20:24:59 +0200 pygobject (2.14.1-3) unstable; urgency=low * 01_pkgconfig-private.patch: new patch, move libffi to Requires.private to prevent pygobject rdeps from depending on it. * 02_ffi-use-pkgconfig.patch: new patch, use pkg-config to check for libffi. * 60_use-python-config-for-includes.patch: strip the autogenerated part. * 90_autofoo.patch: re-run aclocal/automake/autoconf on top of it. * Capitalize Python in the descriptions. * Use binary:Version. -- Josselin Mouette Tue, 25 Mar 2008 01:11:56 +0100 pygobject (2.14.1-2) unstable; urgency=low * New patch, 60_use-python-config-for-includes, use python-config to set PYTHON_INCLUDES; fixes support for -dbg package; GNOME #448173; closes: #468130. NB: the patch also ships m4/ from upstream SVN as this wasn't disted properly and also updated autoconf. -- Loic Minier Wed, 27 Feb 2008 16:09:00 +0100 pygobject (2.14.1-1) unstable; urgency=low * New upstream release; new features / bug fixes. -- Loic Minier Mon, 07 Jan 2008 10:59:32 +0100 pygobject (2.14.0-4) unstable; urgency=low * debian/rules: - don't stop the build when make check has an error to avoid having to add a depends on pygtk -- Sebastien Bacher Sat, 01 Dec 2007 23:20:19 +0100 pygobject (2.14.0-3) unstable; urgency=low * debian/control.in: - Build-Depends on python-all-dbg - Conflicts,Provides,Replaces python-gobject-doc - list python-gobject-dbg package * debian/rules: - build dbg variant - run make check -- Sebastien Bacher Fri, 30 Nov 2007 12:46:58 +0100 pygobject (2.14.0-2) unstable; urgency=low * python-gobject-dev depends on libglib2.0-dev and libffi-dev. -- Josselin Mouette Sun, 23 Sep 2007 22:43:19 +0200 pygobject (2.14.0-1) unstable; urgency=low * New upstream release. * Use source:Version. * Build-depend on libffi-dev. -- Josselin Mouette Sat, 22 Sep 2007 10:11:58 +0200 pygobject (2.12.3-2) unstable; urgency=low * Add a get-orig-source target to retrieve the upstream tarball. * Include the new check-dist Makefile to prevent accidental uploads to unstable; bump build-dep on gnome-pkg-tools to >= 0.10. * Cleanup rules. * Build-depend on autotools-dev. * Honor CFLAGS we set in rules, doh! * Set some sane default CFLAGS and honor noopt in DEB_BUILD_OPTIONS. * Upload to unstable; drop check-dist include. * Add watch file. * Fix URL in copyright. * Wrap build-deps and deps. * Set XS-Python-Version to >= 2.3 and build-conflict on python2.3-dev << 2.3.5; add XB-Python-Version; bump python-all-dev build-dep to >= 2.3.5. * Add a ${misc:Depends}. * Don't pass --host to configure when DEB_BUILD_GNU_TYPE equals DEB_HOST_GNU_TYPE. * build target is PHONY. * Cleanups. -- Loic Minier Sat, 14 Apr 2007 13:29:37 +0200 pygobject (2.12.3-1) experimental; urgency=low * New upstream release. * 01_doc_licensing.patch: removed, integrated upstream. -- Josselin Mouette Thu, 4 Jan 2007 20:41:25 +0100 pygobject (2.12.1-4) experimental; urgency=low * python-gobject-dev recommends docbook-xsl. * python-gobject-dev depends on python-dev. -- Josselin Mouette Tue, 2 Jan 2007 22:27:27 +0100 pygobject (2.12.1-3) experimental; urgency=low [ Josselin Mouette ] * Build-depend on docbook-xsl (closes: #397811). [ Loic Minier ] * Upload. -- Loic Minier Sun, 3 Dec 2006 13:50:38 +0100 pygobject (2.12.1-2) experimental; urgency=low * 01_doc_licensing.patch: stolen from upstream CVS. Upstream agreed to relicense the documentation to LGPL. * copyright: document that. -- Josselin Mouette Thu, 12 Oct 2006 20:35:45 +0200 pygobject (2.12.1-1) experimental; urgency=low * Initial release. * This package was split out from pygtk. -- Josselin Mouette Tue, 26 Sep 2006 21:30:26 +0200 debian/compat0000644000000000000000000000000211416177124010370 0ustar 7 debian/patches/0000755000000000000000000000000012143110654010612 5ustar debian/patches/00git_test_case_hang.patch0000644000000000000000000000202711607235104015610 0ustar From 09d6cc2a6c857c7ef96432a279a853410718b150 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 8 Jul 2011 10:15:53 +0200 Subject: [PATCH] gdbus tests: Fix hang if test case fails In the TestGDBusClient.test_native_calls_async() test case, the main loop was never quit when the call failed. --- tests/test_gdbus.py | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_gdbus.py b/tests/test_gdbus.py index a9442fe..ca4150a 100644 --- a/tests/test_gdbus.py +++ b/tests/test_gdbus.py @@ -67,8 +67,10 @@ class TestGDBusClient(unittest.TestCase): def test_native_calls_async(self): def call_done(obj, result, user_data): - user_data['result'] = obj.call_finish(result) - user_data['main_loop'].quit() + try: + user_data['result'] = obj.call_finish(result) + finally: + user_data['main_loop'].quit() main_loop = gobject.MainLoop() data = {'main_loop': main_loop} -- 1.7.5.4 debian/patches/00git_fix_qdata_warning.patch0000644000000000000000000000152311727703755016345 0ustar From 42d871eb0b08ee6d55e95cc7e4b90844919555b9 Mon Sep 17 00:00:00 2001 From: Ivan Stankovic Date: Tue, 21 Feb 2012 12:24:58 +0100 Subject: [PATCH 1/2] Fix set_qdata warning on accessing NULL gobject property https://bugzilla.gnome.org/show_bug.cgi?id=661155 --- gobject/pygobject.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/gobject/pygobject.c b/gobject/pygobject.c index 6c2f06c..70dc89a 100644 --- a/gobject/pygobject.c +++ b/gobject/pygobject.c @@ -991,7 +991,9 @@ pygobject_new(GObject *obj) PyObject * pygobject_new_sunk(GObject *obj) { - g_object_set_qdata (obj, pygobject_ref_sunk_key, GINT_TO_POINTER (1)); + if (obj) + g_object_set_qdata (obj, pygobject_ref_sunk_key, GINT_TO_POINTER (1)); + return pygobject_new_full(obj, TRUE, NULL); } -- 1.7.9.1 debian/patches/00git_messagebox_type.patch0000644000000000000000000000303111607260121016030 0ustar From 483a894681ef0080107b33733f392911d4a65b76 Mon Sep 17 00:00:00 2001 From: "John (J5) Palmieri" Date: Fri, 8 Jul 2011 11:50:17 -0400 Subject: [PATCH 1/4] [gi-overrides] fix MessageBox so it correctly handles the type constructor param --- gi/overrides/Gtk.py | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gi/overrides/Gtk.py b/gi/overrides/Gtk.py index 007e155..1408f47 100644 --- a/gi/overrides/Gtk.py +++ b/gi/overrides/Gtk.py @@ -413,16 +413,22 @@ class MessageDialog(Gtk.MessageDialog, Dialog): def __init__(self, parent=None, flags=0, - type=Gtk.MessageType.INFO, + message_type=Gtk.MessageType.INFO, buttons=Gtk.ButtonsType.NONE, message_format=None, **kwds): if message_format != None: kwds['text'] = message_format + + if 'type' in kwds: + import warnings + warnings.warn("The use of the keyword type as a parameter of the Gtk.MessageDialog constructor has been depricated. Please use message_type instead.", DeprecationWarning) + message_type = kwds['type'] + Gtk.MessageDialog.__init__(self, _buttons_property=buttons, - message_type=type, + message_type=message_type, **kwds) Dialog.__init__(self, parent=parent, flags=flags) -- 1.7.5.4 debian/patches/00git_python3-maketrans.patch0000644000000000000000000000251111607260121016223 0ustar From 667bec76ccbc85cc1d54a0e68977dbda241c028c Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 13 Jul 2011 08:42:22 +0200 Subject: [PATCH 2/4] [python3] Fix maketrans import Python3 moved the maketrans() function from the string module to a str method. This unbreaks gi/module.py for Python 3 again. --- gi/module.py | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gi/module.py b/gi/module.py index 70df76c..d56bdaf 100644 --- a/gi/module.py +++ b/gi/module.py @@ -24,7 +24,11 @@ from __future__ import absolute_import import os import gobject -import string +try: + maketrans = ''.maketrans +except AttributeError: + # fallback for Python 2 + from string import maketrans import gi from .overrides import registry @@ -124,7 +128,7 @@ class IntrospectionModule(object): # Don't use upper() here to avoid locale specific # identifier conversion (e. g. in Turkish 'i'.upper() == 'i') # see https://bugzilla.gnome.org/show_bug.cgi?id=649165 - ascii_upper_trans = string.maketrans( + ascii_upper_trans = maketrans( 'abcdefgjhijklmnopqrstuvwxyz', 'ABCDEFGJHIJKLMNOPQRSTUVWXYZ') for value_info in info.get_values(): -- 1.7.5.4 debian/patches/00git_gio_flag_type.patch0000644000000000000000000000230711727704135015462 0ustar From 42d01f060c5d764baa881d13c103d68897163a49 Mon Sep 17 00:00:00 2001 From: Ryan Lortie Date: Mon, 12 Mar 2012 16:44:14 -0400 Subject: gio-types.defs: change some enums to flags These flags types were originally incorrectly handled in glib as being enums. That bug was fixed, but they're still enums here, leading to warnings about the mismatch. Change them to flags. https://bugzilla.gnome.org/show_bug.cgi?id=668522 --- gio/gio-types.defs | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gio/gio-types.defs b/gio/gio-types.defs index 331e0bc..7eee5c8 100644 --- a/gio/gio-types.defs +++ b/gio/gio-types.defs @@ -526,7 +526,7 @@ ) ) -(define-enum MountMountFlags +(define-flags MountMountFlags (in-module "gio") (c-name "GMountMountFlags") (gtype-id "G_TYPE_MOUNT_MOUNT_FLAGS") @@ -545,7 +545,7 @@ ) ) -(define-enum DriveStartFlags +(define-flags DriveStartFlags (in-module "gio") (c-name "GDriveStartFlags") (gtype-id "G_TYPE_DRIVE_START_FLAGS") @@ -770,7 +770,7 @@ ) ) -(define-enum SocketMsgFlags +(define-flags SocketMsgFlags (in-module "gio") (c-name "GSocketMsgFlags") (gtype-id "G_TYPE_SOCKET_MSG_FLAGS") -- 1.7.9.1 debian/patches/00git_textiter_crash.patch0000644000000000000000000000406211605551662015702 0ustar From e114c3de09d7d95942b308f704a6ca20244dad9d Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 7 Jul 2011 13:39:19 +0200 Subject: [PATCH 4/4] Fix crash in Gtk.TextIter overrides With commit 17cd0fb3 Gtk.TextIter.{forward,backward}_search() returns undefined pointers when the search was unsuccessful. Actually check the "success" return value; if it is False return None, just like PyGTK used to. Thanks to Michael Vogt for discovering this and writing the test case! Test case: -------------- 8< ----------------- from gi.repository import Gtk win = Gtk.Window.new(Gtk.WindowType.TOPLEVEL) textview = Gtk.TextView() buffer = textview.get_buffer() buffer.set_text("hello world") win.add(textview) win.show_all() iter = buffer.get_start_iter() end = buffer.get_end_iter() ret = iter.forward_search("foo", Gtk.TextSearchFlags.VISIBLE_ONLY, end) print "this is my return value" print ret print "now I crash" print ret[0].get_offset() Gtk.main() -------------- 8< ----------------- --- gi/overrides/Gtk.py | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gi/overrides/Gtk.py b/gi/overrides/Gtk.py index b7dd7d7..007e155 100644 --- a/gi/overrides/Gtk.py +++ b/gi/overrides/Gtk.py @@ -631,12 +631,18 @@ class TextIter(Gtk.TextIter): def forward_search(self, string, flags, limit): success, match_start, match_end = super(TextIter, self).forward_search(string, flags, limit) - return (match_start, match_end,) + if success: + return (match_start, match_end) + else: + return None def backward_search(self, string, flags, limit): success, match_start, match_end = super(TextIter, self).backward_search(string, flags, limit) - return (match_start, match_end,) + if success: + return (match_start, match_end) + else: + return None def begins_tag(self, tag=None): return super(TextIter, self).begins_tag(tag) -- 1.7.5.4 debian/patches/00git_class_init.patch0000644000000000000000000002552212110713462014774 0ustar From 9456ba70fdb98b3a4eb7ee2f630182387a54ca00 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 19 Feb 2013 15:39:56 +0100 Subject: [PATCH] Move property and signal creation into _class_init() We must not add class interfaces after g_type_class_ref() has been called the first time. Move signal and property creation from pyg_type_register() into pyg_object_class_init(), and drop the hack of registering interfaces twice. This is a backport of commit efcb0f9fd for 2.28.x. This allows old pygtk applications to work with pygobject 2.28.x and glib 2.35.x. Bug: https://bugzilla.gnome.org/show_bug.cgi?id=694108 Bug-Ubuntu: https://launchpad.net/bugs/1129309 --- gobject/gobjectmodule.c | 177 +++++++++++++++++++----------------------------- 1 file changed, 70 insertions(+), 107 deletions(-) diff --git a/gobject/gobjectmodule.c b/gobject/gobjectmodule.c index 2a84606..91f7315 100644 --- a/gobject/gobjectmodule.c +++ b/gobject/gobjectmodule.c @@ -312,13 +312,6 @@ pyg_object_get_property (GObject *object, guint property_id, pyglib_gil_state_release(state); } -static void -pyg_object_class_init(GObjectClass *class, PyObject *py_class) -{ - class->set_property = pyg_object_set_property; - class->get_property = pyg_object_get_property; -} - typedef struct _PyGSignalAccumulatorData { PyObject *callable; PyObject *user_data; @@ -484,15 +477,14 @@ override_signal(GType instance_type, const gchar *signal_name) } static PyObject * -add_signals (GType instance_type, PyObject *signals) +add_signals (GObjectClass *klass, PyObject *signals) { gboolean ret = TRUE; - GObjectClass *oclass; Py_ssize_t pos = 0; PyObject *key, *value, *overridden_signals = NULL; + GType instance_type = G_OBJECT_CLASS_TYPE (klass); overridden_signals = PyDict_New(); - oclass = g_type_class_ref(instance_type); while (PyDict_Next(signals, &pos, &key, &value)) { const gchar *signal_name; gchar *signal_name_canon, *c; @@ -530,7 +522,6 @@ add_signals (GType instance_type, PyObject *signals) if (!ret) break; } - g_type_class_unref(oclass); if (ret) return overridden_signals; else { @@ -800,14 +791,12 @@ pyg_param_spec_from_object (PyObject *tuple) } static gboolean -add_properties (GType instance_type, PyObject *properties) +add_properties (GObjectClass *klass, PyObject *properties) { gboolean ret = TRUE; - GObjectClass *oclass; Py_ssize_t pos = 0; PyObject *key, *value; - oclass = g_type_class_ref(instance_type); while (PyDict_Next(properties, &pos, &key, &value)) { const gchar *prop_name; GType prop_type; @@ -873,7 +862,7 @@ add_properties (GType instance_type, PyObject *properties) Py_DECREF(slice); if (pspec) { - g_object_class_install_property(oclass, 1, pspec); + g_object_class_install_property(klass, 1, pspec); } else { PyObject *type, *value, *traceback; ret = FALSE; @@ -883,7 +872,7 @@ add_properties (GType instance_type, PyObject *properties) g_snprintf(msg, 256, "%s (while registering property '%s' for GType '%s')", PYGLIB_PyUnicode_AsString(value), - prop_name, g_type_name(instance_type)); + prop_name, G_OBJECT_CLASS_NAME(klass)); Py_DECREF(value); value = PYGLIB_PyUnicode_FromString(msg); } @@ -892,11 +881,63 @@ add_properties (GType instance_type, PyObject *properties) } } - g_type_class_unref(oclass); return ret; } static void +pyg_object_class_init(GObjectClass *class, PyObject *py_class) +{ + PyObject *gproperties, *gsignals, *overridden_signals; + PyObject *class_dict = ((PyTypeObject*) py_class)->tp_dict; + + class->set_property = pyg_object_set_property; + class->get_property = pyg_object_get_property; + + /* install signals */ + /* we look this up in the instance dictionary, so we don't + * accidentally get a parent type's __gsignals__ attribute. */ + gsignals = PyDict_GetItemString(class_dict, "__gsignals__"); + if (gsignals) { + if (!PyDict_Check(gsignals)) { + PyErr_SetString(PyExc_TypeError, + "__gsignals__ attribute not a dict!"); + return; + } + if (!(overridden_signals = add_signals(class, gsignals))) { + return; + } + if (PyDict_SetItemString(class_dict, "__gsignals__", + overridden_signals)) { + return; + } + Py_DECREF(overridden_signals); + + PyDict_DelItemString(class_dict, "__gsignals__"); + } else { + PyErr_Clear(); + } + + /* install properties */ + /* we look this up in the instance dictionary, so we don't + * accidentally get a parent type's __gproperties__ attribute. */ + gproperties = PyDict_GetItemString(class_dict, "__gproperties__"); + if (gproperties) { + if (!PyDict_Check(gproperties)) { + PyErr_SetString(PyExc_TypeError, + "__gproperties__ attribute not a dict!"); + return; + } + if (!add_properties(class, gproperties)) { + return; + } + PyDict_DelItemString(class_dict, "__gproperties__"); + /* Borrowed reference. Py_DECREF(gproperties); */ + } else { + PyErr_Clear(); + } +} + +static void pyg_register_class_init(GType gtype, PyGClassInitFunc class_init) { GSList *list; @@ -1068,7 +1109,7 @@ pygobject__g_instance_init(GTypeInstance *instance, */ static void pyg_type_add_interfaces(PyTypeObject *class, GType instance_type, - PyObject *bases, gboolean new_interfaces, + PyObject *bases, GType *parent_interfaces, guint n_parent_interfaces) { int i; @@ -1082,7 +1123,6 @@ pyg_type_add_interfaces(PyTypeObject *class, GType instance_type, guint k; PyObject *base = PyTuple_GET_ITEM(bases, i); GType itype; - gboolean is_new = TRUE; const GInterfaceInfo *iinfo; GInterfaceInfo iinfo_copy; @@ -1099,16 +1139,6 @@ pyg_type_add_interfaces(PyTypeObject *class, GType instance_type, if (!G_TYPE_IS_INTERFACE(itype)) continue; - for (k = 0; k < n_parent_interfaces; ++k) { - if (parent_interfaces[k] == itype) { - is_new = FALSE; - break; - } - } - - if ((new_interfaces && !is_new) || (!new_interfaces && is_new)) - continue; - iinfo = pyg_lookup_interface_info(itype); if (!iinfo) { gchar *error; @@ -1129,7 +1159,7 @@ pyg_type_add_interfaces(PyTypeObject *class, GType instance_type, int pyg_type_register(PyTypeObject *class, const char *type_name) { - PyObject *gtype, *gsignals, *gproperties, *overridden_signals; + PyObject *gtype; GType parent_type, instance_type; GType *parent_interfaces; guint n_parent_interfaces; @@ -1216,88 +1246,22 @@ pyg_type_register(PyTypeObject *class, const char *type_name) } /* - * Note: Interfaces to be implemented are searched twice. First - * we register interfaces that are already implemented by a parent - * type. The second time, the remaining interfaces are - * registered, i.e. the ones that are not implemented by a parent - * type. In between these two loops, properties and signals are - * registered. It has to be done this way, in two steps, - * otherwise glib will complain. If registering all interfaces - * always before properties, you get an error like: - * - * ../gobject:121: Warning: Object class - * test_interface+MyObject doesn't implement property - * 'some-property' from interface 'TestInterface' - * - * If, on the other hand, you register interfaces after - * registering the properties, you get something like: - * - * ../gobject:121: Warning: cannot add interface type - * `TestInterface' to type `test_interface+MyUnknown', since - * type `test_interface+MyUnknown' already conforms to - * interface - * - * This looks like a GLib quirk, but no bug has been filed - * upstream. However we have a unit test for this particular - * problem, which can be found in test_interfaces.py, class - * TestInterfaceImpl. + * Note, all interfaces need to be registered before the first + * g_type_class_ref(), see bug #686149. * * See also comment above pyg_type_add_interfaces(). */ - pyg_type_add_interfaces(class, instance_type, class->tp_bases, FALSE, + pyg_type_add_interfaces(class, instance_type, class->tp_bases, parent_interfaces, n_parent_interfaces); - /* we look this up in the instance dictionary, so we don't - * accidentally get a parent type's __gsignals__ attribute. */ - gsignals = PyDict_GetItemString(class->tp_dict, "__gsignals__"); - if (gsignals) { - if (!PyDict_Check(gsignals)) { - PyErr_SetString(PyExc_TypeError, - "__gsignals__ attribute not a dict!"); - g_free(parent_interfaces); - return -1; - } - if (!(overridden_signals = add_signals(instance_type, gsignals))) { - g_free(parent_interfaces); - return -1; - } - if (PyDict_SetItemString(class->tp_dict, "__gsignals__", - overridden_signals)) { - g_free(parent_interfaces); - return -1; - } - Py_DECREF(overridden_signals); - } else { - PyErr_Clear(); - } - /* we look this up in the instance dictionary, so we don't - * accidentally get a parent type's __gsignals__ attribute. */ - gproperties = PyDict_GetItemString(class->tp_dict, "__gproperties__"); - if (gproperties) { - if (!PyDict_Check(gproperties)) { - PyErr_SetString(PyExc_TypeError, - "__gproperties__ attribute not a dict!"); - g_free(parent_interfaces); - return -1; - } - if (!add_properties(instance_type, gproperties)) { - g_free(parent_interfaces); - return -1; - } - PyDict_DelItemString(class->tp_dict, "__gproperties__"); - /* Borrowed reference. Py_DECREF(gproperties); */ - } else { - PyErr_Clear(); + gclass = g_type_class_ref(instance_type); + if (PyErr_Occurred() != NULL) { + g_type_class_unref(gclass); + g_free(parent_interfaces); + return -1; } - /* Register new interfaces, that are _not_ already defined by - * the parent type. FIXME: See above. - */ - pyg_type_add_interfaces(class, instance_type, class->tp_bases, TRUE, - parent_interfaces, n_parent_interfaces); - - gclass = g_type_class_ref(instance_type); if (pyg_run_class_init(instance_type, gclass, class)) { g_type_class_unref(gclass); g_free(parent_interfaces); @@ -1306,9 +1270,8 @@ pyg_type_register(PyTypeObject *class, const char *type_name) g_type_class_unref(gclass); g_free(parent_interfaces); - if (gsignals) - PyDict_DelItemString(class->tp_dict, "__gsignals__"); - + if (PyErr_Occurred() != NULL) + return -1; return 0; } -- 1.8.1.2 debian/patches/20_deprecated_spam.patch0000644000000000000000000000101011550351514015247 0ustar Index: pygobject-2.21.3/gobject/pygobject.c =================================================================== --- pygobject-2.21.3.orig/gobject/pygobject.c 2010-08-16 18:53:01.622365078 +0200 +++ pygobject-2.21.3/gobject/pygobject.c 2010-08-16 18:53:09.678366668 +0200 @@ -176,9 +176,6 @@ pygobject_register_sinkfunc(GType type, { SinkFunc sf; - g_message ("pygobject_register_sinkfunc is deprecated (%s)", - g_type_name(type)); - #if 0 g_return_if_fail(G_TYPE_IS_OBJECT(type)); #endif debian/patches/00git_python3_build.patch0000644000000000000000000000202311607260121015415 0ustar From e2dc4ac346a16b6976b92e84819c7203629beb4a Mon Sep 17 00:00:00 2001 From: Ignacio Casal Quinteiro Date: Thu, 21 Apr 2011 16:52:20 +0200 Subject: [PATCH 3/4] [python3] fix build. PYcairo_IMPORT doesn't exists anymore --- gi/pygi-foreign-cairo.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/gi/pygi-foreign-cairo.c b/gi/pygi-foreign-cairo.c index 81b9865..edf52d7 100644 --- a/gi/pygi-foreign-cairo.c +++ b/gi/pygi-foreign-cairo.c @@ -30,7 +30,7 @@ #include #endif -Pycairo_CAPI_t *Pycairo_CAPI; +static Pycairo_CAPI_t *Pycairo_CAPI; #include "pygi-foreign.h" @@ -117,7 +117,12 @@ cairo_surface_release (GIBaseInfo *base_info, static PyMethodDef _gi_cairo_functions[] = {0,}; 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; -- 1.7.5.4 debian/patches/00git_gio_test.patch0000644000000000000000000000752311607260121014461 0ustar From 5c2786804d997df680131542b4afb31e2db3a2cb Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 13 Jul 2011 10:40:25 +0200 Subject: [PATCH 4/4] [gi] Port test_properties from static gio to GI Gio As we ripped out the static gio bindings a while ago, this test case was using the system installed gio bindings with Python 2, and now fails completely with Python 3. Rewrite it to use gi.repository.Gio. --- tests/test_properties.py | 38 +++++++++++++++++++------------------- 1 files changed, 19 insertions(+), 19 deletions(-) diff --git a/tests/test_properties.py b/tests/test_properties.py index 74c1b38..3930671 100644 --- a/tests/test_properties.py +++ b/tests/test_properties.py @@ -14,7 +14,7 @@ from gobject.constants import \ G_MININT, G_MAXINT, G_MAXUINT, G_MINLONG, G_MAXLONG, \ G_MAXULONG -import gio +from gi.repository import Gio if sys.version_info < (3, 0): TEST_UTF8 = "\xe2\x99\xa5" @@ -37,7 +37,7 @@ class PropertyObject(GObject): type=TYPE_UINT64, flags=PARAM_READWRITE|PARAM_CONSTRUCT) enum = gobject.property( - type=gio.SocketType, default=gio.SOCKET_TYPE_STREAM) + type=Gio.SocketType, default=Gio.SocketType.STREAM) class TestProperties(unittest.TestCase): def testGetSet(self): @@ -135,30 +135,30 @@ class TestProperties(unittest.TestCase): def testEnum(self): obj = new(PropertyObject) - self.assertEqual(obj.props.enum, gio.SOCKET_TYPE_STREAM) - self.assertEqual(obj.enum, gio.SOCKET_TYPE_STREAM) - obj.enum = gio.SOCKET_TYPE_DATAGRAM - self.assertEqual(obj.props.enum, gio.SOCKET_TYPE_DATAGRAM) - self.assertEqual(obj.enum, gio.SOCKET_TYPE_DATAGRAM) - obj.props.enum = gio.SOCKET_TYPE_STREAM - self.assertEqual(obj.props.enum, gio.SOCKET_TYPE_STREAM) - self.assertEqual(obj.enum, gio.SOCKET_TYPE_STREAM) + self.assertEqual(obj.props.enum, Gio.SocketType.STREAM) + self.assertEqual(obj.enum, Gio.SocketType.STREAM) + obj.enum = Gio.SocketType.DATAGRAM + self.assertEqual(obj.props.enum, Gio.SocketType.DATAGRAM) + self.assertEqual(obj.enum, Gio.SocketType.DATAGRAM) + obj.props.enum = Gio.SocketType.STREAM + self.assertEqual(obj.props.enum, Gio.SocketType.STREAM) + self.assertEqual(obj.enum, Gio.SocketType.STREAM) obj.props.enum = 2 - self.assertEqual(obj.props.enum, gio.SOCKET_TYPE_DATAGRAM) - self.assertEqual(obj.enum, gio.SOCKET_TYPE_DATAGRAM) + self.assertEqual(obj.props.enum, Gio.SocketType.DATAGRAM) + self.assertEqual(obj.enum, Gio.SocketType.DATAGRAM) obj.enum = 1 - self.assertEqual(obj.props.enum, gio.SOCKET_TYPE_STREAM) - self.assertEqual(obj.enum, gio.SOCKET_TYPE_STREAM) + self.assertEqual(obj.props.enum, Gio.SocketType.STREAM) + self.assertEqual(obj.enum, Gio.SocketType.STREAM) self.assertRaises(TypeError, setattr, obj, 'enum', 'foo') self.assertRaises(TypeError, setattr, obj, 'enum', object()) - self.assertRaises(TypeError, gobject.property, type=gio.SocketType) - self.assertRaises(TypeError, gobject.property, type=gio.SocketType, - default=gio.SOCKET_PROTOCOL_TCP) - self.assertRaises(TypeError, gobject.property, type=gio.SocketType, + self.assertRaises(TypeError, gobject.property, type=Gio.SocketType) + self.assertRaises(TypeError, gobject.property, type=Gio.SocketType, + default=Gio.SocketProtocol.TCP) + self.assertRaises(TypeError, gobject.property, type=Gio.SocketType, default=object()) - self.assertRaises(TypeError, gobject.property, type=gio.SocketType, + self.assertRaises(TypeError, gobject.property, type=Gio.SocketType, default=1) def testRange(self): -- 1.7.5.4 debian/patches/00git_cairo_init.patch0000644000000000000000000000137111605551662014772 0ustar From 9281ce8876ca5205c7cbe0a55eba94e7ea3fc10d Mon Sep 17 00:00:00 2001 From: "John (J5) Palmieri" Date: Fri, 1 Jul 2011 05:19:15 -0400 Subject: [PATCH 3/4] correctly initialize the _gi_cairo_functions array to be zero filled --- gi/pygi-foreign-cairo.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/gi/pygi-foreign-cairo.c b/gi/pygi-foreign-cairo.c index e332a22..81b9865 100644 --- a/gi/pygi-foreign-cairo.c +++ b/gi/pygi-foreign-cairo.c @@ -114,7 +114,7 @@ cairo_surface_release (GIBaseInfo *base_info, Py_RETURN_NONE; } -static PyMethodDef _gi_cairo_functions[] = {}; +static PyMethodDef _gi_cairo_functions[] = {0,}; PYGLIB_MODULE_START(_gi_cairo, "_gi_cairo") { Pycairo_IMPORT; -- 1.7.5.4 debian/patches/series0000644000000000000000000000047312110713462012033 0ustar 00git_enum_properties.patch 00git_cairo_init.patch 00git_textiter_crash.patch 00git_test_case_hang.patch 00git_gio_test.patch 00git_messagebox_type.patch 00git_python3_build.patch 00git_python3-maketrans.patch 00git_fix_qdata_warning.patch 00git_gio_flag_type.patch 00git_class_init.patch 20_deprecated_spam.patch debian/patches/00git_enum_properties.patch0000644000000000000000000001471511605551662016100 0ustar From 71e7762e884d1dce82acbab4851c0436718c029a Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Mon, 27 Jun 2011 10:56:20 -0300 Subject: [PATCH 1/4] Add support for enums in gobject.property https://bugzilla.gnome.org/show_bug.cgi?id=653488 --- gobject/propertyhelper.py | 23 ++++++++++++++++------- tests/test_properties.py | 40 ++++++++++++++++++++++++++++++++++++---- 2 files changed, 52 insertions(+), 11 deletions(-) diff --git a/gobject/propertyhelper.py b/gobject/propertyhelper.py index 9643c82..b9b587a 100644 --- a/gobject/propertyhelper.py +++ b/gobject/propertyhelper.py @@ -188,14 +188,16 @@ class property(object): return TYPE_STRING elif type_ == object: return TYPE_PYOBJECT - elif isinstance(type_, type) and issubclass(type_, _gobject.GObject): + elif (isinstance(type_, type) and + issubclass(type_, (_gobject.GObject, + _gobject.GEnum))): return type_.__gtype__ elif type_ in [TYPE_NONE, TYPE_INTERFACE, TYPE_CHAR, TYPE_UCHAR, - TYPE_INT, TYPE_UINT, TYPE_BOOLEAN, TYPE_LONG, - TYPE_ULONG, TYPE_INT64, TYPE_UINT64, TYPE_ENUM, - TYPE_FLAGS, TYPE_FLOAT, TYPE_DOUBLE, TYPE_POINTER, - TYPE_BOXED, TYPE_PARAM, TYPE_OBJECT, TYPE_STRING, - TYPE_PYOBJECT]: + TYPE_INT, TYPE_UINT, TYPE_BOOLEAN, TYPE_LONG, + TYPE_ULONG, TYPE_INT64, TYPE_UINT64, + TYPE_FLOAT, TYPE_DOUBLE, TYPE_POINTER, + TYPE_BOXED, TYPE_PARAM, TYPE_OBJECT, TYPE_STRING, + TYPE_PYOBJECT]: return type_ else: raise TypeError("Unsupported type: %r" % (type_,)) @@ -224,6 +226,12 @@ class property(object): elif ptype == TYPE_PYOBJECT: if default is not None: raise TypeError("object types does not have default values") + elif gobject.type_is_a(ptype, TYPE_ENUM): + if default is None: + raise TypeError("enum properties needs a default value") + elif not gobject.type_is_a(default, ptype): + raise TypeError("enum value %s must be an instance of %r" % + (default, ptype)) def _get_minimum(self): ptype = self.type @@ -291,7 +299,8 @@ class property(object): if ptype in [TYPE_INT, TYPE_UINT, TYPE_LONG, TYPE_ULONG, TYPE_INT64, TYPE_UINT64, TYPE_FLOAT, TYPE_DOUBLE]: args = self._get_minimum(), self._get_maximum(), self.default - elif ptype == TYPE_STRING or ptype == TYPE_BOOLEAN: + elif (ptype == TYPE_STRING or ptype == TYPE_BOOLEAN or + ptype.is_a(TYPE_ENUM)): args = (self.default,) elif ptype == TYPE_PYOBJECT: args = () diff --git a/tests/test_properties.py b/tests/test_properties.py index 54afd11..74c1b38 100644 --- a/tests/test_properties.py +++ b/tests/test_properties.py @@ -14,6 +14,8 @@ from gobject.constants import \ G_MININT, G_MAXINT, G_MAXUINT, G_MINLONG, G_MAXLONG, \ G_MAXULONG +import gio + if sys.version_info < (3, 0): TEST_UTF8 = "\xe2\x99\xa5" UNICODE_UTF8 = unicode(TEST_UTF8, 'UTF-8') @@ -34,6 +36,9 @@ class PropertyObject(GObject): uint64 = gobject.property( type=TYPE_UINT64, flags=PARAM_READWRITE|PARAM_CONSTRUCT) + enum = gobject.property( + type=gio.SocketType, default=gio.SOCKET_TYPE_STREAM) + class TestProperties(unittest.TestCase): def testGetSet(self): obj = PropertyObject() @@ -61,8 +66,9 @@ class TestProperties(unittest.TestCase): self.failUnless(pspec.name in ['normal', 'construct', 'construct-only', - 'uint64']) - self.assertEqual(len(obj), 4) + 'uint64', + 'enum']) + self.assertEqual(len(obj), 5) def testNormal(self): obj = new(PropertyObject, normal="123") @@ -127,6 +133,34 @@ class TestProperties(unittest.TestCase): (etype, ex) = sys.exc_info()[2:] self.fail(str(ex)) + def testEnum(self): + obj = new(PropertyObject) + self.assertEqual(obj.props.enum, gio.SOCKET_TYPE_STREAM) + self.assertEqual(obj.enum, gio.SOCKET_TYPE_STREAM) + obj.enum = gio.SOCKET_TYPE_DATAGRAM + self.assertEqual(obj.props.enum, gio.SOCKET_TYPE_DATAGRAM) + self.assertEqual(obj.enum, gio.SOCKET_TYPE_DATAGRAM) + obj.props.enum = gio.SOCKET_TYPE_STREAM + self.assertEqual(obj.props.enum, gio.SOCKET_TYPE_STREAM) + self.assertEqual(obj.enum, gio.SOCKET_TYPE_STREAM) + obj.props.enum = 2 + self.assertEqual(obj.props.enum, gio.SOCKET_TYPE_DATAGRAM) + self.assertEqual(obj.enum, gio.SOCKET_TYPE_DATAGRAM) + obj.enum = 1 + self.assertEqual(obj.props.enum, gio.SOCKET_TYPE_STREAM) + self.assertEqual(obj.enum, gio.SOCKET_TYPE_STREAM) + + self.assertRaises(TypeError, setattr, obj, 'enum', 'foo') + self.assertRaises(TypeError, setattr, obj, 'enum', object()) + + self.assertRaises(TypeError, gobject.property, type=gio.SocketType) + self.assertRaises(TypeError, gobject.property, type=gio.SocketType, + default=gio.SOCKET_PROTOCOL_TCP) + self.assertRaises(TypeError, gobject.property, type=gio.SocketType, + default=object()) + self.assertRaises(TypeError, gobject.property, type=gio.SocketType, + default=1) + def testRange(self): # kiwi code def max(c): @@ -270,8 +304,6 @@ class TestProperty(unittest.TestCase): # self.assertRaises(TypeError, gobject.property, type=bool, default=0) self.assertRaises(TypeError, gobject.property, type=bool, default='ciao mamma') self.assertRaises(TypeError, gobject.property, type=bool) - self.assertRaises(TypeError, gobject.property, type=GEnum) - self.assertRaises(TypeError, gobject.property, type=GEnum, default=0) self.assertRaises(TypeError, gobject.property, type=object, default=0) self.assertRaises(TypeError, gobject.property, type=complex) self.assertRaises(TypeError, gobject.property, flags=-10) -- 1.7.5.4 debian/control0000644000000000000000000000760112143111152010564 0ustar # This file is autogenerated. DO NOT EDIT! # # Modifications should be made to debian/control.in instead. # This file is regenerated automatically in the clean target. Source: pygobject-2 Section: oldlibs Priority: optional Maintainer: Josselin Mouette Uploaders: Debian GNOME Maintainers , Martin Pitt , Sjoerd Simons Build-Depends: debhelper (>= 7), gnome-pkg-tools (>= 0.10), dh-autoreconf, cdbs (>= 0.4.90~), quilt, python-all-dev (>= 2.6.6-3~), libglib2.0-dev (>= 2.24.0), libcairo2-dev, libffi-dev (>= 3.0.5), python-cairo-dev (>= 1.2.0), xsltproc, xvfb, xauth, dbus-x11, docbook-xsl, autotools-dev, python-all-dbg, python-apt-dbg, python-cairo-dbg X-Python-Version: >= 2.5 Standards-Version: 3.9.4 Vcs-Svn: svn://svn.debian.org/svn/pkg-gnome/packages/unstable/pygobject-2 Vcs-Browser: http://svn.debian.org/viewsvn/pkg-gnome/packages/unstable/pygobject-2 Package: python-gobject-2 Architecture: any Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends} Provides: ${python:Provides}, python2.7-gobject Breaks: python-gobject (<< 2.90) Replaces: python-gobject (<< 2.90) Suggests: python-gobject-2-dbg Description: deprecated static Python bindings for the GObject library GObject is an abstraction layer that allows programming with an object paradigm that is compatible with many languages. It is a part of Glib, the core library used to build GTK+ and GNOME. . This package contains the static Python bindings for gobject, glib, and gio. These are deprecated by dynamic gobject-introspection bindings (which are provided with the python-gobject package), and should not be used in newly written code. These static bindings just exist to provide backwards compatibility for GNOME 2 based software. Package: python-gobject-2-dev Architecture: all Depends: ${python:Depends}, ${misc:Depends}, python-gobject-2 (>= ${source:Version}), python-dev, libglib2.0-dev (>= 2.24.0), libffi-dev (>= 3.0.5) Recommends: docbook-xsl Breaks: python-gobject-dev (<< 2.90) Replaces: python-gobject-dev (<< 2.90) Description: development headers for the static GObject Python bindings GObject is an abstraction layer that allows programming with an object paradigm that is compatible with many languages. It is a part of Glib, the core library used to build GTK+ and GNOME. . This package contains the development headers needed to build static Python bindings relying on pygobject. Note that this is obsolete, new libraries and applications should use the dynamic gobject-introspection bindings (which are provided with the python-gobject package). Package: python-gobject-2-dbg Section: debug Priority: extra Architecture: any Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends}, python-gobject-2 (= ${binary:Version}) Breaks: python-gobject-dbg (<< 2.90) Replaces: python-gobject-dbg (<< 2.90) Description: deprecated static Python bindings for the GObject library (debug extension) GObject is an abstraction layer that allows programming with an object paradigm that is compatible with many languages. It is a part of Glib, the core library used to build GTK+ and GNOME. . This package contains the static Python bindings for gobject, glib, and gio. These are deprecated by dynamic gobject-introspection bindings (which are provided with the python-gobject package), and should not be used in newly written code. These static bindings just exist to provide backwards compatibility for GNOME 2 based software. . This package contains the extensions built for the Python debug interpreter. debian/python-gobject-dev.links0000644000000000000000000000011110506322565013735 0ustar /usr/share/gtk-doc/html/pygobject /usr/share/doc/python-gobject-dev/html debian/rules0000755000000000000000000001326511631061066010255 0ustar #!/usr/bin/make -f include /usr/share/gnome-pkg-tools/1/rules/uploaders.mk -include /usr/share/gnome-pkg-tools/1/rules/gnome-get-source.mk include /usr/share/python/python.mk CFLAGS += -Wall -g -O$(if $(findstring noopt,$(DEB_BUILD_OPTIONS)),0,2) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) export echo=/bin/echo configure_flags += \ --prefix=/usr \ --enable-thread \ --build=$(DEB_BUILD_GNU_TYPE) \ --disable-introspection \ --disable-maintainer-mode ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) configure_flags += --host=$(DEB_HOST_GNU_TYPE) endif PYDEFAULTVER := $(shell pyversions --default --version) PYVERS := $(shell pyversions --requested --version debian/control) PYVERS := $(filter-out $(PYDEFAULTVER), $(PYVERS)) $(PYDEFAULTVER) patch-stamp: dh_testdir dh_autoreconf touch $@ patch: patch-stamp build-%/configure-stamp: patch-stamp dh_testdir mkdir -p build-$* cd build-$* && \ PYTHON=/usr/bin/python$* CFLAGS="$(CFLAGS)" \ $(CURDIR)/configure $(configure_flags) touch $@ dbg-build-%/configure-stamp: patch-stamp dh_testdir mkdir -p dbg-build-$* cd dbg-build-$* && \ PYTHON=/usr/bin/python$*-dbg CFLAGS="$(CFLAGS) -O0" \ $(CURDIR)/configure $(configure_flags) touch $@ build-%/build-stamp: build-%/configure-stamp dh_testdir PYTHON=/usr/bin/python$* $(MAKE) -C build-$* pyexecdir=$(call py_libdir_sh, $*) touch $@ dbg-build-%/build-stamp: dbg-build-%/configure-stamp dh_testdir PYTHON=/usr/bin/python$*-dbg $(MAKE) -C dbg-build-$* pyexecdir=$(call py_libdir_sh, $*) touch $@ build: $(PYVERS:%=build-%/build-stamp) $(PYVERS:%=dbg-build-%/build-stamp) build-%/check-stamp: build-%/build-stamp find gi glib gobject gio -name '*.py' -exec cp '$(CURDIR)/{}' build-$*/'{}' \; # don't run the tests under fakeroot, otherwise they will try to # connect to root's session D-BUS -PYTHON=/usr/bin/python$* LD_PRELOAD= xvfb-run $(MAKE) -C build-$* check touch $@ dbg-build-%/check-stamp: dbg-build-%/build-stamp find gi glib gobject gio -name '*.py' -exec cp '$(CURDIR)/{}' dbg-build-$*/'{}' \; # don't run the tests under fakeroot, otherwise they will try to # connect to root's session D-BUS -PYTHON=/usr/bin/python$*-dbg LD_PRELOAD= xvfb-run $(MAKE) -C dbg-build-$* check touch $@ check: $(PYVERS:%=build-%/check-stamp) $(PYVERS:%=dbg-build-%/check-stamp) build-%/install-stamp: build-%/build-stamp dh_testdir dh_testroot PYTHON=/usr/bin/python$* $(MAKE) -C build-$* install DESTDIR=$(CURDIR)/debian/python-gobject-2-dev pyexecdir=$(call py_libdir_sh, $*) # dh_python2 trips over this empty dir in the sanity check for >= 2.6, so remove it -rmdir debian/python-gobject-2-dev/usr/lib/python$*/site-packages # until all reverse dependencies of pygobject have been converted to # dh_python2, install a library search path which is backwards # compatible to pysupport (see Debian#614764) echo "/usr/lib/pymodules/python$*/gtk-2.0/" > $(CURDIR)/debian/python-gobject-2-dev/$(call py_libdir_sh, $*)/gtk-2.0-pysupport-compat.pth touch $@ dbg-build-%/install-stamp: dbg-build-%/build-stamp dh_testdir dh_testroot PYTHON=/usr/bin/python$*-dbg $(MAKE) -C dbg-build-$* install DESTDIR=$(CURDIR)/debian/python-gobject-2-dbg pyexecdir=$(call py_libdir_sh, $*) find debian/python-gobject-2-dbg ! -type d ! \( -name '*.so' -o -name '*.so.*' \) -delete find debian/python-gobject-2-dbg -type d -empty -delete touch $@ install-stamp: $(PYVERS:%=build-%/build-stamp) $(PYVERS:%=dbg-build-%/build-stamp) dh_testdir dh_testroot # remove the install stamps to force a reinstall (since dh_clean is # removing the package dirs) dh_prep rm -f $(PYVERS:%=build-%/install-stamp) $(PYVERS:%=dbg-build-%/install-stamp) $(MAKE) -f debian/rules $(PYVERS:%=build-%/install-stamp) $(PYVERS:%=dbg-build-%/install-stamp) find debian/python-gobject-2-dev -name \*.la -delete mkdir -p debian/python-gobject-2/usr/lib mv debian/python-gobject-2-dev/usr/lib/python* debian/python-gobject-2/usr/lib/ mv debian/python-gobject-2-dev/usr/lib/libpyglib-*so.* \ debian/python-gobject-2/usr/lib rm -rf debian/python-gobject-2-dev/usr/lib/python* for i in $$(find debian/python-gobject-2-dbg -name '*.so' -path 'debian/python-gobject-2-dbg/usr/lib/python*/*-packages/*'); do \ b=$$(basename $$i .so); \ mv $$i $$(dirname $$i)/$${b}_d.so; \ done touch $@ install: install-stamp clean:: dh_testdir dh_testroot rm -f install-stamp rm -f patch-stamp rm -rf build-* dbg-build-* dh_autoreconf_clean dh_clean *.pyc */*.pyc maybe_check = $(if $(findstring nocheck,$(DEB_BUILD_OPTIONS)),,check) binary-indep: install $(maybe_check) dh_testdir dh_testroot dh_installdocs -i dh_installexamples -i dh_installchangelogs ChangeLog -i dh_link -i dh_compress -i -X.py dh_fixperms -i # More permission fixing chmod 755 `grep -rl "^#\!.*python" debian/python-gobject-2-dev/usr` dh_python2 -i /usr/share/pygobject dh_installdeb -i dh_gencontrol -i dh_md5sums -i dh_builddeb -i binary-arch: install $(maybe_check) dh_testdir dh_testroot dh_installdocs -s dh_installexamples -s dh_installchangelogs -s ChangeLog dh_strip -ppython-gobject-2 --dbg-package=python-gobject-2-dbg rm -rf debian/python-gobject-2-dbg/usr/share/doc/python-gobject-2-dbg ln -sf python-gobject-2 debian/python-gobject-2-dbg/usr/share/doc/python-gobject-2-dbg dh_link -s dh_compress -s -X.py dh_fixperms -s dh_python2 -a dh_makeshlibs -ppython-gobject-2 -V'python-gobject-2 (>= 2.28.1)' dh_makeshlibs -ppython-gobject-2-dbg -V'python-gobject-2-dbg (>= 2.28.1)' dh_installdeb -s dh_shlibdeps -s dh_gencontrol -s dh_md5sums -s dh_builddeb -s binary: binary-arch binary-indep .PHONY: patch build check install clean binary-indep binary-arch binary debian/source/0000755000000000000000000000000012143110654010463 5ustar debian/source/format0000644000000000000000000000001411403230366011672 0ustar 3.0 (quilt) debian/watch0000644000000000000000000000015211575620127010223 0ustar version=3 http://ftp.gnome.org/pub/GNOME/sources/pygobject/([\d\.]+[02468])/pygobject-([\d\.]+)\.tar\.bz2