Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use importlib.resources to find cysignals-CSI-helper.py #200

Open
orlitzky opened this issue Mar 26, 2024 · 0 comments
Open

Use importlib.resources to find cysignals-CSI-helper.py #200

orlitzky opened this issue Mar 26, 2024 · 0 comments

Comments

@orlitzky
Copy link

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

This can fail if sys.argv[0] isn't something simple like /usr/bin/python, e.g. https://bugs.gentoo.org/927767

By using importlib.resources.files we could avoid guessing at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant