|
| 1 | +# Glossary |
| 2 | + |
| 3 | +Reference for terminology used throughout fromager documentation. |
| 4 | + |
| 5 | +## Package Formats |
| 6 | + |
| 7 | +**sdist (Source Distribution)** is an archive containing Python source code, |
| 8 | +typically a `.tar.gz` file. It must be compiled to be installed. |
| 9 | + |
| 10 | +**wheel** is a pre-built binary distribution (`.whl` file) that can be |
| 11 | +installed directly without compilation. |
| 12 | + |
| 13 | +## Package Naming |
| 14 | + |
| 15 | +**canonical name** is the normalized form of a package name following Python |
| 16 | +packaging standards. It's lowercase with hyphens, so `My-Package` becomes |
| 17 | +`my-package`. |
| 18 | + |
| 19 | +**override name** is the module-safe version used for settings files and |
| 20 | +plugins. Hyphens become underscores, so `my-package` becomes `my_package`. |
| 21 | + |
| 22 | +## Dependency Types |
| 23 | + |
| 24 | +**build-system dependencies** are the minimal tools needed to understand how |
| 25 | +to build a package. These are specified in `[build-system] requires` in |
| 26 | +`pyproject.toml`. Examples include `setuptools`, `hatchling`, and `flit-core`. |
| 27 | + |
| 28 | +**build-backend dependencies** are additional dependencies discovered by |
| 29 | +calling the build backend's `get_requires_for_build_wheel()` hook. For example, |
| 30 | +a package with Cython extensions might need `cython`. |
| 31 | + |
| 32 | +**build-sdist dependencies** are dependencies specifically needed for creating |
| 33 | +source distributions, returned by `get_requires_for_build_sdist()`. |
| 34 | + |
| 35 | +**install dependencies** are packages needed when using the built package. |
| 36 | +They come from `Requires-Dist` in the wheel metadata. |
| 37 | + |
| 38 | +**top-level dependencies** are the requirements you specify directly in your |
| 39 | +`requirements.txt`, as opposed to dependencies discovered through resolution. |
| 40 | + |
| 41 | +## Requirements vs Constraints |
| 42 | + |
| 43 | +**requirement** specifies a package you want to build. It can include version |
| 44 | +constraints like `requests>=2.25.0`. |
| 45 | + |
| 46 | +**constraint** limits which version is selected during resolution without |
| 47 | +requesting the package directly. Constraints are useful for resolving conflicts |
| 48 | +or pinning transitive dependencies. |
| 49 | + |
| 50 | +A common pattern is to separate them: |
| 51 | + |
| 52 | +```text |
| 53 | +# requirements.txt - what you want to build |
| 54 | +requests |
| 55 | +flask |
| 56 | +
|
| 57 | +# constraints.txt - version limits for everything |
| 58 | +requests>=2.25.0 |
| 59 | +urllib3==2.2.3 |
| 60 | +``` |
| 61 | + |
| 62 | +## Build Concepts |
| 63 | + |
| 64 | +**bootstrap** is the recursive process of building a package and all its |
| 65 | +dependencies from source. Fromager figures out the correct build order |
| 66 | +automatically. |
| 67 | + |
| 68 | +**build order** is the sequence in which packages must be built. It's a |
| 69 | +topological sort of the dependency graph, so each package's dependencies |
| 70 | +are built before the package itself. |
| 71 | + |
| 72 | +**variant** is a named build configuration for different scenarios like |
| 73 | +`cpu`, `gpu`, or `cuda`. Variants control environment variables and settings |
| 74 | +on a per-package basis. |
| 75 | + |
| 76 | +**resolver** is the component that determines which version of a package |
| 77 | +to use based on requirements and constraints. |
| 78 | + |
| 79 | +## Customization |
| 80 | + |
| 81 | +**override** provides package-specific custom behavior, such as a custom |
| 82 | +source URL or build commands. |
| 83 | + |
| 84 | +**hook** is an extension point for cross-cutting concerns like post-build |
| 85 | +actions. Multiple plugins can handle the same hook. |
| 86 | + |
| 87 | +**patch** is a file containing source code modifications applied before |
| 88 | +building. Patches are placed in `overrides/patches/<package_name>/`. |
| 89 | + |
| 90 | +**settings file** is a YAML configuration for package-specific build behavior, |
| 91 | +located in `overrides/settings/<package_name>.yaml`. |
| 92 | + |
| 93 | +## Build Isolation |
| 94 | + |
| 95 | +**network isolation** means running builds without network access, using Linux |
| 96 | +namespaces. This ensures builds use only local or vendored dependencies. |
| 97 | + |
| 98 | +**build isolation** means each package builds in its own virtual environment |
| 99 | +to prevent interference between packages. |
| 100 | + |
| 101 | +**vendoring** means including dependencies within a package's source for |
| 102 | +offline builds. This is common for Rust dependencies in Python packages. |
| 103 | + |
| 104 | +## Version Terms |
| 105 | + |
| 106 | +**pre-release** refers to development versions like `1.0.0a1` or `1.0.0rc1`. |
| 107 | +These are not selected by default unless explicitly requested. |
| 108 | + |
| 109 | +**specifier** is the version range part of a requirement, like `>=1.0,<2.0`. |
| 110 | + |
| 111 | +## See Also |
| 112 | + |
| 113 | +For detailed explanation of output directories and files, see [files](files.md). |
| 114 | + |
| 115 | +For how to use settings, patches, and variants, see [customization](customization.md). |
| 116 | + |
| 117 | +For technical details of the bootstrap process, see [using](using.md). |
0 commit comments