From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:57295) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hn7bn-0004ZS-JC for guix-patches@gnu.org; Mon, 15 Jul 2019 16:30:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hn7bm-0005Kr-Au for guix-patches@gnu.org; Mon, 15 Jul 2019 16:30:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40403) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hn7bm-0005Ke-6h for guix-patches@gnu.org; Mon, 15 Jul 2019 16:30:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hn7bl-0001Ku-W3 for guix-patches@gnu.org; Mon, 15 Jul 2019 16:30:02 -0400 Subject: [bug#36477] [PATCH 08/31] gnu: python: Fix cross-compilation. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20190708095913.3460-1-m.othacehe@gmail.com> <20190708095913.3460-9-m.othacehe@gmail.com> Date: Mon, 15 Jul 2019 22:29:00 +0200 In-Reply-To: <20190708095913.3460-9-m.othacehe@gmail.com> (Mathieu Othacehe's message of "Mon, 8 Jul 2019 11:58:50 +0200") Message-ID: <87wogjghyr.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Mathieu Othacehe Cc: 36477@debbugs.gnu.org This is the second patch in this series with this subject, which suggests the subject could be adjusted. :-) Mathieu Othacehe skribis: > * gnu/packages/patches/python-2.7-search-paths.patch: Add cross-compilati= on > support. > * gnu/packages/patches/python-3-search-paths.patch: Ditto. > * gnu/packages/patches/python-cross-compile.patch: New patch. > * gnu/local.mk (dist_patch_DATA): Add above new patch. > * gnu/packages/python.scm (python-2.7)[patches]: Add new patch above, > [arguments]: Set _PYTHON_HOST_PLATFORM env variable when cross compiling. [...] > +++ b/gnu/packages/patches/python-cross-compile.patch > @@ -0,0 +1,145 @@ > +Patch taken from https://bugs.python.org/issue22724 and augmented with > +following Nix patch > +https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/interprete= rs/python/cpython/2.7/cross-compile.patch > +to fix the whole cross-compilation circus. > + > +--- > + Makefile.pre.in | 14 +++++++------- > + configure | 5 ++++- > + setup.py | 9 ++++++--- > + 3 files changed, 17 insertions(+), 11 deletions(-) Heh, a non trivial patch! > --- a/gnu/packages/python.scm > +++ b/gnu/packages/python.scm > @@ -109,7 +109,8 @@ > "python-2-deterministic-build-info.patch" > "python-2.7-site-prefixes.patch" > "python-2.7-source-date-epoch.patch" > - "python-2.7-adjust-tests.patch")) > + "python-2.7-adjust-tests.patch" > + "python-cross-compile.patch")) Note that this triggers a full rebuild, so we=E2=80=99ll probably have to w= ait for the next =E2=80=98core-updates=E2=80=99 branch, which we=E2=80=99ll hop= efully open soonish. > 'configure 'patch-lib-shells > (lambda _ > + ,@(if (%current-target-system) > + '((setenv "_PYTHON_HOST_PLATFORM" "")) > + '()) It would be great if you could add a comment saying what component consumes this environment variable. Otherwise LGTM. Thanks! Ludo=E2=80=99.