From f03bd6a89bfb26f5e34063f7d02bb4046cd7b9d4 Mon Sep 17 00:00:00 2001 From: Sam Estep Date: Tue, 5 Nov 2024 12:37:15 -0500 Subject: [PATCH] Set `.python-version` to 3.10 for pyenv users (#4456) The contribution docs for macOS say to install Python 3.10: https://github.com/carbon-language/carbon-lang/blob/957599b2ab036d01b325aa6e82edea0fce7b4c53/docs/project/contribution_tools.md#L118-L124 For people who are using [pyenv](https://github.com/pyenv/pyenv) instead of Homebrew Python, this PR adds a `.python-version` file to specify Python 3.10 for pyenv to use. However, I also see that later in the same document, the docs only say that Python >=3.9 is required: https://github.com/carbon-language/carbon-lang/blob/957599b2ab036d01b325aa6e82edea0fce7b4c53/docs/project/contribution_tools.md?plain=1#L162 So in that case, feel free to just close this PR. I also saw that #778 specifically moved Carbon away from pyenv, so if pyenv is discouraged in general, also feel free to just close this. --- .pre-commit-config.yaml | 1 + .python-version | 1 + 2 files changed, 2 insertions(+) create mode 100644 .python-version diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 49e38661e95d2..6ff1f187024f7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -213,6 +213,7 @@ repos: (?x)^( .bazelversion| .github/pull_request_template.md| + .python-version| compile_flags.txt| github_tools/requirements.txt| third_party/.*| diff --git a/.python-version b/.python-version new file mode 100644 index 0000000000000..c8cfe3959183f --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.10