← 返回首页
Use console_scripts for CLI by bollwyvl · Pull Request #133 · udapi/udapi-python · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

Use console_scripts for CLI#133

Merged
martinpopel merged 2 commits into
udapi:masterfrom
bollwyvl:use-console-scripts
Dec 15, 2025
Merged

Use console_scripts for CLI#133
martinpopel merged 2 commits into
udapi:masterfrom
bollwyvl:use-console-scripts

Conversation

Copy link
Copy Markdown
Contributor

See:

This PR moves bin/udapy into udapi/cli.py, and reworks the naming and structure to work as a main function rather than a "pure" script.

This is then referenced in setup.cfg to use console_scripts which will handle building cross-platform scripts at install time.

martinpopel commented Dec 15, 2025
edited
Loading

Copy link
Copy Markdown
Contributor

Thanks a lot. I understand such modernization is needed (perhaps for other OS than Linux and Windows). However, most current users followed the recommendation to have

export PATH="$HOME/udapi-python/bin:$PATH" export PYTHONPATH="$HOME/udapi-python/:$PYTHONPATH"

in their ~/.bashrc. Udapi does not add new requirements often, so all they have to do for update is git pull.
I understand they should use pip install -e . instead of editing $PATH and $PYTHONPATH. I plan to update the README accordingly. That said, I would like to keep Udapi backward compatible, so I would prefer to (re)create bin/udapy after merging this PR:

#!/usr/bin/env python3 """Thin wrapper for backward compatibility. Calls udapi.cli.main().""" import sys from udapi.cli import main if __name__ == "__main__": sys.exit(main())

This bin/udapy will be omitted in new PyPI releases (so that it does not clash with the auto-generated udapy script).
@bollwyvl Does this make sense?
Also, I would like to set up GitHub workflow CI tests (instead of the outdated Circle CI) before merging this PRCircle CI to test also PRs from forks.

Copy link
Copy Markdown
Contributor Author

Sure, 27f6a4c put bin back. I manually verified it doesn't make it to the .tar.gz or .whl.

martinpopel merged commit b4a72dc into udapi:master Dec 15, 2025
bollwyvl mentioned this pull request Mar 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Footer

© 2026 GitHub, Inc.