[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: trash-cli commands fail after upgrade to 0.21.10.24
From: |
Daniel Meißner |
Subject: |
Re: trash-cli commands fail after upgrade to 0.21.10.24 |
Date: |
Sun, 13 Feb 2022 15:00:29 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Hi,
after setting GUIX_PYTHONPATH I was able to get the cli working (see
below). This means the package needs a fix. We could either patch the
scripts to include something like:
--8<---------------cut here---------------start------------->8---
import sys
sys.path.insert(0, "@pythondir@")
--8<---------------cut here---------------end--------------->8---
or maybe we could use the wrap-program procedure to wrap it with
GUIX_PYTHONPATH set correctly. Is either method preferred?
Here's how it worked for me:
--8<---------------cut here---------------start------------->8---
daniel@think ~$ guix shell trash-cli
substitute: Liste der Substitute von „https://ci.guix.gnu.org“ wird
aktualisiert … 100.0%
0,4 MB will be downloaded
python-psutil-5.8.0 304KiB
1.8MiB/s 00:00 [##################] 100.0%
trash-cli-0.21.10.24 49KiB
1.0MiB/s 00:00 [##################] 100.0%
The following derivation will be built:
/gnu/store/fc26wwgy2zbq7k6271w8ksvaf3x10r0h-profile.drv
applying 1 graft for
/gnu/store/rrchh68lpzrg70mf3awgr4y0ks788bgj-python-psutil-5.8.0.drv ...
applying 1 graft for
/gnu/store/3pr2lwjan1i88aqs70bvv3m81z9xvfs3-trash-cli-0.21.10.24.drv ...
building CA certificate bundle...
listing Emacs sub-directories...
building fonts directory...
building directory of Info manuals...
building profile with 1 package...
daniel@think ~ [env]$ trash
Traceback (most recent call last):
File "/gnu/store/kbsw86qqip1p9yzrnm36d71xhk278m1l-profile/bin/trash", line 4,
in <module>
from trashcli.put import main as main
ModuleNotFoundError: No module named 'trashcli'
daniel@think ~ [env]$
GUIX_PYTHONPATH=$GUIX_ENVIRONMENT/lib/python3.9/site-packages trash
Usage: trash [OPTION]... FILE...
trash: error: Please specify the files to trash.
daniel@think ~ [env]$
--8<---------------cut here---------------end--------------->8---
Best,
--
Daniel