[英]Python build puts wrong version number in filenames
當我運行python -m build
時,創建的tar
和whl
文件在文件名中使用了我的包的錯誤版本。
這是我的setup.cfg
:
[metadata]
# This is required for any package to install with a name
name = stockpyl
# Since we are using a "src" layout, we need the following:
[options]
package_dir=
=src
packages=find:
[options.packages.find]
where=src
[bumpver]
current_version = "0.0.1"
version_pattern = "MAJOR.MINOR.PATCH"
commit_message = "bump version {old_version} -> {new_version}"
commit = True
tag = True
push = False
[bumpver:file_patterns]
setup.cfg =
current_version = "{version}"
build
創建的文件名為stockpyl-0.0.0.tar.gz
和stockpyl-0.0.0-py3-none-any.whl
。 我假設build
會從setup.cfg
中獲取版本號(0.0.1),但似乎不是。 它從哪里獲得版本號? 我如何告訴它使用當前版本?
通過添加修復
version = 0.0.1
在[metadata]
下。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.