-
-
Notifications
You must be signed in to change notification settings - Fork 673
cli: Allow importing modules from the current directory when running a command or a file. #40912
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
base: develop
Are you sure you want to change the base?
Conversation
…a command or a file. Matches python behavior, and fixes another regression with respect to the bash script Fixes sagemath#40908
d9149c5
to
8703791
Compare
Co-authored-by: Tobias Diez <[email protected]>
Documentation preview for this PR (built with commit 4170f19; changes) is ready! 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit uncomfortable with putting the sys.path
manipulation in the run
commands. For example, they would be invoked by pytest as well, changing how other tests afterwards are run.
What are your thoughts on putting this line in cli.__main__
instead?
That would only work when running |
Would [project.scripts]
sage = "sage.cli.__main__:main" in pyproject.toml work? |
Yes, it does. |
Matches python behavior, and fixes another regression with respect to the bash script
Fixes #40908
⌛ Dependencies
#40872