Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct version no longer printed for dynamic versions (from file) #1775

Closed
1 task done
mfeteanu-cais opened this issue Mar 20, 2023 · 3 comments
Closed
1 task done
Labels
🐛 bug Something isn't working

Comments

@mfeteanu-cais
Copy link

  • I have searched the issue tracker and believe that this is not a duplicate.

I believe this was broken by this PR: #1740
Specifically this line: https://github.com/pdm-project/pdm/pull/1740/files#diff-9b11b79e096e6e61fe0c411ad17368e505cef292ce2606b1064255331effaa52R61

Steps to reproduce

In pyproject.toml:


[tool.pdm]
version = { source = "file", path = "myproject/__version__.py" }

[build-system]
requires = ["pdm-pep517>=1.0.0"]
build-backend = "pdm.pep517.api"
pdm show --version

Actual behavior

It prints:

DYNAMYC

Expected behavior

It prints

1.2.3

Or whatever is in myproject/version.py

Environment Information

PDM version:
  2.4.9
Python Interpreter:
..../python (3.10)
Project Root:
....
Project Packages:
  None
{
  "implementation_name": "cpython",
  "implementation_version": "3.10.5",
  "os_name": "posix",
  "platform_machine": "arm64",
  "platform_release": "22.3.0",
  "platform_system": "Darwin",
  "platform_version": "Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000",
  "python_full_version": "3.10.5",
  "platform_python_implementation": "CPython",
  "python_version": "3.10",
  "sys_platform": "darwin"
}

@mfeteanu-cais mfeteanu-cais added the 🐛 bug Something isn't working label Mar 20, 2023
@edsq
Copy link

edsq commented Mar 21, 2023

Is this a duplicate of #1753? The solution found there was to run pdm show --version <package name>.

@mfeteanu-cais
Copy link
Author

This is a duplicate, yes. I am closing this then. However, will this eventually be fixed to work just with pdm show --version. It seems like printing DYNAMIC is almost never the correct behaviour.

@mfeteanu-cais
Copy link
Author

duplicate of #1753

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants