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

Do not raise an error if os.environ does not contain PATH #6935

Merged
merged 2 commits into from
Mar 12, 2023

Conversation

radarhere
Copy link
Member

@radarhere radarhere commented Feb 9, 2023

Resolves #6934

Pillow/setup.py

Lines 245 to 249 in 7e3bed6

def _cmd_exists(cmd):
return any(
os.access(os.path.join(path, cmd), os.X_OK)
for path in os.environ["PATH"].split(os.pathsep)
)

presumes that os.environ contains a "PATH" key.

This PR changes the code no longer raise an error if it doesn't.

setup.py Outdated Show resolved Hide resolved
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
@hugovk hugovk added the automerge Automatically merge PRs that are ready label Mar 12, 2023
@radarhere radarhere merged commit 5b3d39c into python-pillow:main Mar 12, 2023
@radarhere radarhere deleted the path branch March 12, 2023 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Automatically merge PRs that are ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

setup.py build fails without PATH
2 participants