You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rather than installing `cysignals-CSI-helper.py` into a `share`
directory and then trying to figure out the correct path to it, install
it as Python package data and use the standard `importlib.resources`
API to access it. For Python versions older than 3.9,
the `importlib_resources` backport is used instead.
Fixessagemath#200
Currently
cysignals-CSI-helper.py
is installed https://github.com/sagemath/cysignals/blob/main/setup.py#L219. The script that makes use of it,cysignals-CSI
, later tries to guess the install location based onsys.argv[0]
: https://github.com/sagemath/cysignals/blob/main/src/scripts/cysignals-CSI#L68This can fail if
sys.argv[0]
isn't something simple like/usr/bin/python
, e.g. https://bugs.gentoo.org/927767By using
importlib.resources.files
we could avoid guessing at all.The text was updated successfully, but these errors were encountered: