unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Antwane Mason <ad.mason1413@gmail.com>
To: Hartmut Goebel <h.goebel@crazy-compilers.com>
Cc: guix-devel@gnu.org
Subject: Re: Python Site Package Syntax Runtime Error
Date: Sat, 18 Sep 2021 15:44:23 -0400	[thread overview]
Message-ID: <CAAztfgJraRCKUr74m9dpWWTdLrnkVx=cSbhUDvfrjTkMMG=orQ@mail.gmail.com> (raw)
In-Reply-To: <c9cd38e9-4902-9583-099c-8117cedee47e@crazy-compilers.com>

[-- Attachment #1: Type: text/plain, Size: 12024 bytes --]

Thank you for the response. I think since there is nothing out of the
ordinary going on in the package definition, this may be some edge-case in
one of the python build stages. Below is the package definition.


























*--8<---------------cut
here---------------start------------->8---(define-public
python-onlykey-agent  (package    (name "python-onlykey-agent")
(version "1.1.12")    (source      (origin        (method url-fetch)
     (uri (pypi-uri "onlykey-agent" version))        (sha256
(base32
"1586zhpph79s12alnyj1iiiwj0c5h1z8na2lqczf560p5mca6gxw"))))
(build-system python-build-system)    (propagated-inputs
`(("python-lib-agent" ,python-lib-agent)        ("python-onlykey"
,python-onlykey)))    (home-page
"http://github.com/trustcrypto/onlykey-agent
<http://github.com/trustcrypto/onlykey-agent>")    (synopsis
"Using OnlyKey as hardware SSH/GPG agent")    (description      "Using
OnlyKey as hardware SSH/GPG agent")    (license
license:lgpl3)))--8<---------------cut
here---------------end--------------->8---*

From what I can tell, one of the build phases responsible for wrapping
executables into shell scripts is wrongly wrapping one of the python files.
This causes the shell script which is named as the original python file to
be loaded as a python module causing a syntax error because the export line
is a shell directive and not valid python syntax. Below is the stack trace
again for reference.  The last file referenced in the stack trace is a
shell script wrapper for the original onlykey_agent.py file which was
renamed .onlykey_agent.py-real. Below is the full file for this shell
script. Can anyone provide guidance as to which build phase needs to change
and how to change it to prevent onlykey_agent.py from being wrapped?



















*--8<---------------cut
here---------------start------------->8---antwane@wmguix ~$
onlykey-agentTraceback (most recent call last):  File
"/gnu/store/s2w1lq80x9vcwp5382kn98f5pi2k4b7b-python-onlykey-agent-1.1.12/bin/.onlykey-agent-real",
line 11, in <module>    load_entry_point('onlykey-agent==1.1.12',
'console_scripts', 'onlykey-agent')()  File
"/gnu/store/sd2ic7bpv8fx3imy1j8xcjclx71sv6q0-python-3.8.2/lib/python3.8/site-packages/pkg_resources/__init__.py",
line 489, in load_entry_point    return
get_distribution(dist).load_entry_point(group, name)  File
"/gnu/store/sd2ic7bpv8fx3imy1j8xcjclx71sv6q0-python-3.8.2/lib/python3.8/site-packages/pkg_resources/__init__.py",
line 2852, in load_entry_point    return ep.load()  File
"/gnu/store/sd2ic7bpv8fx3imy1j8xcjclx71sv6q0-python-3.8.2/lib/python3.8/site-packages/pkg_resources/__init__.py",
line 2443, in load    return self.resolve()  File
"/gnu/store/sd2ic7bpv8fx3imy1j8xcjclx71sv6q0-python-3.8.2/lib/python3.8/site-packages/pkg_resources/__init__.py",
line 2449, in resolve    module = __import__(self.module_name,
fromlist=['__name__'], level=0)  File
"/gnu/store/s2w1lq80x9vcwp5382kn98f5pi2k4b7b-python-onlykey-agent-1.1.12/bin/onlykey_agent.py",
line 2    export
PYTHONPATH="/gnu/store/s2w1lq80x9vcwp5382kn98f5pi2k4b7b-python-onlykey-agent-1.1.12/lib/python3.8/site-packages:/gnu/store/ahbp2qnrx7m6m5yrxcfsf37gqmgkm13c-python-lib-agent-1.0.3/lib/python3.8/site-packages:/gnu/store/xq0bpzrxy461igy3vwymgmlfg85ghfgv-python-onlykey-1.2.6/lib/python3.8/site-packages:/gnu/store/sd2ic7bpv8fx3imy1j8xcjclx71sv6q0-python-3.8.2/lib/python3.8/site-packages:/gnu/store/gb0xnb6vldlmwiky77w7hxpkjbvp1560-python-wheel-0.36.2/lib/python3.8/site-packages:/gnu/store/7c48ls8c4xddx22yy7rlnszs0fjl56k7-python-unidecode-1.1.1/lib/python3.8/site-packages:/gnu/store/hi8yk6yzivzwpxak2fcggd6zl887n7zj-python-semver-2.9.0/lib/python3.8/site-packages:/gnu/store/gvka9y88b5i6h1fbwb5qxi8vv0ajh6d3-python-pynacl-1.4.0/lib/python3.8/site-packages:/gnu/store/4153n7v3hy0pn2df0c8rag7v4gmgg0ki-python-pymsgbox-1.0.6/lib/python3.8/site-packages:/gnu/store/ppdbw2sl5filj79rl6k0wqy7xkz2603n-python-pycryptodome-3.9.9/lib/python3.8/site-packages:/gnu/store/b2pf54i477iby8f17am9p0x2bz96gn63-python-mnemonic-0.20/lib/python3.8/site-packages:/gnu/store/3vl9a6y7d9r3w3diy2bj15jxd0qgzycv-python-ecdsa-0.14.1/lib/python3.8/site-packages:/gnu/store/1qz6j51mmn2z1za41fb9vs9dgmwisng3-python-docutils-0.16/lib/python3.8/site-packages:/gnu/store/v74q9niaprwv0l25hb1hcyhvyzwp7zmf-python-daemon-2.2.3/lib/python3.8/site-packages:/gnu/store/jvm96kifzns968g0l115chfdp3n5ksba-python-configargparse-1.2.3/lib/python3.8/site-packages:/gnu/store/j3w4j8x76n7wdbjrh377fwx4hwgmfwmy-python-backports.shutil-which-3.5.2/lib/python3.8/site-packages:/gnu/store/hjmz8ymac939ribn7g3jkgms4dk2az3a-python-six-1.14.0/lib/python3.8/site-packages:/gnu/store/bxbhdka9x8pnl7jnpkvz1nvgg2m8xqfs-python-prompt-toolkit-3.0.18/lib/python3.8/site-packages:/gnu/store/2lrpayrb6rrfmscfkfii65jdd328v945-python-onlykey-solo-0.0.28/lib/python3.8/site-packages:/gnu/store/1xmngywbzxx8lb539z4zcggm12gw6lzm-python-hidapi-0.7.99.post21/lib/python3.8/site-packages:/gnu/store/j1qn1pjvpyljmrb7hh1pjsgz44b13y5i-python-cython-0.29.22/lib/python3.8/site-packages:/gnu/store/d5zp1z8vz42c8b69fszck1vqh59npms4-python-aenum-2.2.4/lib/python3.8/site-packages:/gnu/store/sfy8vc8da10appy093izjz4byzd7sfqp-python-cffi-1.14.4/lib/python3.8/site-packages:/gnu/store/wi6ihkh2dq1sj6pq6g28f5vw157kfy8x-python-lockfile-0.12.2/lib/python3.8/site-packages:/gnu/store/xjiplzqxr084ximm4wdhyx3wzf8nxvv0-python-wcwidth-0.1.8/lib/python3.8/site-packages:/gnu/store/kffam5lzshdhb0ygq0r76gqvavs0190c-python-requests-2.25.0/lib/python3.8/site-packages:/gnu/store/qkj3ssg0y3ya0d450pp0kaa7zbg9i0x6-python-pyusb-1.0.2/lib/python3.8/site-packages:/gnu/store/b3k1kmx7rzkykb4ik5nz0jdabqr86vvv-python-pyserial-3.5/lib/python3.8/site-packages:/gnu/store/w3q52n0pc5zvblr8qdsgdfiw33psj6pz-python-intelhex-2.2.1/lib/python3.8/site-packages:/gnu/store/fpk2f2jwqah0s340hdhmr734vvxq3z3j-python-fido2-0.9.1/lib/python3.8/site-packages:/gnu/store/sjiiqs605sfsqxjdkcm3m8rx0ahv5wvv-python-cryptography-3.3.1/lib/python3.8/site-packages:/gnu/store/5a12m99wdfqydzwx46nlfqqvi9q3pq49-python-click-7.1.2/lib/python3.8/site-packages:/gnu/store/k08j1silv8zxfglz3mb5q7ngmya9cv39-python-pycparser-2.20/lib/python3.8/site-packages:/gnu/store/fd7sx13lhrgbrnsa5k3g8inas417p5q5-python-urllib3-1.26.4/lib/python3.8/site-packages:/gnu/store/ihl3h0s000vlkvadxvv21cbn4fqzvmav-python-idna-2.10/lib/python3.8/site-packages:/gnu/store/ysvrcvvaajbg432f7pr0k8x2w21lnz81-python-chardet-3.0.4/lib/python3.8/site-packages:/gnu/store/2j54g0s8db1b10ggs4rirfb5vv8abm2y-python-certifi-2020.12.5/lib/python3.8/site-packages:/gnu/store/q01v2xjfcl7d020y3yh865695gm8i3gx-python-iso8601-0.1.13/lib/python3.8/site-packages:/gnu/store/xkcc4372psi79xiidw4k33nmyf6mk36h-python-asn1crypto-1.4.0/lib/python3.8/site-packages:/gnu/store/xgsczafbfkmqmanm87nx2qfyzp4h313i-python-pysocks-1.7.1/lib/python3.8/site-packages:/gnu/store/wand0zrwwnds6x636746116cfh3sy50k-python-pyopenssl-20.0.0/lib/python3.8/site-packages${PYTHONPATH:+:}$PYTHONPATH"
          ^SyntaxError: invalid syntax--8<---------------cut
here---------------end--------------->8---*







*--8<---------------cut
here---------------start------------->8---#!/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/bashexport
PYTHONPATH="/gnu/store/s2w1lq80x9vcwp5382kn98f5pi2k4b7b-python-onlykey-agent-1.1.12/lib/python3.8/site-packages:/gnu/store/ahbp2qnrx7m6m5yrxcfsf37gqmgkm13c-python-lib-agent-1.0.3/lib/python3.8/site-packages:/gnu/store/xq0bpzrxy461igy3vwymgmlfg85ghfgv-python-onlykey-1.2.6/lib/python3.8/site-packages:/gnu/store/sd2ic7bpv8fx3imy1j8xcjclx71sv6q0-python-3.8.2/lib/python3.8/site-packages:/gnu/store/gb0xnb6vldlmwiky77w7hxpkjbvp1560-python-wheel-0.36.2/lib/python3.8/site-packages:/gnu/store/7c48ls8c4xddx22yy7rlnszs0fjl56k7-python-unidecode-1.1.1/lib/python3.8/site-packages:/gnu/store/hi8yk6yzivzwpxak2fcggd6zl887n7zj-python-semver-2.9.0/lib/python3.8/site-packages:/gnu/store/gvka9y88b5i6h1fbwb5qxi8vv0ajh6d3-python-pynacl-1.4.0/lib/python3.8/site-packages:/gnu/store/4153n7v3hy0pn2df0c8rag7v4gmgg0ki-python-pymsgbox-1.0.6/lib/python3.8/site-packages:/gnu/store/ppdbw2sl5filj79rl6k0wqy7xkz2603n-python-pycryptodome-3.9.9/lib/python3.8/site-packages:/gnu/store/b2pf54i477iby8f17am9p0x2bz96gn63-python-mnemonic-0.20/lib/python3.8/site-packages:/gnu/store/3vl9a6y7d9r3w3diy2bj15jxd0qgzycv-python-ecdsa-0.14.1/lib/python3.8/site-packages:/gnu/store/1qz6j51mmn2z1za41fb9vs9dgmwisng3-python-docutils-0.16/lib/python3.8/site-packages:/gnu/store/v74q9niaprwv0l25hb1hcyhvyzwp7zmf-python-daemon-2.2.3/lib/python3.8/site-packages:/gnu/store/jvm96kifzns968g0l115chfdp3n5ksba-python-configargparse-1.2.3/lib/python3.8/site-packages:/gnu/store/j3w4j8x76n7wdbjrh377fwx4hwgmfwmy-python-backports.shutil-which-3.5.2/lib/python3.8/site-packages:/gnu/store/hjmz8ymac939ribn7g3jkgms4dk2az3a-python-six-1.14.0/lib/python3.8/site-packages:/gnu/store/bxbhdka9x8pnl7jnpkvz1nvgg2m8xqfs-python-prompt-toolkit-3.0.18/lib/python3.8/site-packages:/gnu/store/2lrpayrb6rrfmscfkfii65jdd328v945-python-onlykey-solo-0.0.28/lib/python3.8/site-packages:/gnu/store/1xmngywbzxx8lb539z4zcggm12gw6lzm-python-hidapi-0.7.99.post21/lib/python3.8/site-packages:/gnu/store/j1qn1pjvpyljmrb7hh1pjsgz44b13y5i-python-cython-0.29.22/lib/python3.8/site-packages:/gnu/store/d5zp1z8vz42c8b69fszck1vqh59npms4-python-aenum-2.2.4/lib/python3.8/site-packages:/gnu/store/sfy8vc8da10appy093izjz4byzd7sfqp-python-cffi-1.14.4/lib/python3.8/site-packages:/gnu/store/wi6ihkh2dq1sj6pq6g28f5vw157kfy8x-python-lockfile-0.12.2/lib/python3.8/site-packages:/gnu/store/xjiplzqxr084ximm4wdhyx3wzf8nxvv0-python-wcwidth-0.1.8/lib/python3.8/site-packages:/gnu/store/kffam5lzshdhb0ygq0r76gqvavs0190c-python-requests-2.25.0/lib/python3.8/site-packages:/gnu/store/qkj3ssg0y3ya0d450pp0kaa7zbg9i0x6-python-pyusb-1.0.2/lib/python3.8/site-packages:/gnu/store/b3k1kmx7rzkykb4ik5nz0jdabqr86vvv-python-pyserial-3.5/lib/python3.8/site-packages:/gnu/store/w3q52n0pc5zvblr8qdsgdfiw33psj6pz-python-intelhex-2.2.1/lib/python3.8/site-packages:/gnu/store/fpk2f2jwqah0s340hdhmr734vvxq3z3j-python-fido2-0.9.1/lib/python3.8/site-packages:/gnu/store/sjiiqs605sfsqxjdkcm3m8rx0ahv5wvv-python-cryptography-3.3.1/lib/python3.8/site-packages:/gnu/store/5a12m99wdfqydzwx46nlfqqvi9q3pq49-python-click-7.1.2/lib/python3.8/site-packages:/gnu/store/k08j1silv8zxfglz3mb5q7ngmya9cv39-python-pycparser-2.20/lib/python3.8/site-packages:/gnu/store/fd7sx13lhrgbrnsa5k3g8inas417p5q5-python-urllib3-1.26.4/lib/python3.8/site-packages:/gnu/store/ihl3h0s000vlkvadxvv21cbn4fqzvmav-python-idna-2.10/lib/python3.8/site-packages:/gnu/store/ysvrcvvaajbg432f7pr0k8x2w21lnz81-python-chardet-3.0.4/lib/python3.8/site-packages:/gnu/store/2j54g0s8db1b10ggs4rirfb5vv8abm2y-python-certifi-2020.12.5/lib/python3.8/site-packages:/gnu/store/q01v2xjfcl7d020y3yh865695gm8i3gx-python-iso8601-0.1.13/lib/python3.8/site-packages:/gnu/store/xkcc4372psi79xiidw4k33nmyf6mk36h-python-asn1crypto-1.4.0/lib/python3.8/site-packages:/gnu/store/xgsczafbfkmqmanm87nx2qfyzp4h313i-python-pysocks-1.7.1/lib/python3.8/site-packages:/gnu/store/wand0zrwwnds6x636746116cfh3sy50k-python-pyopenssl-20.0.0/lib/python3.8/site-packages${PYTHONPATH:+:}$PYTHONPATH"exec
-a "$0" "/gnu/store/s2w1lq80x9vcwp5382kn98f5pi2k4b7b-python-onlykey-agent-1.1.12/bin/.onlykey_agent.py-real"
"$@"--8<---------------cut here---------------end--------------->8---*




Regards,
Antwane


On Thu, Sep 16, 2021 at 8:06 AM Hartmut Goebel <h.goebel@crazy-compilers.com>
wrote:

> Am 07.09.21 um 19:39 schrieb Antwane Mason:
> > File
> >
> "/gnu/store/s2w1lq80x9vcwp5382kn98f5pi2k4b7b-python-onlykey-agent-1.1.12/bin/onlykey_agent.py",
>
> > line 2
> >     export PYTHONPATH="/gnu/store/…-
>
> This looks like an error in the package definition: A .py-file contains
> a shell command.
>
> HTH
>
> --
> Regards
> Hartmut Goebel
>
> | Hartmut Goebel          | h.goebel@crazy-compilers.com               |
> | www.crazy-compilers.com | compilers which you thought are impossible |
>
>

[-- Attachment #2: Type: text/html, Size: 13332 bytes --]

  reply	other threads:[~2021-09-18 19:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-07 17:39 Python Site Package Syntax Runtime Error Antwane Mason
2021-09-16 12:06 ` Hartmut Goebel
2021-09-18 19:44   ` Antwane Mason [this message]
2021-09-19 16:31     ` Antwane Mason
2021-09-20 12:32     ` Hartmut Goebel
2021-09-20 20:28       ` Antwane Mason
2021-09-20 20:45         ` Hartmut Goebel
2021-09-19 17:59 ` Maxime Devos
     [not found]   ` <CAAztfgL+ZmbupibJtAeEQLdLoPwR=BNmnU80YU10Ea35P3jdeA@mail.gmail.com>
2021-09-20 20:10     ` Antwane Mason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAztfgJraRCKUr74m9dpWWTdLrnkVx=cSbhUDvfrjTkMMG=orQ@mail.gmail.com' \
    --to=ad.mason1413@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=h.goebel@crazy-compilers.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).