diff options
author | Justin Lecher <jlec@gentoo.org> | 2010-02-20 12:21:39 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2010-02-20 12:21:39 +0000 |
commit | 804268c7cae1839bc39f6b5284e4143511f22abc (patch) | |
tree | 8f5aea621dc67a8bc39a560fce18e8e27891872f /dev-python/pmw | |
parent | ProMol plugin for pymol, grep from #209970 (diff) | |
download | historical-804268c7cae1839bc39f6b5284e4143511f22abc.tar.gz historical-804268c7cae1839bc39f6b5284e4143511f22abc.tar.bz2 historical-804268c7cae1839bc39f6b5284e4143511f22abc.zip |
Make deletecommand work with python 2.5, patched grabbed from debian
Package-Manager: portage-2.2_rc63/cvs/Linux x86_64
Diffstat (limited to 'dev-python/pmw')
-rw-r--r-- | dev-python/pmw/ChangeLog | 8 | ||||
-rw-r--r-- | dev-python/pmw/Manifest | 14 | ||||
-rw-r--r-- | dev-python/pmw/files/1.3.2-python2.5.patch | 54 | ||||
-rw-r--r-- | dev-python/pmw/pmw-1.3.2-r2.ebuild | 53 |
4 files changed, 127 insertions, 2 deletions
diff --git a/dev-python/pmw/ChangeLog b/dev-python/pmw/ChangeLog index f73222e6f959..3916e965ca4e 100644 --- a/dev-python/pmw/ChangeLog +++ b/dev-python/pmw/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-python/pmw # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/pmw/ChangeLog,v 1.26 2010/02/07 20:35:03 pva Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/pmw/ChangeLog,v 1.27 2010/02/20 12:21:38 jlec Exp $ + +*pmw-1.3.2-r2 (20 Feb 2010) + + 20 Feb 2010; Justin Lecher (jlec) <jlec@gentoo.org> + +files/1.3.2-python2.5.patch, +pmw-1.3.2-r2.ebuild: + Make deletecommand work with python 2.5, patched grabbed from debian 07 Feb 2010; Peter Volkov <pva@gentoo.org> pmw-1.3.2-r1.ebuild: Add inherit eutils: epatch is defined there. diff --git a/dev-python/pmw/Manifest b/dev-python/pmw/Manifest index b78bbd2d0ebf..e1794b5738b7 100644 --- a/dev-python/pmw/Manifest +++ b/dev-python/pmw/Manifest @@ -1,7 +1,19 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +AUX 1.3.2-python2.5.patch 2030 RMD160 5bb1f44f8d67903fabfba7c51e300e9638bc64db SHA1 ede19deb49c5531462186496b4d47134a8e420bb SHA256 7f0d3940926ca59245251b8c471d446741096fc35cbd4198d2b4ec4985029f35 AUX pmw-1.3.2-install-no-docs.patch 493 RMD160 bb6b8017e19da6627f15bd6d8a0d7ecf1e166faf SHA1 fc1c2f9eef884e74ca0fe8f3b720563fbedcf411 SHA256 4511b359a315fc5c2c5c143622f32c227a620a2f916f94aee7dcea9d1cb95145 DIST Pmw.1.2.tar.gz 396404 RMD160 b312e32146e677e633a434661a10f9496fe36c6f SHA1 6d85cafd45f3e9c012425aa42fe92ea30bb5db14 SHA256 14b921097a4071e8e4c88966d08e26a9c6b0ae9246f8dccd67709d01e7e2d574 DIST Pmw.1.3.2.tar.gz 399262 RMD160 ad3fca73405a8c8a7e2ec81096b00665e2937964 SHA1 e2d8dd6eed7378acf8723c860107a12d7e808227 SHA256 0c9ab8f9cbd57f926e22253d73048fdccfb7e033c3482b083a6fb41848074a18 EBUILD pmw-1.2.ebuild 1209 RMD160 bf639537b99b82e43421bddf203f12c45081d046 SHA1 5d6c062f405fd91dca8c4a319b3f9c7894bc384a SHA256 39b6500df7fe025b34e4109f713b2153b268e1d56a1b0caa6fb8c587343261a5 EBUILD pmw-1.3.2-r1.ebuild 1215 RMD160 5f955d0f389e8dc31107c2b539e3e470b41a2a15 SHA1 2c3d0316d08e2de5f634e9d8ac73d6f34e3221f4 SHA256 6ae8f3b4e99677a02cb06bca5cf4250a27bf6e3ead505278838974ab847e7387 -MISC ChangeLog 2763 RMD160 a6e22914e492e52cfb7e4f7cd6a0156fd995d7a1 SHA1 2c36262291504184b63f62f859750c0532f741ca SHA256 0e06b4918d4cd433faef70d44663f8da70f7248beae3d13cbbb2fe543d40eddf +EBUILD pmw-1.3.2-r2.ebuild 1260 RMD160 d282ac28af1e375a622164690a54b99afdd08fde SHA1 d6243b73d0e1ded60026e3eaf996cfe6168f7e7b SHA256 76a2d5dce6ff3966d551a0878eafa6cc87d3cc433ac8e4a9ce80140c21d63439 +MISC ChangeLog 2973 RMD160 24a7c07b44f56ea74638aaf64521673b814b92b7 SHA1 e98962078a1272949b7322b4a7f7883dd925cbd7 SHA256 bdfd6c08ffd8de6470da9854478c3552a468801cb188657c0be209c33255a06d MISC metadata.xml 159 RMD160 900a8c55d7a7d2f6312594769aaf941bf9e99c7f SHA1 c8e604d56dae898258b5254d78cfeac0b981e288 SHA256 9f01104d3484792496faff4805eed0ecea2352a897151f3397d49a13800037b4 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.14 (GNU/Linux) + +iEYEARECAAYFAkt/09cACgkQgAnW8HDreRYOSwCfR0fHXM8VAWTv3O+dcH6iq/3+ +NX8AnAgm2t1C0eGmknQSGduAFGY0ZUWv +=Ms5m +-----END PGP SIGNATURE----- diff --git a/dev-python/pmw/files/1.3.2-python2.5.patch b/dev-python/pmw/files/1.3.2-python2.5.patch new file mode 100644 index 000000000000..ff8cce07ddaa --- /dev/null +++ b/dev-python/pmw/files/1.3.2-python2.5.patch @@ -0,0 +1,54 @@ +Source: http://github.com/nanotube/pmw_fixes/commit/5e6dcbdaef2bb6c40037b922dd0efa081f1575ab (Daniel Folkinshteyn) + +fix bug in OptionMenu.setitems, introduced with the fixing of this python +bug: +http://bugs.python.org/issue1342811 + +versions of python 2.5.4 and newer now automatically delete commands when +items are deleted +however, that causes error if the command is deleted manually beforehand. +old versions, on the contrary, require manual command deletion to free up +the objects. + +so we put in a python version check to see if we need to manually delete +commands. + +fixes the Pmw bug referred to here: +http://sourceforge.net/forum/forum.php?thread_id=3283195&forum_id=33675 +and here: +http://sourceforge.net/tracker/?func=detail&aid=2795731&group_id=10743&ati +d=110743 + +--- a/src/Pmw/Pmw_1_3/lib/PmwOptionMenu.py ++++ b/src/Pmw/Pmw_1_3/lib/PmwOptionMenu.py +@@ -1,6 +1,7 @@ + import types + import Tkinter + import Pmw ++import sys + + class OptionMenu(Pmw.MegaWidget): + +@@ -59,11 +60,17 @@ class OptionMenu(Pmw.MegaWidget): + + def setitems(self, items, index = None): + +- # Clean up old items and callback commands. +- for oldIndex in range(len(self._itemList)): +- tclCommandName = str(self._menu.entrycget(oldIndex, 'command')) +- if tclCommandName != '': +- self._menu.deletecommand(tclCommandName) ++ # python version check ++ # python versions >= 2.5.4 automatically clean commands ++ # and manually cleaning them causes errors when deleting items ++ ++ if sys.version_info[0] * 100 + sys.version_info[1] * 10 + \ ++ sys.version_info[2] < 254: ++ # Clean up old items and callback commands. ++ for oldIndex in range(len(self._itemList)): ++ tclCommandName = str(self._menu.entrycget(oldIndex, 'command')) ++ if tclCommandName != '': ++ self._menu.deletecommand(tclCommandName) + self._menu.delete(0, 'end') + self._itemList = list(items) + diff --git a/dev-python/pmw/pmw-1.3.2-r2.ebuild b/dev-python/pmw/pmw-1.3.2-r2.ebuild new file mode 100644 index 000000000000..7a698db3ea42 --- /dev/null +++ b/dev-python/pmw/pmw-1.3.2-r2.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/pmw/pmw-1.3.2-r2.ebuild,v 1.1 2010/02/20 12:21:38 jlec Exp $ + +EAPI="2" +PYTHON_MODNAME="Pmw" + +inherit eutils distutils + +MY_P="Pmw.${PV}" + +DESCRIPTION="A toolkit for building high-level compound widgets in Python using the Tkinter module." +HOMEPAGE="http://pmw.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz" + +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux" +LICENSE="BSD" +IUSE="doc examples" + +DEPEND="dev-lang/python[tk]" +RDEPEND="${DEPEND}" + +DOCS="${PYTHON_MODNAME}/README" +S="${WORKDIR}/${MY_P}/src" + +src_unpack() { + distutils_src_unpack + epatch "${FILESDIR}/${P}-install-no-docs.patch" + epatch "${FILESDIR}/${PV}-python2.5.patch" +} + +src_install() { + distutils_src_install + + local DIR + DIR="${S}/${PYTHON_MODNAME}/Pmw_1_3" + + if use doc; then + dohtml -a html,gif,py "${DIR}"/doc/* \ + || die "failed to install docs" + fi + + if use examples; then + insinto "${ROOT}/usr/share/doc/${PF}/examples" + doins "${DIR}"/demos/* \ + || die "failed to install demos" + fi + + #Tests are not unittests and show various + #GUIs. So we don't run them in the ebuild + +} |