From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 0AzwBYMnSWMCIQAAbAwnHQ (envelope-from ) for ; Fri, 14 Oct 2022 11:10:27 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id OLMJBoMnSWNIsAAA9RJhRA (envelope-from ) for ; Fri, 14 Oct 2022 11:10:27 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D84A53B6E5 for ; Fri, 14 Oct 2022 11:10:26 +0200 (CEST) Received: from localhost ([::1]:59610 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ojGi2-0000oq-1z for larch@yhetil.org; Fri, 14 Oct 2022 05:10:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55124) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojGh4-0000SQ-28 for help-guix@gnu.org; Fri, 14 Oct 2022 05:09:26 -0400 Received: from koszko.org ([93.95.227.159]:46562) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojGh0-0003l8-2o for help-guix@gnu.org; Fri, 14 Oct 2022 05:09:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=koszko.org; s=mail; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=nx/rbP7qn5uOacCneDZJgLu0mEec3yd4l86uXAghDeQ=; b=osMNw75Lfb91SrrCys2fahlYJ8 b+nE/EhYImf/IrBafnyAaU4sI+90DcQzOUsQOHty+tOxhGroRlNP0UE83PBBLuiYuR6lONTiYGo9v 2Cj9u/MDCbHB4HCGSCKe/TYqGtrK73K5Fllg27s+EDMSv6FYbalKpbTG304zE0beD6dtW69ofnNZy Lde7QFVsQ2j9IJD/4u7096uhqUEDJGE3a9gIFJlenq1BJe4T3bwYqMdEGTh2KnvJFt7NyDAEWbMtG AZVHxslsdWksHOo0llgfRGDMlKojaa66VsGiOGHvzMqbN9c7xFAz31v+e2Sd6v4uYEE3LSMwagBPO UB8RT6C2BUEMPXL+HEJCCnt0DhjiXLlWh9JaEi/idaNWCFl+Wbd/D/BF9SkxlxbkkJmSdOJ8St5ZU ehBz78egfmJDE0ej/XOFfTU4BEpOdFqII65lfPuCSlJQReoxOw6geNiy1HAQW5cF2r3FoKQcNUdnk CaM1sMYBF6cDprcGLABe9IEdnMop02a2z5enDJZZmyYgKpmB70GLxiF94ERJYin2T38TTQ8zLQhW7 SRevgpcaBiFcbcmHx1aa6jQGCiCR1WK7BmEH7SNh3Iw7/hplcd+/KoHHSvU/sDm1djPKaQdzkRFwp AwMbRyMQTDlOCjq//J5XJC7q1XfQ0zo7dANWqo9Wg=; Received: from [77.252.47.255] (helo=koszkonutek-tmp.pl.eu.org) by koszko.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ojGgr-0001hG-CB; Fri, 14 Oct 2022 11:09:13 +0200 Date: Fri, 14 Oct 2022 11:09:11 +0200 To: zimoun Cc: help-guix@gnu.org Subject: Re: program prepared with `guix pack` unusable by end users Message-ID: <20221014110911.66168330@koszkonutek-tmp.pl.eu.org> In-Reply-To: <87czaurh9e.fsf@gmail.com> References: <20221013182027.2044d8ff@koszkonutek-tmp.pl.eu.org> <87czaurh9e.fsf@gmail.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/TJLq4VnDKxWJyl1GG+CpcR1"; protocol="application/pgp-signature"; micalg=pgp-sha256 Received-SPF: pass client-ip=93.95.227.159; envelope-from=koszko@koszko.org; helo=koszko.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" Reply-to: Wojtek Kosior From: Wojtek Kosior via X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1665738626; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=nx/rbP7qn5uOacCneDZJgLu0mEec3yd4l86uXAghDeQ=; b=nb8oj/+8SVw/CWFl6Pi4Im2JYsOJopIpKmYu0DlYzielOnV8rVoJrLFaNMIDsIbe8xLTTO vqr724M3mwrOXr+rCZgZQ87IAai+cGUw0eb+Lm34u7SzazRr8wqWo87hARrAHukshKZLD/ ItUcn5oLEfVhLfuwKL0sqr/VfGL0sCIoiSObAAGfiyc6YgDSZ7ZSmsRwbYn4oiLGaHzGyN FdWAEENKD4o+Uym+1ubiXE1h0HvGGRxsM+rRiGZeYiiW6ypOtN7Nxki0vylDePEoDTNaxf GhuRMk9BgoO+mB/loYSAry03Z64K97XMYhxoleDJ4d/2f6Ibuhsytdb2olhREg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665738626; a=rsa-sha256; cv=none; b=t/tNyv1SGPwlTND8yiWZoEcxrUxAzRDGjSBqtC95DWJ+yiMFADzjEiSc6+GBbbxkqwYrGm Nxa+xpXusFRsO7es+Xb0nLhi131h7Y3Bd1ajmoJLQq0JR3CwToZBqbF+7pU9oG38bkEgfL mUWfSQ0sIXfFVGgnjK4z8Yij5xGmSLO8eXysrlg7QgjduUuYKCULxWoQ+4ngarSUbj9OqX bXXFXbedrQYfI42z6+UE+0126MZCTFS2bV65QQ8GjtFst3f/jIvkIOicXdW7H9WiUe4OEd i2EcggHFVjUMtcUK/bNevzVWuM9caKZ/Fzb37Zndjj0vE2LPJt2Ycwl6eVbbVQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=koszko.org header.s=mail header.b=osMNw75L; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.80 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=koszko.org header.s=mail header.b=osMNw75L; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: D84A53B6E5 X-Spam-Score: -3.80 X-Migadu-Scanner: scn0.migadu.com X-TUID: ASaYjnEYkgqJ --Sig_/TJLq4VnDKxWJyl1GG+CpcR1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi again! I accidently just replied to you, Simon, instead of making a "reply all". I'm reposting the same now, sorry for the nuisance... Thanks for your effort explaining email message ids m(_ _)m > I am confused because, if I understand correctly, this tarball generated > under ./dist is built using =E2=80=99python3 -m build -s=E2=80=99, so fro= m my > understanding it is not the =E2=80=9Cnormal Guix way=E2=80=9D. =20 OK, it seems I forgot to mention 1 thing - `python3 -m build -s` does not really "build" a Python package. It builds a Python source tarball. Like the ones that are pulled from PyPI as part of the Guix packaging of many (most?) Python libraries available. The `python3 -m build` command, without `-s`, would be used to build a Python wheel which I suppose you thought I was doing. > The point is to pack this definition=E2=80=A6 > [...] > =E2=80=A6instead of this one. > > > Could you give a try? Something along the commands proposed by =E2=80=99= (=E2=80=99 in > [1]. =20 Although I know it cannot help with my problem, for the reasons I wrote to "(" in [1], I will do so for the sake of politeness. So, I did run `guix shell -L. hydrilla`. First, I got a warning about > ambiguous package specification `hydrilla' =20 And a message indicating it chose the `hydrilla-dist-tarball` definition. This is consistent with what I knew about package resolution. So I now tried with `guix shell -L. -e (@ (hydrilla) hydrilla)`. Also, I knew the build would fail due to setuptools_scm being unable to find the `git` command, so I temporarily added git to the native-inputs of `hydrilla`. I got a failure in `sanity-check` phase. I saw that failure before - this is what made me use `python3 -m build -s` in the first place, as I described in [1]. The error was > starting phase `sanity-check' > validating 'hydrilla' /gnu/store/fj5ijdxsw6nz23ymxf397kd7d5h3pbrj-hydrill= a-3.0b2.dev1+g9f26ebf.d20221013/lib/python3.9/site-packages > ...checking requirements: OK > ...trying to load module hydrilla: OK > ...trying to load endpoint console_scripts haketilo: ERROR: > Traceback (most recent call last): > File "/gnu/store/b6j1qw1a5rkbfvcy7lc9fm95abbzpa4x-python-3.9.9/lib/pyth= on3.9/site-packages/pkg_resources/__init__.py", line 2458, in resolve > return functools.reduce(getattr, self.attrs, module) > AttributeError: module 'hydrilla.mitmproxy_launcher.launch' has no attrib= ute 'launch' >=20 > The above exception was the direct cause of the following exception: >=20 > Traceback (most recent call last): > File "/gnu/store/35ix1m6m8a5s21j02ajhdyqxb2xkshfb-sanity-check.py", lin= e 85, in > ep.load() > File "/gnu/store/b6j1qw1a5rkbfvcy7lc9fm95abbzpa4x-python-3.9.9/lib/pyth= on3.9/site-packages/pkg_resources/__init__.py", line 2450, in load > return self.resolve() > File "/gnu/store/b6j1qw1a5rkbfvcy7lc9fm95abbzpa4x-python-3.9.9/lib/pyth= on3.9/site-packages/pkg_resources/__init__.py", line 2460, in resolve > raise ImportError(str(exc)) from exc > ImportError: module 'hydrilla.mitmproxy_launcher.launch' has no attribute= 'launch' =20 That was followed by analogous errors for every entry point in the package. I verified using `less` that `/gnu/store/fj5ijdxsw6nz23ymxf397kd7d5h3pbrj-hydrilla-3.0b2.dev1+g9f26ebf.d= 20221013/lib/python3.9/site-packages/hydrilla/mitmproxy_launcher/launch.py` is an empty file. Most other files in there are also empty but not all. For example, `/gnu/store/fj5ijdxsw6nz23ymxf397kd7d5h3pbrj-hydrilla-3.0b2.dev1+g9f26ebf.d= 20221013/lib/python3.9/site-packages/hydrilla/server/malcontent.py` has proper contents. As I said, this is the same problem I experienced before. To avoid any ambiguity - using `hydrilla` recipe instead of `hydrilla-dist-tarball` causes Guix to use the entirety of sources from current directory which means * `.git/` is included (it has to be for setuptools_scm to be able to cope with a git checkout that does not contain `src/hydrilla.egg-info/`) * `src/hydrilla/_version.py` and `src/hydrilla.egg-info/` may also get included if they are present (i.e. if `python3 -m build -s` was already run at least once in git sources) but they are going to be ignored by setuptools_scm when Guix starts building the package because it sees `.git/` Of course, the `hydrilla` package definition works properly when used in an unpacked source tarball of my project (as opposed to git chcekout). That's what I intended it for, after all. Anyway, whether I use the `hydrilla` definition from my unpacked source tarball or the `hydrilla-dist-tarball` definition from git checkout, it all works well, namely * guix environment/shell command builds my project properly and the `haketilo` command works inside the shell * guix pack -RR builds a working pack that I can successfully use and that I also successfully tried out on a Debian Buster system The problem that made me create this thread - that an end user fails to use the pack on his system[2] and Python interpreter from inside the pack behaves as if hydrilla from inside the pack was not on `PYTHONPATH` (nor `GUIX_PYTHONPATH`, I guess) - remains a mystery. The case of Guix putting empty files in a package when `.git/` is included in the sources is indeed interesting. But right now it is not really important - including git metadata in Guix input is not the right thing to do when other options (such as using source tarball) exist. I'd rather get back to the initial question - about possible explanations why pack's Python interpreter might be using an invalid Python library load path?? Disclaimer: in the experiments above I used a git checkout with 2 new commits[1] in it, hence the version of `3.0b2.dev1+g9f26ebf.d20221013` instead of `3.0b1` as before. The commits are not related to Guix packaging - no need to look for the cause of problems here :) Best, Wojtek [1] https://yhetil.org/guix/20221013115135.2a82894d@koszkonutek-tmp.pl.eu.o= rg/ [2] https://hydrillabugs.koszko.org/issues/130 [3] https://git.koszko.org/pydrilla/commit/?h=3Dkoszko&id=3D6c1f8221d17b1f4= d7955d48a77fefeaf6e3030d7 -- (sig_start) website: https://koszko.org/koszko.html PGP: https://koszko.org/key.gpg fingerprint: E972 7060 E3C5 637C 8A4F 4B42 4BC5 221C 5A79 FD1A Meet Krak=C3=B3w saints! #20: saint J=C3=B3zef Sebastian Pelczar Poznaj =C5=9Bwi=C4=99tych krakowskich! #20: =C5=9Bwi=C4=99ty J=C3=B3zef Se= bastian Pelczar https://pl.wikipedia.org/wiki/J=C3=B3zef_Sebastian_Pelczar -- (sig_end) --Sig_/TJLq4VnDKxWJyl1GG+CpcR1 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQTpcnBg48VjfIpPS0JLxSIcWnn9GgUCY0knNwAKCRBLxSIcWnn9 GjDTAQC+kUwY/fhJNzn93czerh/zJAohJEsiKzURR2Jgms7wFwD/QFgG6IO4L2NP FwM3pjiYR/lw32dwtshSxWYIpi7Yags= =KPyu -----END PGP SIGNATURE----- --Sig_/TJLq4VnDKxWJyl1GG+CpcR1--