This is a small, focused package that provides conditional script installation for scikit-build-core projects. Changes should be rare and carefully considered.
Keep it simple. This provider does exactly one thing: merge base scripts with conditional scripts based on environment variable checks. Any feature requests should be evaluated against this core purpose.
# Clone the repository
git clone https://github.com/adobe-type-tools/afdko.git
cd afdko/_build_helpers
# Install in development mode
pip install -e .
# Run tests (if any are added)
pytestThe provider is intentionally minimal (~70 lines including docs). Consider:
- Is this change necessary? Can it be handled in the project's config instead?
- Does it maintain backward compatibility? Existing users shouldn't break.
- Is it generic? Don't add project-specific logic.
Update the following files:
README.md- User-facing documentation__init__.py- Docstrings and examplesDEPLOYMENT.md- If deployment process changes
Test with a real scikit-build-core project (like AFDKO):
# Test default behavior
cd ../../ # Back to AFDKO root
pip install --no-build-isolation .
# Verify scripts installed correctly
# Test conditional behavior
AFDKO_COMMAND_USE_WRAPPER=ON pip install --no-build-isolation --force-reinstall .
# Verify conditional scripts installedConsider adding:
- Unit tests for
dynamic_metadata()function - Integration tests with a minimal scikit-build-core project
- Tests for edge cases (missing config, invalid env vars, etc.)
Use semantic versioning:
- 1.x.x - Current stable version
- Patch (1.0.x) - Bug fixes, documentation
- Minor (1.x.0) - Backward-compatible features
- Major (x.0.0) - Breaking changes (rare)
- Update version in
pyproject.toml - Update
CHANGELOG.md(if we create one) - Commit:
git commit -m "Release vX.Y.Z" - Tag:
git tag -a vX.Y.Z -m "Version X.Y.Z" - Build:
python -m build - Test: Install from wheel and verify
- Publish:
python -m twine upload dist/* - Push:
git push && git push --tags
- Follow PEP 8
- Maximum line length: 88 characters (Black default)
- Use type hints for function signatures
- Keep functions small and focused
- Document with clear docstrings
Ideas that might be worth discussing:
- Multiple conditions: AND/OR logic for env vars
- Platform conditionals: Different scripts per OS
- Config file support: Read conditions from a file
- Logging: Debug output for troubleshooting
- Validation: Check that entry points are valid format
All of these should be opt-in and maintain backward compatibility.
This package is maintained as part of AFDKO. For questions or issues:
- Open an issue on the AFDKO repository
- Include "skbuild-conditional-scripts" in the title
- Provide minimal reproduction case
Apache License 2.0 - same as AFDKO