Skip to content

Missing AGENT_TOOLSDIRECTORY env variable for setup-python@v2 #217

Closed

Description

@mjpieters

The setup-python@v2 action makes the following assumptions:

  • On linux, the /etc/lsb-release file is read and the DISTRIB_RELEASE=... value must match the platform_version keys in the Python versions manifest. In practice this means the container must be based on Ubuntu.
  • Once downloaded, each Python version has a setup.sh file, generated from a template that assumes the AGENT_TOOLSDIRECTORY env variable exists; this is just an alias for RUNNER_TOOL_CACHE.
  • The python -m pip install --ignore-installed pip upgrade step requires SSL libraries to be installed (openssl)

So I can make the action work by:

While I understand that the node:*-slim containers are only meant to be starter images, could act be updated to provide the AGENT_TOOLSDIRECTORY variable?

Test workflow:

name: Run testsuite

on:
  push

jobs:
  test:
    name: Run Python
    runs-on: ubuntu-latest
    env:
        AGENT_TOOLSDIRECTORY: ${{ runner.tool_cache }}
    steps:
    - name: Set up Python 3.7
      uses: actions/setup-python@v2
      with:
        python-version: 3.7
    - name: Test Python
      run: |
        python -V

Activity

  1. mjpieters commented on May 1, 2020

    @mjpieters
    Author

    This appears to be a python-versions bug instead. It was already fixed in the Windows install script, so I proposed a fix for the Linux version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions