Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions changelog/69907.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Include PyYAML manylinux wheel in Linux onedir builds so ``yaml.CSafeLoader``
(and the libyaml-backed emitter) are available. Previously the ``--no-binary=:all:``
pip invocation forced a PyYAML source build under the relenv toolchain, which
lacks libyaml headers; PyYAML silently fell back to the pure-Python parser,
significantly slowing config, pillar, and state parsing on large deployments.
10 changes: 9 additions & 1 deletion tools/pkg/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -699,8 +699,16 @@ def onedir_dependencies(
env["RELENV_BUILDENV"] = "1"
python_bin = env_scripts_dir / "python3"
install_args.append("--no-binary=:all:")
# PyYAML's source build silently falls back to the pure-Python parser
# when libyaml headers are absent, and the relenv toolchain does not
# ship libyaml. That produces an onedir where yaml.CSafeLoader is
# missing, which makes salt fall back to the pure-Python SafeLoader
# and can slow config/pillar/state parsing by an order of magnitude
# on large deployments. The upstream PyYAML manylinux2014 wheel
# bundles libyaml (MIT-licensed) and is compatible with the relenv
# target platform, so allow it through --no-binary=:all: here.
install_args.append(
"--only-binary=maturin,apache-libcloud,pymssql,cassandra-driver,hatchling,cmake,ninja,protobuf"
"--only-binary=maturin,apache-libcloud,pymssql,cassandra-driver,hatchling,cmake,ninja,protobuf,pyyaml"
)
# CMake 4.x removed support for cmake_minimum_required(VERSION < 3.5).
# pyzmq's bundled libzmq still declares an older floor; set the policy
Expand Down
Loading