When I run python -m build
, the tar
and whl
files that are created use the wrong version of my package in the filenames.
Here is my 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}"
The files created by build
are named stockpyl-0.0.0.tar.gz
and stockpyl-0.0.0-py3-none-any.whl
. I assumed that build
would grab the version number (0.0.1) from setup.cfg
but it doesn't seem to be. Where does it get the version number from? How do I tell it to use the current version?
Fixed by adding
version = 0.0.1
under [metadata]
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.