Open orlitzky opened 4 months ago
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 on sys.argv[0]: https://github.com/sagemath/cysignals/blob/main/src/scripts/cysignals-CSI#L68
cysignals-CSI-helper.py
cysignals-CSI
sys.argv[0]
This can fail if sys.argv[0] isn't something simple like /usr/bin/python, e.g. https://bugs.gentoo.org/927767
/usr/bin/python
By using importlib.resources.files we could avoid guessing at all.
importlib.resources.files
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.