From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C8CF1139694 for ; Thu, 20 Apr 2017 06:47:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AFB27E0CF9; Thu, 20 Apr 2017 06:47:31 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3CCBFE0CD4; Thu, 20 Apr 2017 06:47:31 +0000 (UTC) Received: from pomiot (d202-252.icpnet.pl [109.173.202.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 9ED4D33BF1C; Thu, 20 Apr 2017 06:47:28 +0000 (UTC) Message-ID: <1492670832.1654.1.camel@gentoo.org> Subject: [gentoo-dev] Re: [gentoo-python] Updates from Python team: python.eclass gone, gpyutils updates, incoming PYTHON_SINGLE_TARGET change From: =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?= To: grozin@gentoo.org, gentoo-python , gentoo-dev@lists.gentoo.org Date: Thu, 20 Apr 2017 08:47:12 +0200 In-Reply-To: References: <1492461568.12095.2.camel@gentoo.org> Organization: Gentoo Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-w/eW/b+yQIxVk+dhpkmJ" X-Mailer: Evolution 3.22.6 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 X-Archives-Salt: 425dcb58-655f-4b7f-9349-8dbe45503336 X-Archives-Hash: dafa5b5bb70d1d70b9bd1fba30516fb6 --=-w/eW/b+yQIxVk+dhpkmJ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On czw, 2017-04-20 at 13:28 +0700, grozin@gentoo.org wrote: > Many thanks to the python team for good work. >=20 > In some cases a package installs some script(s) which run python=20 > interpreter. I mean IDE-like packages, e.g., spyder, bpython, ptpython,= =20 > etc. A user may want to run either python2 or python3 using such IDE. The= =20 > "standard" behaviour is to install a single script which runs python2 or= =20 > python3 depending on eselect python. In the case of spyder, there was a= =20 > user who insisted that he wants to use spyder for python2 *and* python3,= =20 > without changing the global eselect python setting. I've changed the=20 > ebuild to install 3 scripts: spyder (behaves as above), spyder2, and=20 > spyder3. The same may be useful for bpython, ptpython, and, maybe, some= =20 > other packages. Are there plans to make this task easy and systematic,= =20 > without re-inventing the wheel in each ebuild? >=20 Well, your explanation seemed a little bit unclear to me, so I'd like to clarify first. I presume you mean creating additional 'wrappers' that start the package with a specific implementation; i.e. in spyder, you have: python_newscript scripts/${PN} ${PN}${EPYTHON:6:1} For this thing, I don't think it really beneficial to provide additional methods. In most cases where this is really useful, upstream already creates additional names, and the eclasses handle wrapping them just fine. Doing it causes a few problems: how to name them? How detailed should they be? I.e. if it should be just spyder2 and spyder3, or maybe spyder2.7, spyder3.4, spyder3.5... How to handle pypy/pypy3? This usually quite sucks, and I don't want the eclass to make arbitrary guesses about that. That said, you could make your code pypy-safer if you did: local suffix python_is_python3 && suffix=3D3 || suffix=3D2 python_newscript scripts/${PN} ${PN}${suffix} Plus, the user can set EPYTHON to alter the implementation without using eselect. Or run scripts directly from /usr/lib/python-exec/*. I should probably add that to the python-exec doc [1]. It's possible it's already somewhere in the docs but I can't find it ;-). [1]:https://wiki.gentoo.org/wiki/Project:Python/python-exec --=20 Best regards, Micha=C5=82 G=C3=B3rny --=-w/eW/b+yQIxVk+dhpkmJ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQKTBAABCgB9FiEEXr8g+Zb7PCLMb8pAur8dX/jIEQoFAlj4WXFfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDVF QkYyMEY5OTZGQjNDMjJDQzZGQ0E0MEJBQkYxRDVGRjhDODExMEEACgkQur8dX/jI EQp38Q/+MdcKLasseUKjTPSmLP5iqilhduS4dbq7ILtZ9hSE9AhE+tt2SS2p2eFn 0gFnKy22Vsc68nCeMtNhuyCZqPNmXTD0pNQxgt80KdED7U6U5DFSIGQbaYjeqSeu s+z1h+r5z4E6Q36vUAwAJKAQKO7JCi+AU8R0REUKe+M0aeYSKea1zZJ5+dpXl/by ZC/QAljltLdbL973RdXywFImUtz07qTh5bKtXkKwusxAc3eNTBFwto+trPJAfyKD 51Gl8fKYaPnKubkPyZ+oiBb4dpKFT01bKDzGV5ie2MqpeY6PBdmFfuE5pZT+s3hK zXWpty2W+16P5Mn8v0HltxmNyF1u+xSgY2Vyh2dc9DCxqQWnQl/TgVu2Q1DXsm9U cLJxsUNfRJz+atKYHShAvj8sQagzvDkeS1sDbAPlWd+8oHoTkuKj+HKreQF+I2io cFUwF/F2Pxs5dtJcLbeQzzTAJUvbr33rH5piQ8cMYsmXjgRetIDKUPagOc2/mdOp gnHx0K0XN7Z/ZF6B861VNKNCdl6VNUzz3mheLYEVa3Rl5OiqSJ0zdhbM9ktgGIK6 aUj16GDijcZDnTl1bS+fosXoJjnnW9litcMrFNQrZrVmaiPHsUVOO/XYm1vQS6YG pkgHjfnSqLXYy1QhNlzBjzMxIJe3IIcyoJQMcIm09vFajj7VZ7Y= =TCVt -----END PGP SIGNATURE----- --=-w/eW/b+yQIxVk+dhpkmJ--