Get infer version¶
In pyproject.toml
, configure the plugin manager to execute the build plugins.
[project.entry-points."setuptools.finalize_distribution_options"]
drain_swamp = "drain_swamp.monkey.wrap_infer_version:infer_version"
See also
Note
research notes
These notes lead up to the config_settings UX issue
Command and sub-command classes https://setuptools.pypa.io/en/latest/userguide/extension.html#customizing-commands
https://github.com/pypa/setuptools_scm/blob/main/src/setuptools_scm/_integration/setuptools.py
https://github.com/pypa/setuptools_scm/blob/main/src/setuptools_scm/_config.py
https://github.com/pypa/setuptools_scm/blob/main/src/setuptools_scm/_get_version_impl.py
https://github.com/pypa/setuptools/issues/2491
https://github.com/pypa/setuptools/discussions/4083
https://github.com/pypa/setuptools/issues/3896#issuecomment-1656714771
SOLUTIONS
setuptools_scm._integration.setuptools.infer_version
_config.Configuration.from_file
_assign_version
- drain_swamp.monkey.wrap_infer_version.run_build_plugins(d_config_settings)¶
Run build plugins. The plugins are responsible for user input validation and choosing which user input is of interest
- Parameters:
d_config_settings¶ (collections.abc.Mapping[str, Any]) – config settings dict. What normally would be supplied as
python -m build
config setting cli options