Skip to content

2.25: local library, Invalid version: 'None' #3545

@h0nIg

Description

@h0nIg

Describe the bug

pdm fails to add a local library with setup.py / pyproject.toml

To reproduce

+ pdm add -d ./library/python/xxxx
Adding packages to dev dev-dependencies: xxxx @ file:///${PROJECT_ROOT}/library/python/xxxx
  0:01:13 🔒 Lock successful.  
See /github/home/.local/state/pdm/log/pdm-lock-d4tt4em1.log for detailed debug log.
[RequirementError]: Invalid version for xxxx @ file:///${PROJECT_ROOT}/library/python/xxxx: Invalid version: 'None'

Expected Behavior

success

Environment Information

pyproject.toml

[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"


[tool.pdm]
distribution = true

[tool.pdm.options]
lock = ["--implementation=cpython"]

[project]
name = "yyyy"
version = "1.0"

requires-python = ">=3.12"

dependencies = [
    "xxxx @ file:///${PROJECT_ROOT}/library/python/xxxx",
]
[dependency-groups]
dev = [
    "xxxx @ file:///${PROJECT_ROOT}/library/python/xxxx",
]

Verbose Command Output

No response

Additional Context

No response

Are you willing to submit a PR to fix this bug?

  • Yes, I would like to submit a PR.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions