Skip to content

[馃悰 Bug]: [py] Fix python build so we can upgrade rules_python without using sphinxdocs#17404

Description

@cgoldberg

Description

We are currently using rules_python 1.9.0 for bazel. Upgrading to version 2.0.0 breaks the python build:

ERROR: Skipping '//py:selenium-wheel': error loading package 'py': Label '@@rules_python+//sphinxdocs:sphinx.bzl' is invalid because 'sphinxdocs' is not a package

See: https://github.com/SeleniumHQ/selenium/actions/runs/25072201045/job/73455578520?pr=17403#step:23:28 (from PR #17403)

This happens because we are using @rules_python//sphinxdocs to build our Python API docs. Apparantly, sphinx was never really a supported part of rules_python and just used for internal tooling... and is no longer available in rules_python 2.0.0 (bazel-contrib/rules_python#3705).

I think we need to update ./py/BUILD.bazel to stop loading @rules_python//sphinxdocs:sphinx.bzl because that package no longer exists, and replace it with a py_binary for sphinx-build and a rule that runs sphinx-build directly.

This isn't super high priority, but we are stuck on rules_python 1.9.0 until we fix this, and that prevents us from upgrading to newer Python toolchain versions when they become available.

Reproducible Code

N/A

Debugging Logs

ERROR: Skipping '//py:selenium-wheel': error loading package 'py': Label '@@rules_python+//sphinxdocs:sphinx.bzl' is invalid because 'sphinxdocs' is not a package

Activity

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

    B-buildIncludes scripting, bazel and CI integrationsC-pyPython Bindings

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions