Skip to content

Conversation

@bollwyvl
Copy link
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
Copy link
Contributor

martinpopel commented Dec 15, 2025

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.

@bollwyvl
Copy link
Contributor Author

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

@martinpopel martinpopel merged commit b4a72dc into udapi:master Dec 15, 2025
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