From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RgGwH-0008Ut-TQ for garchives@archives.gentoo.org; Thu, 29 Dec 2011 14:26:38 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CE62421C071; Thu, 29 Dec 2011 14:26:35 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id A244E21C071 for ; Thu, 29 Dec 2011 14:26:35 +0000 (UTC) Received: from [192.168.0.4] (d14-69-47-19.try.wideopenwest.com [69.14.19.47]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: floppym) by smtp.gentoo.org (Postfix) with ESMTPSA id 924731B401B; Thu, 29 Dec 2011 14:26:34 +0000 (UTC) Message-ID: <4EFC7897.8060508@gentoo.org> Date: Thu, 29 Dec 2011 09:26:31 -0500 From: Mike Gilbert User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111116 Thunderbird/8.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Discussions centering around the Python ecosystem in Gentoo Linux X-BeenThere: gentoo-python@gentoo.org X-BeenThere: gentoo-python@lists.gentoo.org MIME-Version: 1.0 To: =?UTF-8?B?TWljaGHFgiBHw7Nybnk=?= CC: gentoo-python@lists.gentoo.org Subject: Re: [gentoo-python] [PATCH] Support -A / --ABIs-patterns option in python_mod_optimize() and python_mod_cleanup() References: <4EFC664A.10105@gentoo.org> <20111229144151.5182583f@pomiocik.lan> <4EFC7013.70508@gentoo.org> <20111229150621.6d6583fd@pomiocik.lan> In-Reply-To: <20111229150621.6d6583fd@pomiocik.lan> X-Enigmail-Version: 1.3.3 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigBEC57B99D2B0B8FD7D60C354" X-Archives-Salt: 12d6a11d-f785-4028-9bf0-11bb541d902d X-Archives-Hash: 1e72cd216d7498808495d897febbe563 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigBEC57B99D2B0B8FD7D60C354 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 12/29/2011 09:06 AM, Micha=C5=82 G=C3=B3rny wrote: > On Thu, 29 Dec 2011 08:50:11 -0500 > Mike Gilbert wrote: >=20 >> On 12/29/2011 08:41 AM, Micha=C5=82 G=C3=B3rny wrote: >>> On Thu, 29 Dec 2011 08:08:26 -0500 >>> Mike Gilbert wrote: >>> >>>> This patch allows python_mod_optimize to be used in cases where a >>>> different set of python modules is installed depending on the >>>> python abi. >>>> >>>> For example, dev-python/feedparse-5.1 (not yet in the tree) >>>> installs the _feedparser_sgmllib.py module only in python-3*. >>> >>> Could you paste some example on how it is supposed to be used? >>> >> >> Sure. Borrowed from feedparser-5.1.ebuild in Progress: >> >> pkg_postinst() { >> python_mod_optimize -A "2.*" feedparser.py >> python_mod_optimize -A "3.*" feedparser.py _feedparser_sgmllib.py >> } >> >> pkg_postrm() { >> python_mod_cleanup -A "2.*" feedparser.py >> python_mod_cleanup -A "3.*" feedparser.py _feedparser_sgmllib.py >> } >=20 > Ok, now that I see it, I think you're inventing a really big hammer to > get rid of a single mosquito. >=20 I don't think the hammer is really that big; it seems like a relatively small extension to me. The code for checking ABI patterns is already there, this just wires it up to a couple of additional functions. I actually think it would make more sense to call python_mod_optimize using python_execute_function, but I think that would require a backward-incompatible API change. > On the other hand, I don't think I can think of a good per-ebuild way > to handle this. I'd rather start by pinging upstream not to pollute > global namespace and install a package instead; even if it supposed to > contain __init__.py only. >=20 That would take care of this specific package, yes. However, I still think it would be nice to have a workaround available. --------------enigBEC57B99D2B0B8FD7D60C354 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) iF4EAREIAAYFAk78eJcACgkQC77qH+pIQ6ROdAD6Ar+gLlmjFX3mdlrLMzbuyTNW WVYx3RxT+b4mb4aqk3oA/05WoKbMIC3+RJOn0m38J4h5L4WjiMT+tCYBdknlIShA =pR9E -----END PGP SIGNATURE----- --------------enigBEC57B99D2B0B8FD7D60C354--