Skip to content

Conversation

@yufengwangca
Copy link
Contributor

Summary

The bootstrap script is trying to use Python 3.11 specifically, when your Linux system has been updated to Python 3.13. The error message mentions python3.11-venv but you have python3-venv for Python 3.13 installed.

The issue is on line 153-154 of bootstrap.sh. It's hardcoding python311.json for Darwin and Windows, but NOT for Linux. The script assumes Linux will use the system Python, which now is Python 3.13, but the Pigweed setup is trying to create a venv with Python 3.11 specific packages.

This PR use Python from CIPD for Linux, just like it does for Darwin and Windows. This will ensure that Python 3.11 is downloaded and used consistently across all platforms, avoiding conflicts with your system's Python 3.13.

Re-run the bootstrap script:

This should now download Python 3.11 from CIPD for Linux and create the virtual environment successfully, avoiding the conflict with your system's Python 3.13.

The change I made adds -e linux:$_PYTHON_CIPD_JSON to the gen_pigweed_cipd_json.py command, which tells it to include the Python 3.11 CIPD package for Linux as well.

Related issues

N/A

Testing

  1. Remove the [.environment] directory again to start fresh:
    rm -rf .environment

Re-run the bootstrap script:
source scripts/bootstrap.sh --platform linux

Readability checklist

Copilot AI review requested due to automatic review settings November 6, 2025 22:03
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request addresses a bootstrap failure on Linux when the system's Python version is newer than what the build environment expects. The fix involves explicitly using a specific version of Python (3.11) from CIPD for Linux, mirroring the existing setup for macOS and Windows. The change in scripts/setup/bootstrap.sh is correct and effectively enforces a consistent Python environment across all platforms, which should resolve the build issue. The implementation is clean and follows the established pattern in the script.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds Linux platform support to the Pigweed CIPD JSON generation process by including a platform-specific Python CIPD JSON configuration entry.

Key Changes

  • Added Linux platform entry (-e linux:$_PYTHON_CIPD_JSON) to the gen_pigweed_cipd_json.py script invocation in the bootstrap process

@yufengwangca yufengwangca marked this pull request as draft November 6, 2025 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants