Skip to content

Use shutil.which instead of sh.which #2637

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

Merged
merged 1 commit into from
Jul 19, 2022

Conversation

misl6
Copy link
Member

@misl6 misl6 commented Jul 18, 2022

  • Recently our CI started to fail when checking the availability of certain tools (E.g. lld, ccache ...)
    See: https://github.com/kivy/python-for-android/runs/7394641730

  • sh released a new version (1.14.3, 12 hours ago) with a breaking change on our side.

  • This is due to Make sh.which() an internal function amoffat/sh#584

  • They are right, and in order to achieve what we expect shutil.which("name") should be used instead, as returns None when a cmd is not found.

    From Python docs:

    Return the path to an executable which would be run if the given cmd was called. If no cmd would be called, return None.

@misl6 misl6 merged commit 28151d1 into kivy:develop Jul 19, 2022
@misl6 misl6 deleted the fix/use-shutil-instead-of-sh-for-which branch July 19, 2022 06:16
manuq added a commit to endlessm/python-for-android that referenced this pull request Aug 1, 2022
SomberNight pushed a commit to SomberNight/python-for-android that referenced this pull request Oct 10, 2022
SomberNight pushed a commit to SomberNight/python-for-android that referenced this pull request Oct 14, 2022
accumulator pushed a commit to accumulator/python-for-android that referenced this pull request Oct 18, 2022
accumulator pushed a commit to accumulator/python-for-android that referenced this pull request Jan 5, 2023
accumulator pushed a commit to accumulator/python-for-android that referenced this pull request Jan 5, 2023
accumulator pushed a commit to accumulator/python-for-android that referenced this pull request Jan 6, 2023
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