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

Investigate limitations of GitHub Actions setup-python for Python 3.8 on macos-latest #4343

Closed
wants to merge 2 commits into from

Conversation

abravalheri
Copy link
Contributor

Summary of changes

This PR is an attempt of investigating that, by answering the question "what if we install Python prior to cloning the repo?"

Closes

Pull Request Checklist

@abravalheri
Copy link
Contributor Author

OK, it does not work either...

https://github.com/abravalheri/setuptools/actions/runs/8984199833/job/24675550622

2024-05-07T11:06:34.3657630Z Current runner version: '2.316.1'
2024-05-07T11:06:34.3675760Z ##[group]Operating System
2024-05-07T11:06:34.3676230Z macOS
2024-05-07T11:06:34.3676500Z 14.4.1
2024-05-07T11:06:34.3676770Z 23E224
2024-05-07T11:06:34.3677050Z ##[endgroup]
2024-05-07T11:06:34.3677350Z ##[group]Runner Image
2024-05-07T11:06:34.3677690Z Image: macos-14-arm64
2024-05-07T11:06:34.3678010Z Version: 20240422.3
2024-05-07T11:06:34.3678760Z Included Software: https://github.com/actions/runner-images/blob/macos-14-arm64/20240422.3/images/macos/macos-14-arm64-Readme.md
2024-05-07T11:06:34.3679840Z Image Release: https://github.com/actions/runner-images/releases/tag/macos-14-arm64%2F20240422.3
2024-05-07T11:06:34.3680490Z ##[endgroup]
2024-05-07T11:06:34.3680810Z ##[group]Runner Image Provisioner
2024-05-07T11:06:34.3681260Z 2.0.369.1+55cddbb57f254a369b6e7b3b508cebdbee5d24be
2024-05-07T11:06:34.3681700Z ##[endgroup]
2024-05-07T11:06:34.3682370Z ##[group]GITHUB_TOKEN Permissions
2024-05-07T11:06:34.3683290Z Contents: read
2024-05-07T11:06:34.3683610Z Metadata: read
2024-05-07T11:06:34.3683920Z ##[endgroup]
2024-05-07T11:06:34.3685760Z Secret source: None
2024-05-07T11:06:34.3686150Z Prepare workflow directory
2024-05-07T11:06:34.4465850Z Prepare all required actions
2024-05-07T11:06:34.4568610Z Getting action download info
2024-05-07T11:06:34.6259370Z Download action repository 'actions/setup-python@v5' (SHA:82c7e631bb3cdc910f68e0081d67478d79c6982d)
2024-05-07T11:06:36.0876920Z Download action repository 'actions/checkout@v4' (SHA:0ad4b8fadaa221de15dcec353f45205ec38ea70b)
2024-05-07T11:06:37.0771370Z Download action repository 'actions/cache@v4' (SHA:0c45773b623bea8c8e75f6c82b208c3cf94ea4f9)
2024-05-07T11:06:37.1890580Z Download action repository 'codecov/codecov-action@v4' (SHA:5ecb98a3c6b747ed38dc09f787459979aebb39be)
2024-05-07T11:06:38.2421430Z Complete job name: test (3.8, macos-latest)
2024-05-07T11:06:38.3055380Z ##[group]Run actions/setup-python@v5
2024-05-07T11:06:38.3055870Z with:
2024-05-07T11:06:38.3056040Z   python-version: 3.8
2024-05-07T11:06:38.3056260Z   allow-prereleases: true
2024-05-07T11:06:38.3056480Z   check-latest: false
2024-05-07T11:06:38.3056930Z   token: ***
2024-05-07T11:06:38.3057130Z   update-environment: true
2024-05-07T11:06:38.3057340Z env:
2024-05-07T11:06:38.3057500Z   FORCE_COLOR: 1
2024-05-07T11:06:38.3057700Z   PIP_DISABLE_PIP_VERSION_CHECK: true
2024-05-07T11:06:38.3057970Z   PIP_NO_PYTHON_VERSION_WARNING: true
2024-05-07T11:06:38.3058230Z   PIP_NO_WARN_SCRIPT_LOCATION: true
2024-05-07T11:06:38.3058530Z   TOX_OVERRIDE: testenv.pass_env+=GITHUB_*,FORCE_COLOR
2024-05-07T11:06:38.3058860Z   SETUPTOOLS_USE_DISTUTILS: local
2024-05-07T11:06:38.3059090Z ##[endgroup]
2024-05-07T11:06:38.6569070Z ##[group]Installed versions
2024-05-07T11:06:38.6573570Z Version ~3.8.0-0 was not found in the local cache
2024-05-07T11:06:39.5760580Z Version ~3.8.0-0 is available for downloading
2024-05-07T11:06:39.5761330Z Download from "https://github.com/actions/python-versions/releases/download/3.8.10-8879978422/python-3.8.10-darwin-arm64.tar.gz"
2024-05-07T11:06:40.5991400Z Extract downloaded archive
2024-05-07T11:06:40.6249670Z [command]/usr/bin/tar xz -C /Users/runner/work/_temp/e6e2adc3-4cf6-4b62-b0e3-7fa6b5389711 -f /Users/runner/work/_temp/7f6a24dd-a37e-45ae-a0ba-539c2e7ffaf4
2024-05-07T11:06:40.6798880Z Execute installation script
2024-05-07T11:06:40.7131240Z Check if Python hostedtoolcache folder exist...
2024-05-07T11:06:40.7177180Z Install Python binaries from prebuilt package
2024-05-07T11:07:02.0411490Z installer: Package name is Python
2024-05-07T11:07:02.0427610Z installer: Upgrading at base path /
2024-05-07T11:07:02.0428510Z installer: The upgrade was successful.
2024-05-07T11:07:02.0518500Z Create hostedtoolcach symlinks (Required for the backward compatibility)
2024-05-07T11:07:02.0530070Z Create Python 3.8.10 folder
2024-05-07T11:07:02.0681720Z Create additional symlinks (Required for the UsePythonVersion Azure Pipelines task and the setup-python GitHub Action)
2024-05-07T11:07:02.0786220Z Upgrading pip...
2024-05-07T11:07:02.2205750Z ##[error]Traceback (most recent call last):
  File "<string>", line 6, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 203, in run_module
    mod_name, mod_spec, code = _get_module_details(mod_name)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 130, in _get_module_details
    spec = importlib.util.find_spec(mod_name)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/util.py", line 103, in find_spec
    return _find_spec(fullname, parent_path)
  File "<frozen importlib._bootstrap>", line 914, in _find_spec
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/_distutils_hack/__init__.py", line 79, in find_spec
    return method()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/_distutils_hack/__init__.py", line 100, in spec_for_pip
    if self.pip_imported_during_build():
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/_distutils_hack/__init__.py", line 111, in pip_imported_during_build
    return any(
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/_distutils_hack/__init__.py", line 112, in <genexpr>
    frame.f_globals['__file__'].endswith('setup.py')
KeyError: '__file__'
2024-05-07T11:07:02.2239850Z ##[error]Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ensurepip/__main__.py", line 5, in <module>
    sys.exit(ensurepip._main())
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ensurepip/__init__.py", line 206, in _main
    return _bootstrap(
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ensurepip/__init__.py", line 125, in _bootstrap
    return _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ensurepip/__init__.py", line 34, in _run_pip
    return subprocess.run([sys.executable, "-c", code], check=True).returncode
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/Library/Frameworks/Python.framework/Versions/3.8/bin/python', '-c', '\nimport runpy\nimport sys\nsys.path = [\'/var/folders/3m/p59k4qdj0f17st0gn2cmj3640000gn/T/tmpb6mu4_d9/setuptools-56.0.0-py3-none-any.whl\', \'/var/folders/3m/p59k4qdj0f17st0gn2cmj3640000gn/T/tmpb6mu4_d9/pip-21.1.1-py3-none-any.whl\'] + sys.path\nsys.argv[1:] = [\'install\', \'--no-cache-dir\', \'--no-index\', \'--find-links\', \'/var/folders/3m/p59k4qdj0f17st0gn2cmj3640000gn/T/tmpb6mu4_d9\', \'setuptools\', \'pip\']\nrunpy.run_module("pip", run_name="__main__", alter_sys=True)\n']' returned non-zero exit status 1.
2024-05-07T11:07:02.2251850Z ##[error]The process '/bin/bash' failed with exit code 1
2024-05-07T11:07:02.2638220Z Cleaning up orphan processes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant