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

handle failures to find a user home directory #278

Merged
merged 5 commits into from
Aug 26, 2024

Commits on Aug 11, 2024

  1. handle failures to find a user home directory

    In certain environments (notably, the [bazel sandbox](https://bazel.build/docs/sandboxing) on windows), it is possible for `pathlib.Path('~').expanduser()` to fail to find the user home directory and [raise a `RuntimeError`](https://docs.python.org/3/library/pathlib.html#pathlib.Path.expanduser). This causes `distutils` (and ultimately, `setuptools`) to fail.
    
    With this patch, we catch and handle the exception by logging a warning and continuing without a user's config file.
    
    motivated by bazelbuild/rules_python#1067
    cj81499 committed Aug 11, 2024
    Configuration menu
    Copy the full SHA
    7b17c15 View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2024

  1. Update distutils/dist.py

    Co-authored-by: Anderson Bravalheri <andersonbravalheri+github@gmail.com>
    cj81499 and abravalheri committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    9824bd8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    17314ac View commit details
    Browse the repository at this point in the history
  3. format

    cj81499 committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    d54bfb0 View commit details
    Browse the repository at this point in the history
  4. Simply suppress the exception.

    jaraco committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    a13507c View commit details
    Browse the repository at this point in the history