Skip to content

Fix linux requirements when pip installing#68779

Open
dwoz wants to merge 15 commits intosaltstack:3006.xfrom
dwoz:fix-pip-install-metadata
Open

Fix linux requirements when pip installing#68779
dwoz wants to merge 15 commits intosaltstack:3006.xfrom
dwoz:fix-pip-install-metadata

Conversation

@dwoz
Copy link
Contributor

@dwoz dwoz commented Mar 4, 2026

What does this PR do?

What issues does this PR fix or reference?

Fixes

Previous Behavior

Remove this section if not relevant

New Behavior

Remove this section if not relevant

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes/No

@dwoz dwoz requested a review from a team as a code owner March 4, 2026 05:44
@dwoz dwoz added the test:full Run the full test suite label Mar 4, 2026
@dwoz dwoz force-pushed the fix-pip-install-metadata branch from dcd3bcf to 285cf83 Compare March 4, 2026 05:53
This change moves core metadata to the [project] table in pyproject.toml, cleans up requirement files for PEP 517 compatibility, ensures dependencies are dynamically discovered from .txt files, updates static requirement files via pre-commit hooks, and inhibits automatic code rewriting hooks to maintain scope.
The documentation build needs all Salt dependencies to correctly import
modules for autodoc. Adding requirements/crypto.txt ensures that
cryptographic dependencies (like pycryptodomex) are available.
dwoz added 12 commits March 4, 2026 01:32
Update *-crypto.txt files across all platforms and Python versions to
ensure version consistency and resolve pre-commit hook discrepancies.
Synchronize with CI environment by applying formatting changes made by
the black pre-commit hook.
Include base.txt and zeromq.txt in the Windows packaging requirement
compilation hooks. This ensures that the static windows.txt requirement
files contain all necessary dependencies for onedir builds, resolving
failures in install_salt.ps1.
The myst-parser requirement for documentation builds on Python 3.9
requires mdit-py-plugins which in turn requires markdown-it-py < 3.0.0.
Other packages like rich were pulling in markdown-it-py >= 3.0.0 on
some platforms, causing resolution failures.

This commit adds a Python version-specific constraint and regenerates
the affected static requirement files.
…ures

Move Salt's dynamic metadata and dependency logic from setup.py to a custom PEP 517 build backend (tools/pkg/salt_build_backend.py). This modernizes the build system while preserving Salt's complex multi-platform requirement selection logic.

Fix installation failures in compiler-less environments by moving timelib and linode-python out of core base requirements. These packages require compilation on Linux and are now only included in packaging-specific static requirement sets where pre-built wheels are verified.

Key changes:
- Implement tools/pkg/salt_build_backend.py to handle dynamic versioning, requirements, and entry points.
- Refactor setup.py to delegate dynamic properties to the new backend.
- Move timelib and linode-python from requirements/base.txt to platform-specific .in files in requirements/static/pkg/.
- Restore pycryptodomex>=3.9.8 as a core base requirement.
- Fully regenerate all static packaging pins for Python 3.9-3.13.
- Update tests/pytests/functional/test_pip_install.py to skip on Linux systems without a C compiler.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:full Run the full test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant