当 setuptools_scm 可用时是否需要 bumpversion(或 bump2version)?

Is there a need for bumpversion (or bump2version) when setuptools_scm is available?

TLDR;

题目如题

撞还是不撞?

我开始使用 bump2version 然后发现 setuptools_scm(对于开发成熟的 python 程序来说还很陌生)现在我很困惑。

https://setuptools.readthedocs.io/en/latest/history.html#v20-6-0(古老,我知道,我使用 v40-x-x)提到了 bumpversion 的集成,但是,在后续的变更日志中没有提到对 bumpversion 的支持。

同时,setuptools 文档的 1.4 Extending and Reusing Setuptools 部分提到 setuptools_scm(和 setuptools_svn)用于与 git、Hg 和 svn 集成。

BLAB(底部底线)

所以,问题是:bumpversion deprecated/obsolete?


附录

为了进一步说明,我将尝试更多地解释我的用例

我有一个包含多个子项目的超级项目。

super
├───base/
├───core/
├───lib/
├───version/requirements.txt
└───modules/
    ├───module-1/
    ├───module-2/
    ├───module-3/
    ├───module-4/
    └───module-5/

超级大师git,每个子项目都是一个子模块(有自己的子模块),当然,每个子项目都维护自己的发布版本(这很容易)

该项目的一个版本由已签署的模块组成,这些模块与其他所有模块相互兼容。

我目前的做法

我目前正在使用一个名为 version 的子模块,它维护着一个 requirements.txt + pyproject.toml 并将整个东西整合到一个可分发的包中。遵循 https://github.com/pypa/pipfile/issues/27 and somewhat pulling from https://caremad.io/posts/2013/07/setup-vs-requirement/

中的指南

问题仍然存在:是否有规范的方法来做这样的事情?

如果您使用 setuptools_scm,您可能不需要 bump2version。反之亦然。

在 Python 中没有 'canonical' 升级版本的方法。存在多种工具,您可以使用自己喜欢的工具(或 none)。

setuptools 变更日志中的消息是关于设置工具作者在他们自己的Git 存储库 中使用的内容。他们仍然使用 bump2version,如 this config file.

所示

项目 setuptools_scmsetuptools 名称相似但完全独立。