Skip to content

Build Python requirements from source on s390x build nodes - #43

Merged
anfimovdm merged 1 commit into
masterfrom
al-s390x-build-deps
Oct 26, 2026
Merged

anfimovdm merged 1 commit into
masterfrom
al-s390x-build-deps

Conversation

@anfimovdm

Copy link
Copy Markdown
Contributor

Summary

grpcio (and some other albs-node requirements) has no prebuilt s390x wheels, so fresh s390x build nodes (e.g. albs-s3-builder-alma-06/07) compile it on the node. With grpcio pinned to 1.58.0 (AlmaLinux/albs-node#224) this failed in several ways; this PR makes the separate_build_node role handle it. All changes apply only when ansible_facts['architecture'] == 's390x'; other arches are unchanged.

Changes

  • defaults/main/dnf.yml, tasks/dnf.yml: install c-ares-devel, openssl-devel, zlib-devel (CRB enabled) so grpcio builds against system libraries
  • defaults/main/common.yml, tasks/create_env.yml:
    • install setuptools>=61,<81, cython<3, wheel into the venv before requirements
      • <81: grpcio 1.58 setup.py imports pkg_resources, removed in setuptools 81
      • >=61: git deps (albs-build-lib, albs-common-lib) use PEP 621 [project] metadata; the system setuptools 53 visible via --system-site-packages otherwise satisfies the pin and yields name unknown
    • install requirements with --no-build-isolation (isolated builds pull the latest setuptools) and GRPC_PYTHON_BUILD_SYSTEM_{OPENSSL,ZLIB,CARES}=1, GRPC_PYTHON_BUILD_EXT_COMPILER_JOBS=1

Testing

  • The equivalent manual pip install --no-build-isolation with these env vars built grpcio 1.58.0 on alma-07
  • Not yet linted or run via the playbook; to verify: run the playbook with --tags update-env against an s390x node (also needs Add cachetools to requirements albs-node#225 for cachetools)

🤖 Generated with Claude Code

grpcio and other requirements have no prebuilt s390x wheels, so they
are compiled on the node:
- install c-ares, openssl and zlib devel packages and build grpcio
  against the system libraries instead of the bundled ones
- install setuptools>=61,<81, cython<3 and wheel into the venv and
  install requirements with --no-build-isolation: grpcio 1.58 needs
  pkg_resources (removed in setuptools 81), git deps with PEP 621
  metadata need setuptools>=61
- limit grpcio compile jobs to 1
@anfimovdm
anfimovdm merged commit 45133df into master Oct 26, 2026
1 check failed
@anfimovdm
anfimovdm deleted the al-s390x-build-deps branch October 26, 2026 19:17
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