From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id avzcI6F6R2FiLQAAgWs5BA (envelope-from ) for ; Sun, 19 Sep 2021 20:00:01 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id AGgFH6F6R2HBcgAA1q6Kng (envelope-from ) for ; Sun, 19 Sep 2021 18:00:01 +0000 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 1C2F418C06 for ; Sun, 19 Sep 2021 20:00:01 +0200 (CEST) Received: from localhost ([::1]:42306 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mS16e-0007zr-7G for larch@yhetil.org; Sun, 19 Sep 2021 14:00:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53534) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mS16S-0007zj-By for guix-devel@gnu.org; Sun, 19 Sep 2021 13:59:48 -0400 Received: from laurent.telenet-ops.be ([2a02:1800:110:4::f00:19]:53054) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mS16Q-0004r0-1w for guix-devel@gnu.org; Sun, 19 Sep 2021 13:59:48 -0400 Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by laurent.telenet-ops.be with bizsmtp id vtzh250030mfAB401tzhEw; Sun, 19 Sep 2021 19:59:41 +0200 Message-ID: Subject: Re: Python Site Package Syntax Runtime Error From: Maxime Devos To: Antwane Mason , guix-devel@gnu.org Date: Sun, 19 Sep 2021 19:59:33 +0200 In-Reply-To: References: Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-oHO3r7149qH+uVCkXGtg" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1632074381; bh=S6Wigtx/B1jEnkYGvqwVtIQ0yixQUNaTGhoBCM3dNHM=; h=Subject:From:To:Date:In-Reply-To:References; b=dHypc3w98/lTTS+wKJlJZcizRX7OmeGAmiQHe8vbVcRQqWBHYWD91pSXLfq/iCC+o tWgxdXkARojPkzE9PP4N5sw+0j50jUcUnEGhR2Ad1K6qwx8lXer7GFDnlwvtU3OMdz 41kgE1FYLRXJcxe7yxFTmESypUNnhE5GAdxuD4t1FzfjKElwwjgdwKsaBGeLZc7tBh t5/vbN4Xjo9oYuI/vlSz/qsVtTIylna13GJHlaJoTvPCSjHATulVg8Gck5Mv4nDBlL 7uZrsQRTUuECFaQqm7IHMA/fvo5L8EM/3x8Xz5MxvpZZfB9Ki/7aFllbFhI+ANVpR6 Hm9AdK1anwtiA== Received-SPF: pass client-ip=2a02:1800:110:4::f00:19; envelope-from=maximedevos@telenet.be; helo=laurent.telenet-ops.be X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1632074401; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=S6Wigtx/B1jEnkYGvqwVtIQ0yixQUNaTGhoBCM3dNHM=; b=oitlyB7jNnugk6MomuEJF3hnhUBESWiU6EnIJerAmGBpRuXLGracREJLiq2xpF6UNOSsWR uugYJl/P0luWYl+A05Re9fEMDEi8zllQyWg9T5n8bqVuLw36KI46a4GE6sH4kwZ1a/4m3O bEUQmvaxhWGnsExTpGCjjokuCpTcH/tv5M6qMe9MsRFXpmaXKcLebfpiJT73a2tljEIphm XDmaeFO5Wc2ewKtQVbx6WWwZ2rbqa5htEAuhJlPvtr1V3233LX76Dv3vrycKx+pIVywUPf LDu81T3sg5niwfpuXfezxpMu+34Wb7E18JxBn2IxWDszPo8VwDa/xv1u7IUmmQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632074401; a=rsa-sha256; cv=none; b=uk4fOtQ8aLQ+iitr4P8R6heakq4uexclnDJB3WZ79FOyh1fppRkvlaPfHsT/nwZAyigHGm 7GBUD/IBuhZg1/fl263pzLTjz/rT7qyhh1KW5syyHRZEHTGxyMsRfzfHaVRPgOC+otx2TF Gl4RpPCEwC9yxIsPu39VKd3lYRDIZBC2aZth0LPsMwbE0PplOjLZDa55MfjS4UBuX0d4/o aCdX90arAqAAFk20116BEXEMY83y7/LDKHLk9xLZkP7mEUr74lo4jEXLrlI+U2SEAd0ymJ aUsQkoALQc+YuzVbgFzWmKO9Kv0dYSwX6idpCO+62a+LtVavo5Rz2zdOJetu4A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=telenet.be header.s=r21 header.b=dHypc3w9; dmarc=pass (policy=none) header.from=telenet.be; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -5.19 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=telenet.be header.s=r21 header.b=dHypc3w9; dmarc=pass (policy=none) header.from=telenet.be; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 1C2F418C06 X-Spam-Score: -5.19 X-Migadu-Scanner: scn0.migadu.com X-TUID: 35p89FRgEa1x --=-oHO3r7149qH+uVCkXGtg Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Antwane Mason schreef op di 07-09-2021 om 13:39 [-0400]: > Has anyone come across the following runtime error when running a python-= based > application in guix? I'm wondering if something went wrong during the pac= kage build > for python-onlykey-agent that messed up the PYTHONPATH export for the ru= ntime. I should > note that python-onlykey-agent is a program that I have packaged to even= tually submit to guix. >=20 > --8<---------------cut here---------------start------------->8--- > export PYTHONPATH=3D"...:/gnu/store/wand0zrwwnds6x636746116cfh3sy50k-pyth= on-pyopenssl-20.0.0/lib/python3.8/site-packages${PYTHONPATH:+:}$PYTHONPATH" >=20 > SyntaxError: invalid syntax > --8<---------------cut here---------------end--------------->8--- > Here is the entire stack trace for reference. >=20 > --8<---------------cut here---------------start------------->8--- > antwane@wmguix ~$ onlykey-agent git@github.com > Traceback (most recent call last): > File "/gnu/store/s2w1lq80x9vcwp5382kn98f5pi2k4b7b-python-onlykey-agent-= 1.1.12/bin/.onlykey-agent-real", line 11, in > load_entry_point('onlykey-agent=3D=3D1.1.12', 'console_scripts', 'onl= ykey-agent')() > File "/gnu/store/sd2ic7bpv8fx3imy1j8xcjclx71sv6q0-python-3.8.2/lib/pyth= on3.8/site-packages/pkg_resources/__init__.py", line 489, in load_entry_poi= nt > return get_distribution(dist).load_entry_point(group, name) > File "/gnu/store/sd2ic7bpv8fx3imy1j8xcjclx71sv6q0-python-3.8.2/lib/pyth= on3.8/site-packages/pkg_resources/__init__.py", line 2852, in load_entry_po= int > return ep.load() > File "/gnu/store/sd2ic7bpv8fx3imy1j8xcjclx71sv6q0-python-3.8.2/lib/pyth= on3.8/site-packages/pkg_resources/__init__.py", line 2443, in load > return self.resolve() > File "/gnu/store/sd2ic7bpv8fx3imy1j8xcjclx71sv6q0-python-3.8.2/lib/pyth= on3.8/site-packages/pkg_resources/__init__.py", line 2449, in resolve > module =3D __import__(self.module_name, fromlist=3D['__name__'], leve= l=3D0) > File "/gnu/store/s2w1lq80x9vcwp5382kn98f5pi2k4b7b-python-onlykey-agent-= 1.1.12/bin/onlykey_agent.py", line 2 Why is "onlykey_agent.py" in "bin"? If it is not a stand-alone library, shouldn't it be in "share" or "lib"? Anyway, to prevent onlykey_agent.py from being wrapped, you can replace the 'wrap' phase with a custom 'wrap' phase adjusted for onlykey-agent pecu= larities: (package (name "python-onlykey-agent") ... (arguments `(#:phases (modify-phases %standard-phases (replace 'wrap (lambda* (#:key outputs #:allow-other-keys) (define bin (string-append (assoc-ref outputs "out") "/bin") ;; Replace ??? with something appropriate for onlykey-agent=20 (wrap-program (string-append bin "/onlykey-agent) `("PYTHONPATH" '??? '???)) 'maybe-wrap-other-things '???)))))) Greetings, Maxime. --=-oHO3r7149qH+uVCkXGtg Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYUd6hRccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7pfkAP4uufIgia38QYSziE2U+fLcjRiO +t69TAyI9WcmkOuNfgD/dsOJi4aVjgs5kVeQGjd5TMZfXHT6yDjcjxbTAW4m4A0= =gCpf -----END PGP SIGNATURE----- --=-oHO3r7149qH+uVCkXGtg--