From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 7A981138010 for ; Fri, 29 Mar 2013 20:02:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BDE18E0991; Fri, 29 Mar 2013 20:02:47 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CE279E0991 for ; Fri, 29 Mar 2013 20:02:46 +0000 (UTC) Received: from pomiocik.lan (77-255-217-157.adsl.inetia.pl [77.255.217.157]) (using SSLv3 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id D401E33DBD9; Fri, 29 Mar 2013 20:02:44 +0000 (UTC) Date: Fri, 29 Mar 2013 20:57:02 +0100 From: =?UTF-8?B?TWljaGHFgiBHw7Nybnk=?= To: gentoo-python@lists.gentoo.org Subject: [gentoo-python] Alternate solution for 'python', 'python2' and 'pkg-config python' in ebuilds Message-ID: <20130329205702.03f29327@pomiocik.lan> Organization: Gentoo X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.17; x86_64-pc-linux-gnu) 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 Content-Type: multipart/signed; micalg=PGP-SHA512; boundary="Sig_/Pino6a1+0i_7vCdxZQsqSfR"; protocol="application/pgp-signature" X-Archives-Salt: 70b286ac-6cf8-4835-b59a-cd695746a6b4 X-Archives-Hash: d8cb317fd2023399a747cce7661d94d4 --Sig_/Pino6a1+0i_7vCdxZQsqSfR Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello, Currently, we're using python-wrapper to properly respect EPYTHON in ebuilds. This is a bit hacky since every call to Python has to go through wrapper which chooses the same implementation over and over again. There was a request to handle 'pkg-config --cflags --libs python' through eselect-python. Of course, we can't wrap pkg-config like we do Python (well, we can but...). The alternate solution is something similar to what vala people do. It addresses all packages calling 'python', 'python2', 'python3' or 'pkg-config python' and using any of the -r1 eclasses. The idea is to create a ${T}/bin and ${T}/pkgconfig directories. In the former, place 'python' and either 'python2' or 'python3' symlinks proper to current ${EPYTHON}. In the latter, 'python.pc' and possibly 'python2.pc' or 'python3.pc'. Add the former to ${PATH}, the latter to ${PKG_CONFIG_PATH}. In -single-r1 and -any-r1 the directory creation and environment manipulation would be done in pkg_setup(). In python-r1 it would have to be done in python_export_best (with separate directory) and python_foreach_impl. Does this sound like a good solution? Should I run some tests? --=20 Best regards, Micha=C5=82 G=C3=B3rny --Sig_/Pino6a1+0i_7vCdxZQsqSfR Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iQJ8BAEBCgBmBQJRVfIOXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ1RUJGMjBGOTk2RkIzQzIyQ0M2RkNBNDBC QUJGMUQ1RkY4QzgxMTBBAAoJELq/HV/4yBEKno0QAMMm0Z2Qldbuqy5DKAjk+jBj H/JMSeuOUSHdpuXZdFestmHxZLECPsooT66mZtqn4oHWOWL5O9cYKXIi1/EE8mKX e9HafQwwNWEwv2vykqu4TONXXmNdcCjPUKD28N6E1xLmFjdZk7qTiuX7Ij5/KLXo 1aDqrnjqnnBfpRNNYBCLEOJFR7lv8EZlXBtwnj+QYPIkR5fA0mtaoMsxmtFngupQ +i3snD29EYW7reBb9T73pcjJ29UGv0XnapPC3KMgNDzDJozOYv1Ag9Q3tMStaI1G JDt2uyxTL2U/xSrKH/Ti9MoUpfcSNIeWzpZbVOHSLEjkDhsDtH1H1MQyB8TX8dy4 CtwvkaF0av0LKsW5RJuG4WYaic3P2f7stRyi/TBuSuJ5204knCJfUeVGvR+Hk4Ii +R7R4NTNuSw3Nj3PrA+bQCeCjztgyPQQ3CvoQSzinf0fmfi1dban0iu+0IcvZjka eNcmbty16D5NKfgYnc6KNvpS3Mi/bdqeKyBHUVPa8NMdrewIGeuHPtGxg5UflVs1 pYnvmDPnPsQ8qponk69GH5CkGxBai/GLzR/AQI2v75Fx+XmpE5CEa5v8Vsie8L6K dgVFcRQIe2q9vpkkUMiAaNyVm2IBtjsH8OiCnU2vQyiULwarqOdW14vCqgvYaGLn 5D6RK+DPN517XBy7h9XG =gnV3 -----END PGP SIGNATURE----- --Sig_/Pino6a1+0i_7vCdxZQsqSfR--