Skip to content

Commit 154831a

Browse files
committed
ENH: Pin Python version in non-Python Azure pipelines
Pin Python version in non-Python Azure pipelines so that the required Python package versions used match those used in the Azure pipelines testing the Python wrapping. Additionally, install the `lxml` Python package explicitly in the Windows build. Addresses: ``` Traceback (most recent call last): File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\anyci\ctest_junit_formatter.py", line 4, in <module> from lxml import etree ModuleNotFoundError: No module named 'lxml' ``` raised in: https://dev.azure.com/itkrobotwindow/ITK.Windows/_build/results?buildId=9122&view=logs&j=2d2b3007-3c5c-5840-9bb0-2b1ea49925f3&t=3f67303d-caa6-535b-2055-750b67f1a4bf&l=17
1 parent f423f2d commit 154831a

4 files changed

Lines changed: 21 additions & 1 deletion

File tree

Testing/ContinuousIntegration/AzurePipelinesBatch.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ jobs:
4242
if DEFINED SYSTEM_PULLREQUEST_SOURCECOMMITID git checkout $(System.PullRequest.SourceCommitId)
4343
displayName: Checkout pull request HEAD
4444
45+
- task: UsePythonVersion@0
46+
inputs:
47+
versionSpec: '3.9'
48+
architecture: 'x64'
49+
4550
- script: |
4651
pip3 install ninja
4752
pip3 install --upgrade setuptools

Testing/ContinuousIntegration/AzurePipelinesLinux.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ jobs:
2424
fi
2525
displayName: 'Checkout pull request HEAD'
2626
27+
- task: UsePythonVersion@0
28+
inputs:
29+
versionSpec: '3.9'
30+
architecture: 'x64'
31+
2732
- bash: |
2833
set -x
2934
sudo pip3 install ninja

Testing/ContinuousIntegration/AzurePipelinesMacOS.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ jobs:
2424
fi
2525
displayName: Checkout pull request HEAD
2626
27+
- task: UsePythonVersion@0
28+
inputs:
29+
versionSpec: '3.9'
30+
architecture: 'x64'
31+
2732
- bash: |
2833
set -x
2934
sudo python3 -m pip install ninja

Testing/ContinuousIntegration/AzurePipelinesWindows.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,15 @@ jobs:
2222
if DEFINED SYSTEM_PULLREQUEST_SOURCECOMMITID git checkout $(System.PullRequest.SourceCommitId)
2323
displayName: Checkout pull request HEAD
2424
25+
- task: UsePythonVersion@0
26+
inputs:
27+
versionSpec: '3.9'
28+
architecture: 'x64'
29+
2530
- script: |
2631
pip3 install ninja
2732
pip3 install --upgrade setuptools
28-
pip3 install scikit-ci-addons
33+
pip3 install scikit-ci-addons lxml
2934
displayName: 'Install dependencies'
3035
3136
- script: |

0 commit comments

Comments
 (0)