Simple Python build backend for large codebases
Maintained. Last release 11 months ago, commits in 0 of the last 26 weeks. Weaker on commit activity and contributor spread.
pip install flexbuildREADME as published on PyPI with version 0.2.2.
🧱 Flexbuild
Simple Python build backend for large codebases.
Add to your pyproject.toml:
[build-system]
requires = ["flexbuild"]
build-backend = "flexbuild"
Features
- 🤸 Flexible source layouts: Place code directly alongside
pyproject.tomlor in a subfolder likesrc/module. - 🏷️ Virtual namespaces: Define namespace modules like
org.department.packagewithout nested folders. - 🏗️ Monorepo support: Handle hierarchies of hundreds of packages with minimal boilerplate.
- 📝 Rich metadata: Entry points, optional dependencies, author and maintainer list, license, and more.
- 🤝 Ecosystem integration: Integrates seamlessly with packaging tools like
uvandpip. - 🐣 Hackable: Under 500 lines of easy-to-read Python code with extensive test coverage.
Options
[build-system]
requires = ["flexbuild"]
build-backend = "flexbuild"
module-folder = "."
include = [
'*.py',
'pyproject.toml',
'README.md',
'README.rst',
]
exclude = [
'dist',
'build',
'__pycache__',
'.*',
'*/.*',
'*.pyc',
]
Monorepos
Flexbuild supports large repositories that contain hundreds of packages with minimal boilerplate. For example, packages can be organized into a folder hierarchy:
repo
org
department1
package1
pypackage.toml # project.name = "org.department1.package2"
__init__.py # import org.department1.package1
README.md
code.py
package2
pypackage.toml
__init__.py
...
package3
department2
package1
package2
package3
Optionally, create a file repo/pyroot.toml. This enables checks that package
namespaces match the folder hierarchy. It also allows specifying
[build-system] defaults that nested pyproject.toml files inherit.