admin管理员组文章数量:1289845
My distribution project is managed with git, The last tag is 0.1.2.dev1
. I use PDM (). The relevant snipped in pyproject.toml
is:
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[tool.pdm]
distribution = true
version = {source = "scm", write_to = "ff_testpkg/version.py", write_template = "__version__ = '{}'" }
On pdm build
:
pdm build
Building sdist...
Built sdist at C:/dev/pylib/ff-testpkg/dist\ff-testpkg-0.1.2.dev1+d20250221.tar.gz
Building wheel from sdist...
Built wheel at C:/dev/pylib/ff-testpkg/dist\ff-testpkg-0.1.2.dev1+d20250221-py3-none-any.whl
I see the same auto-generated version number in version.py
:
__version__ = '0.1.2.dev1+d20250221'
On pdm publish
, I get this error:
400 The use of local versions in <Version('0.1.2.dev1+d20250221')> is not allowed. See for more information.
How do I make pdm not inject the +d=date= local versioning?
Edit: I read , it says local versions must comply with <public version identifier>[+<local version label>]
, but after a paragraph it says: "local version labels MUST be limited to the following set of permitted characters: ASCII letters ([a-zA-Z]), ASCII digits ([0-9]), periods (.)". This means 0.1.2.dev1+d20250221
should be allowed, right?
本文标签: python39pdm build39 adds date to scm version numberTestPyPI rejects itStack Overflow
版权声明:本文标题:python - 'pdm build' adds date to scm version number, TestPyPI rejects it - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741398142a2376499.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论