From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#22013: python2 versions of packages failing as inputs Date: Sun, 13 Dec 2015 19:16:15 +0100 Message-ID: <87y4cyuscw.fsf@gnu.org> References: <20151125205517.0505f317@debian-netbook> <878u5livsz.fsf@elephly.net> <87mvu13zmn.fsf@gnu.org> <20151126120601.06f5e5bc@debian-netbook> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50458) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8BCk-0005zU-Ju for bug-guix@gnu.org; Sun, 13 Dec 2015 13:17:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a8BCg-0005WV-Au for bug-guix@gnu.org; Sun, 13 Dec 2015 13:17:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:42843) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8BCg-0005WQ-8Z for bug-guix@gnu.org; Sun, 13 Dec 2015 13:17:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1a8BCg-00029D-5M for bug-guix@gnu.org; Sun, 13 Dec 2015 13:17:02 -0500 Sender: "Debbugs-submit" Resent-To: bug-guix@gnu.org Resent-Message-ID: In-Reply-To: <20151126120601.06f5e5bc@debian-netbook> (Efraim Flashner's message of "Thu, 26 Nov 2015 12:06:01 +0200") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Efraim Flashner Cc: 22013-done@debbugs.gnu.org Efraim Flashner skribis: > On Thu, 26 Nov 2015 09:59:12 +0100 > ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > >> Ricardo Wurmus skribis: >>=20 >> > Efraim Flashner writes: >> >=20=20 >> >> Guix build python2-cryptography builds fine, guix build python2-oauth= lib >> >> rebuilds python2-cryptography, and fails to build. Python2-cryptograp= hy has >> >> an additional input of python2-ipaddress which doesn't get carried al= ong when >> >> python2-cryptography is an input and not the final build.=20=20 >> > >> > I think that=E2=80=99s pretty normal. We have the same situation in >> > =E2=80=98python2-openssl=E2=80=99 where we have to explicitly add =E2= =80=98python2-cryptography=E2=80=99 >> > and remove =E2=80=98python-cryptography=E2=80=99.=20=20 >>=20 >> Yes, and this is due to the fact that =E2=80=98python2-cryptography=E2= =80=99 is not just >> an automatically-translated package: >>=20 >> (define-public python2-cryptography >> (let ((crypto (package-with-python2 python-cryptography))) >> (package (inherit crypto) >> (propagated-inputs >> `(("python2-ipaddress" ,python2-ipaddress) >> ,@(package-propagated-inputs crypto)))))) >>=20 >> If it were simply equal to (package-with-python2 python-cryptography), >> there would be no need for the manual tweak in =E2=80=98python-pyopenssl= =E2=80=99. >>=20 >> Efraim, could you apply the same strategy as for =E2=80=98python2-pyopen= ssl=E2=80=99 in >> =E2=80=98python2-oauthlib=E2=80=99? > > Ok, I understand now. I thought I had to edit python2-cryptography to fix > python2-oauthlib, now I realize everytime I use python2-cryptography I ne= ed > to make sure it pulls the right one. AFAICS this was fixed in 0066de6, so I=E2=80=99m closing it. >> > It would, of course, be nice if package-with-python2 could handle this >> > automatically.=20=20 >>=20 >> I think we would need a way to register =E2=80=9Ctranslation=E2=80=9D re= sults. >> Currently =E2=80=98package-with-python2=E2=80=99 internally uses a hash = table to memoize >> conversion results. We could imagine adding something like: >>=20 >> (register-python2-variant PY3VARIANT PY2VARIANT) >>=20 >> to explicitly add a pair to that hash table. >>=20 >> The downside of this approach is that this would break referential >> transparency. >>=20 >> WDYT? For this more general issue, we should open a different bug. Thanks, Ludo=E2=80=99.