File: use-python-version.yml

package info (click to toggle)
python-azure 20250603%2Bgit-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 851,724 kB
  • sloc: python: 7,362,925; ansic: 804; javascript: 287; makefile: 195; sh: 145; xml: 109
file content (22 lines) | stat: -rw-r--r-- 985 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
parameters:
  versionSpec: ''

steps:
  # as of macos-14, pypy of all stripes is no longer available on the predefined MAC agents
  # this script installs the newest version of pypy39 from the official pypy site into the hosted tool cache
  - script: |
      TOOL_LOCATION=$(AGENT_TOOLSDIRECTORY)/PyPy/3.9.4/x64
      curl -L -o pypy3.9-v7.3.16-macos_x86_64.tar.bz2 https://downloads.python.org/pypy/pypy3.9-v7.3.16-macos_x86_64.tar.bz2
      mkdir -p $TOOL_LOCATION
      tar -xvjf pypy3.9-v7.3.16-macos_x86_64.tar.bz2 -C $TOOL_LOCATION --strip-components=1
      chmod -R 0755 $TOOL_LOCATION/bin
      $TOOL_LOCATION/bin/python -m ensurepip
      touch $TOOL_LOCATION/../x64.complete
    displayName: Install pypy39 to hosted tool cache
    condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))

  - task: UsePythonVersion@0
    displayName: "Use Python ${{ parameters.versionSpec }}"
    inputs:
      versionSpec: ${{ parameters.versionSpec }}
      allowUnstable: true