Repository navigation
fix(rpm): build the Python SDK from older protoc and install every SDK module - #4439
Merged
TaylorMutch merged 2 commits intoOct 14, 2026
Conversation
4 tasks done
Add a --no-pyi option to generate_python_proto.py for toolchains whose protoc predates --pyi_out, such as Fedora's grpcio-tools 1.48, and list python3-googleapis-common-protos and python3-httpx in the spec's Recommends and dist-info Requires-Dist, which the SDK needs to import. Default behavior is unchanged. Contributes to NVIDIA#3510. Signed-off-by: politerealism <burdcat17@gmail.com>
The python3-openshell %install copied only __init__.py, sandbox.py and _proto/, but the package imports .errors, .mutations and .providers and ships a py.typed marker, so an installed RPM could not import openshell. Install the missing files and add a %check that fails if any relative import in the installed package has no matching installed module. Importing the package needs grpcio, which the build environment lacks, so the check is static. Set License to the minimal SPDX expression covering every crate linked into the shipped binaries, keep the pure-Python subpackage at Apache-2.0, and note how the non-crate content is covered. Signed-off-by: politerealism <burdcat17@gmail.com>
politerealism
force-pushed
the
fix/3510-fedora-python-proto-stubs/politerealism
branch
from
October 13, 2026 14:14
bc4e246 to
dc7529f
Compare
2 of 37 tasks
politerealism
marked this pull request as ready for review
October 14, 2026 16:33
Collaborator
|
/ok to test dc7529f |
1 similar comment
Collaborator
|
/ok to test dc7529f |
TaylorMutch
approved these changes
Oct 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three fixes to the RPM spec and the proto stub generator, found while checking the Fedora packaging items in #3510 (items 2 and 5).
Related Issue
Contributes to #3510
Changes
tasks/scripts/generate_python_proto.py: new--no-pyioption. The default is unchanged. Fedora'sgrpcio-tools1.48.4 bundles protoc 3.19, which has no--pyi_out.openshell.spec: addpython3-googleapis-common-protos >= 1.63andpython3-httpx >= 0.27toRecommendsand to the dist-infoRequires-Dist. Both are inpyproject.toml; without the first,import openshellfails ongoogle.rpc.openshell.spec: installerrors.py,mutations.py,providers.pyandpy.typed.__init__.pyandsandbox.pyimport the first three, soimport openshellfrom an installed RPM failed withModuleNotFoundError.%checkonly readimportlib.metadata, so nothing caught it. A new%checkstep fails if any relative import in the installed package has no installed module. It is static because importing the package needs grpcio, which the build environment lacks.openshell.spec: setLicense:to the minimal SPDX expression covering the crates linked into the shipped binaries (Apache-2.0 AND BSD-3-Clause AND CC0-1.0 AND CDLA-Permissive-2.0 AND ISC AND MIT AND Unicode-3.0 AND Zlib), keep the Python subpackage atApache-2.0, and note how the non-crate content is covered.Testing
grpcio-tools1.48.4,protobuf3.19.6): the default arguments fail withprotoc-gen-pyi: Plugin failed; with--no-pyiall stubs generate andimport openshellsucceeds once the two packages are installed.mise run python:lintpasses (it regenerates the stubs with default arguments), andruff format --checkpasses on the script.%checkstep fails against the old install list and passes against the new one, run on a staged copy of the package.cargo treeforopenshell-cli,openshell-gatewayandopenshell-proveron x86_64 and aarch64 Linux (819 third-party crates, none without a license field).rpmbuildof the spec, the SDK against a live gateway on grpcio 1.48, EPEL 10, Rawhide, or stub generation inside%build.Checklist