Skip to content

feat: python versions update#271

Draft
kiran-thumma wants to merge 3 commits intomainfrom
kithumma/workflow-enhance
Draft

feat: python versions update#271
kiran-thumma wants to merge 3 commits intomainfrom
kithumma/workflow-enhance

Conversation

@kiran-thumma
Copy link
Collaborator

Motivation

The FlyDSL wheel build pipeline was hardcoded to only build for Python 3.10 and 3.12. This PR generalizes the build system to accept an arbitrary list of Python versions, enabling support for Python 3.13 (and any future versions) without requiring further code changes. This unblocks users and downstream consumers who have adopted Python 3.13.

Technical Details

3 files changed across CI workflows and the build script:

  • .github/workflows/build-whl.yaml

    • Added a new python_versions workflow input (default: "3.10 3.12") so callers can specify which Python versions to build wheels for.
    • Replaced the hardcoded python3.12 install step with a loop that installs each requested Python version from the deadsnakes PPA (skipping versions already present in the Docker image).
    • Passes PYTHON_VERSIONS env var into the Docker build container.
    • Dynamically resolves the first built version's build directory when copying fly-opt, instead of hardcoding build_py312.
  • .github/workflows/ci.yaml

    • Added the python_versions input (default: "3.10 3.12") and forwards it to the build-whl workflow.
  • scripts/build_wheels.sh

    • Replaced all hardcoded PY310_BIN/PY312_BIN, VENV_310/VENV_312, and FLY_BUILD_DIR_310/FLY_BUILD_DIR_312 variables with a single PYTHON_VERSIONS environment variable.
    • Refactored ensure_python_bins() to loop over PYTHON_VERSIONS dynamically.
    • Refactored the main() build loop to derive py_tag (e.g., cp313), pybin, venv path, and build_dir from each version string.
    • Updated usage documentation to reflect the new PYTHON_VERSIONS knob.

To build with Python 3.13, callers simply pass python_versions: "3.10 3.12 3.13" to the workflow.

Test Plan

  • Trigger the ci.yaml workflow with python_versions: "3.10 3.12" (default) and verify wheels are built for both versions.
  • Trigger the ci.yaml workflow with python_versions: "3.10 3.12 3.13" and verify a cp313 wheel is produced.
  • Verify fly-opt binary is correctly copied from the first version's build directory.
  • Verify wheels install and import correctly on each target Python version.
  • Run the existing FlyDSL test suite against the 3.13 wheel.

Test Result

Pending

Submission Checklist

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.

1 participant