【问题标题】:Sphinx does not change version numberSphinx 不会更改版本号
【发布时间】:2014-05-05 10:15:20
【问题描述】:

我在conf.py中更改了我的项目的版本号:

version = '0.0.2'

但是当我生成一个新的html(make html)时,版本总是:0.0.1。

有什么建议吗?

【问题讨论】:

    标签: python versioning python-sphinx


    【解决方案1】:

    只是为了加入讨论。您可以简化您的工作流程,如果您的版本通常与发行版相同,您可以这样说:

    # The short X.Y version.
    version = '0.0.1'
    # The full version, including alpha/beta/rc tags.
    release = version
    

    那么您只需要更改第一个值。

    【讨论】:

      【解决方案2】:

      您应该必须更新 conf.py 中的 release = ''。版本是内部的短 x.y 版本。 Release 是在 sphinx 构建过程中添加到项目的完整版本。

      在您的 conf.py 中更改即可。

      # The full version, including alpha/beta/rc tags.
      release = '0.0.2'
      

      然后重新运行make html。

      【讨论】:

        猜你喜欢
        • 2018-01-17
        • 1970-01-01
        • 2014-02-04
        • 1970-01-01
        • 1970-01-01
        • 2011-03-19
        • 2016-11-14
        • 2013-11-07
        • 1970-01-01
        相关资源
        最近更新 更多