setup-python
setup-python copied to clipboard
Support os-release standard
Description:
When PipCache
attempts to generate pip
cache keys and invokes getLinuxInfo
while running on Amazon Linux 2023, the following error occurs:
Error: Unable to locate executable file: lsb_release. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.
This is also triggered when attempting to report errors when searching for Python versions, so this action fails to even give helpful error information when a missing lsb_release
isn't even the issue.
This is caused by the dependency on lsb_release
, which is not available on Amazon Linux 2023:
AL2023 doesn't ship with the lsb_release command, and doesn't include the system-lsb-core package. Software should complete the transition to the os-release standard to maintain compatibility with Amazon Linux and other major Linux distributions.
An alternative is the os-release standard. Using this, at least as a fallback, would go a long way in improving the limited support of AL2023.
Action version: 5.1.0
Platform:
- [ ] Ubuntu
- [ ] macOS
- [ ] Windows
Runner type:
- [ ] Hosted
- [x] Self-hosted
Tools version: N/A
Repro steps:
Run this action on an Amazon Linux 2023 self-hosted runner with cache: 'pip'
.
Expected behavior: Action behaves as expected with pip dependencies cached.
Actual behavior:
Error: Unable to locate executable file: lsb_release. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.