deps: Raise the Python requirement to 3.10 (#31088)

This will allow us to use the pip's new dependency resolver.
This commit is contained in:
Martin Robinson 2024-01-15 12:56:15 +01:00 committed by GitHub
parent 3c1ab65458
commit 0d240b8713
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 15 additions and 5 deletions

View file

@ -10,7 +10,7 @@ jobs:
# This job is only useful when run on upstream servo. # This job is only useful when run on upstream servo.
if: github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch' if: github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch'
name: Upload docs to GitHub Pages name: Upload docs to GitHub Pages
runs-on: ubuntu-20.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:

View file

@ -87,6 +87,9 @@ jobs:
- name: Set LIBCLANG_PATH env # needed for bindgen in mozangle - name: Set LIBCLANG_PATH env # needed for bindgen in mozangle
if: ${{ !inputs.upload }} # not needed on ubuntu 20.04 used for nightly if: ${{ !inputs.upload }} # not needed on ubuntu 20.04 used for nightly
run: echo "LIBCLANG_PATH=/usr/lib/llvm-14/lib" >> $GITHUB_ENV run: echo "LIBCLANG_PATH=/usr/lib/llvm-14/lib" >> $GITHUB_ENV
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install taplo - name: Install taplo
uses: baptiste0928/cargo-install@v2 uses: baptiste0928/cargo-install@v2
with: with:

View file

@ -22,6 +22,9 @@ jobs:
fetch-depth: 2 fetch-depth: 2
- name: Update rustc - name: Update rustc
run: echo nightly > rust-toolchain run: echo nightly > rust-toolchain
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Bootstrap - name: Bootstrap
run: | run: |
python3 -m pip install --upgrade pip python3 -m pip install --upgrade pip

View file

@ -70,6 +70,9 @@ jobs:
run: | run: |
choco install wixtoolset choco install wixtoolset
echo "C:\\Program Files (x86)\\WiX Toolset v3.11\\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append echo "C:\\Program Files (x86)\\WiX Toolset v3.11\\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Bootstrap - name: Bootstrap
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip

View file

@ -22,6 +22,7 @@ manually, try the [manual build setup][manual-build].
### macOS ### macOS
- Ensure that the version showed by `python --version` is >= 3.10:
- Install [Xcode](https://developer.apple.com/xcode/) - Install [Xcode](https://developer.apple.com/xcode/)
- Install [Homebrew](https://brew.sh/) - Install [Homebrew](https://brew.sh/)
- Run `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh` - Run `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh`
@ -31,7 +32,7 @@ manually, try the [manual build setup][manual-build].
### Linux ### Linux
- Run `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh` - Run `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh`
- Install Python - Install Python (version >= 3.10):
- **Debian-like:** Run `sudo apt install python3-pip python3-venv` - **Debian-like:** Run `sudo apt install python3-pip python3-venv`
- **Fedora:** Run `sudo dnf install python3 python3-pip python3-devel` - **Fedora:** Run `sudo dnf install python3 python3-pip python3-devel`
- **Arch:** Run `sudo pacman -S --needed python python-pip` - **Arch:** Run `sudo pacman -S --needed python python-pip`

View file

@ -209,10 +209,10 @@ def bootstrap(topdir):
print('Current path:', topdir) print('Current path:', topdir)
sys.exit(1) sys.exit(1)
# Ensure we are running Python 3.5+. We put this check here so we generate a # Ensure we are running Python 3.10+. We put this check here so we generate a
# user-friendly error message rather than a cryptic stack trace on module import. # user-friendly error message rather than a cryptic stack trace on module import.
if sys.version_info < (3, 5): if sys.version_info < (3, 10):
print('Python3 (>=3.5) is required to run mach.') print('Python3 (>=3.10) is required to run mach.')
print('You are running Python', platform.python_version()) print('You are running Python', platform.python_version())
sys.exit(1) sys.exit(1)