Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prefer usercustomize for readline override
This is mostly to support Homebrew Python, which already has a sitecustomize.py in the version-specific Cellar directory. This directory, however, is not returned by `site.getsitepackages()` so the override goes nowhere. Furthermore, the sitecustomize.py is replaced with every patch release of Homebrew Python (e.g. going from 3.11.3 to 3.11.4), requiring a new override invocation even though the `gnureadline` package has not been reinstalled. This is mildly irritating. Make two changes: - Prefer usercustomize to sitecustomize. This override is valid for a minor release of any Python, making it more convenient. - If you do pick sitecustomize, import the module and use its actual `__file__` location to avoid getting the run-around. It is easy to target sitecustomize instead by simply adding the -s flag; i.e. `python -s -m override_readline`. No need for fancy argparsing :-)
- Loading branch information