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

Move the entry_points definitions into setup.py #2314

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

matrss
Copy link
Collaborator

@matrss matrss commented Apr 10, 2024

Fixes #2294.

@matrss matrss requested a review from ReimarBauer April 10, 2024 10:22
setup.py Outdated
"mswms = mslib.mswms.mswms:main",
"mswms_demodata = mslib.mswms.demodata:main",
],
gui_scripts=[
Copy link
Member

@ReimarBauer ReimarBauer Apr 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://packaging.python.org/en/latest/specifications/entry-points/

The difference between console_scripts and gui_scripts only affects Windows systems. console_scripts are wrapped in a console executable, so they are attached to a console and can use sys.stdin, sys.stdout and sys.stderr for input and output. gui_scripts are wrapped in a GUI executable, so they can be started without a console, but cannot use standard streams unless application code redirects them. Other platforms do not have the same distinction.

We maybe should not do that extra for windows. Also we have some argparse arguments for msui and click on mssautoplot.

There is also a windows problem which needs on some configurations a terminal start from msui.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

@matrss matrss Apr 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We maybe should not do that extra for windows. Also we have some argparse arguments for msui and click on mssautoplot.

Commandline arguments are unrelated to stdin/stdout/stderr so AFAIU they should work perfectly fine with gui_scripts as well.

But I can move them all into console_scripts as well. EDIT: done.

@matrss matrss force-pushed the move-entrypoints-to-setup.py branch from 20c6a63 to e8bc6ee Compare April 10, 2024 12:03
Copy link
Member

@ReimarBauer ReimarBauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx

@matrss matrss merged commit 1c507c6 into Open-MSS:stable Apr 10, 2024
4 checks passed
@matrss matrss deleted the move-entrypoints-to-setup.py branch April 10, 2024 16:15
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

Successfully merging this pull request may close these issues.

2 participants