Versions for Python packages.
See Version.
| Package | tests |
No package docstring; 3/3 modules documented |
| Module | update |
No module docstring; 0/2 constant, 2/4 functions documented |
| Module | _hatch |
Undocumented |
| Module | _version |
Provides Incremental version information. |
From __init__.py:
| Class | |
An encapsulation of a version for a project, with support for outputting PEP-440 compatible version strings. |
| Exception | |
Two versions could not be compared. |
| Function | get |
Get a friendly string for the given version object. |
| Class | _ |
Configuration loaded from a ``pyproject.toml`` file. |
| Class | _ |
An object that is bigger than all other objects. |
| Function | _cmp |
Compare two objects. |
| Function | _existing |
Load the current version from a ``_version.py`` file. |
| Function | _extract |
Undocumented |
| Function | _find |
Determine the package root directory. |
| Function | _get |
Distutils integration: get the version from the package listed in the Distribution. |
| Function | _get |
Setuptools integration: load the version from the working directory |
| Function | _load |
Load Incremental configuration from a ``pyproject.toml`` |
| Function | _load |
Read the content of a TOML file. |
| Variable | _inf |
Undocumented |
Compare two objects.
Returns a negative number if a < b, zero if they are equal, and a positive number if a > b.
Determine the package root directory.
The result is one of:
- src/{package}
- {package}
Where {package} is downcased.
Distutils integration: get the version from the package listed in the Distribution.
This function is invoked when a setup.py calls setup(use_incremental=True).
| See Also | |
| https://setuptools.pypa.io/en/latest/userguide/extension.html#adding-arguments |
Setuptools integration: load the version from the working directory
This function is registered as a setuptools.finalize_distribution_options entry point [1]. Consequently, it is called in all sorts of weird contexts. In setuptools, silent failure is the law.
[1]: https://setuptools.pypa.io/en/latest/userguide/extension.html#customizing-distribution-options
| Parameters | |
dist:_Distribution | A (possibly) empty setuptools.Distribution instance to mutate. There may be some metadata here if a `setup.py` called `setup()`, but this hook is always called before setuptools loads anything from ``pyproject.toml``. |
Load Incremental configuration from a ``pyproject.toml``
If the [tool.incremental] section is empty we take the project name from the [project] section. Otherwise we require only a name key specifying the project name. Other keys are forbidden to allow future extension and catch typos.
| Parameters | |
tomlstr | Path to the ``pyproject.toml`` to load. |
| Returns | |
_IncrementalConfig | Undocumented |