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

{CI} Update pipeline to use Python 3.12 #8116

Merged
merged 2 commits into from
Oct 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ jobs:
name: 'pool-ubuntu-2004'
steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.11'
displayName: 'Use Python 3.12'
inputs:
versionSpec: 3.11
versionSpec: 3.12
- template: .azure-pipelines/templates/azdev_setup.yml
- bash: |
#!/usr/bin/env bash
Expand All @@ -70,13 +70,13 @@ jobs:
name: 'pool-ubuntu-2004'
steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.11'
displayName: 'Use Python 3.12'
inputs:
versionSpec: 3.11
versionSpec: 3.12
- bash: |
#!/usr/bin/env bash
set -ev
pip install wheel==0.30.0 requests packaging
pip install wheel==0.30.0 requests packaging setuptools
Copy link
Contributor Author

@bebound bebound Oct 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wheel 0.30.0 is not compatible with Python 3.12 as distutils was removed. Install setuptools as a workaround.

Traceback (most recent call last):
  File "/mnt/vss/_work/1/s/./scripts/ci/test_index.py", line 23, in <module>
    from wheel.install import WHEEL_INFO_RE
  File "/opt/hostedtoolcache/Python/3.12.6/x64/lib/python3.12/site-packages/wheel/install.py", line 17, in <module>
    from .paths import get_install_paths
  File "/opt/hostedtoolcache/Python/3.12.6/x64/lib/python3.12/site-packages/wheel/paths.py", line 7, in <module>
    import distutils.command.install as install
ModuleNotFoundError: No module named 'distutils'

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why installing setuptools can work around it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setuptools provides a "vendored" distutils.

root@7a5d336f2f35:/# python -c "import distutils;print(distutils.__path__)"
['/usr/local/lib/python3.12/site-packages/setuptools/_distutils']

export CI="ADO"
python ./scripts/ci/test_index.py -v
displayName: "Verify Extensions Index"
Expand All @@ -94,7 +94,7 @@ jobs:
Python310:
python.version: '3.10'
Python311:
python.version: '3.11'
python.version: '3.12'
steps:
- task: UsePythonVersion@0
displayName: 'Use Python $(python.version)'
Expand Down Expand Up @@ -122,9 +122,9 @@ jobs:
name: 'pool-ubuntu-2004'
steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.11'
displayName: 'Use Python 3.12'
inputs:
versionSpec: 3.11
versionSpec: 3.12
- template: .azure-pipelines/templates/azdev_setup.yml
- bash: |
#!/usr/bin/env bash
Expand All @@ -146,9 +146,9 @@ jobs:
name: 'pool-ubuntu-2004'
steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.11'
displayName: 'Use Python 3.12'
inputs:
versionSpec: 3.11
versionSpec: 3.12
- template: .azure-pipelines/templates/azdev_setup.yml
- bash: |
#!/usr/bin/env bash
Expand All @@ -171,9 +171,9 @@ jobs:
# name: 'pool-ubuntu-2004'
# steps:
# - task: UsePythonVersion@0
# displayName: 'Use Python 3.11'
# displayName: 'Use Python 3.12'
# inputs:
# versionSpec: 3.11
# versionSpec: 3.12
# - bash: pip install wheel==0.30.0
# displayName: 'Install wheel==0.30.0'
# - task: Bash@3
Expand Down
Loading