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

Bug with new 2.14 version - install plugin in editable mode & from local path #2820

Closed
1 task done
ariadnafe opened this issue Apr 15, 2024 · 7 comments · Fixed by #2826
Closed
1 task done

Bug with new 2.14 version - install plugin in editable mode & from local path #2820

ariadnafe opened this issue Apr 15, 2024 · 7 comments · Fixed by #2826
Assignees
Labels
🐛 bug Something isn't working

Comments

@ariadnafe
Copy link

ariadnafe commented Apr 15, 2024

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

Actual behavior

I have recently upgraded the PDM version from 2.13.2 to 2.14 and I have a bug.

Since the new 2.14 version, it is not possible to install plugins using local paths and editable mode. In the past, we could install our plugins by using our local path in editable mode. Using this syntax in our pyproject.toml files:

[tool.pdm]
plugins = ["-e /local/path/projects/plugins"]

And then, by doing pdm install --plugins we could easily install our plugin without having to build it. However, since the last release, we get the following error when trying to install it:

ERROR: Failed to load plugin myplugin_pdm_plugin=pdm_myplugin.plugin:main: No module named 'myplugin'

In the previous versions we could use this functionality, that now it is not working. Could you please clarify what happened with this functionality?

@ariadnafe ariadnafe added the 🐛 bug Something isn't working label Apr 15, 2024
@ariadnafe ariadnafe changed the title Bug with new 2.14 version -- install plugin in editable mode & from local path Bug with new 2.14 version - install plugin in editable mode & from local path Apr 15, 2024
@noirbizarre
Copy link
Member

According to documentation, you miss the file:// prefix and it should be:

[tool.pdm]
plugins = [
    "-e file:///local/path/projects/plugins",
]

Can you try with it ?

@ariadnafe
Copy link
Author

ariadnafe commented Apr 17, 2024

It is still not working sorry, I get the same error:

pdm install --plugin
ERROR: Failed to load plugin myplugin_pdm_plugin=pdm_myplugin.plugin:main: No module named 'pdm_myplugin'
Plugins are installed successfully into .pdm-plugins.

@ariadnafe ariadnafe reopened this Apr 17, 2024
@prudnikov
Copy link

prudnikov commented Apr 17, 2024

We've got the same errorwith pdm 2.14.0. We rolled pdm back to 2.13.2 and it works.
We use it like this

plugins = [
    "-e file:///${PROJECT_ROOT}/../../plugins/pdm-publish-build"
]

@frostming frostming self-assigned this Apr 17, 2024
frostming added a commit that referenced this issue Apr 17, 2024
Fixes #2820

Signed-off-by: Frost Ming <me@frostming.com>
frostming added a commit that referenced this issue Apr 17, 2024
@ariadnafe
Copy link
Author

Hello, thank you for your fix. However for us is still failing

@frostming
Copy link
Collaborator

Hello, thank you for your fix. However for us is still failing

remove the .pdm-plugins directory and try again with the main branch

@ariadnafe
Copy link
Author

ariadnafe commented Apr 17, 2024

Yes yes, of course I did it. I event created a new fresh virtual machine and did everything from scratch, and still the same error, same with other colleagues...

@frostming
Copy link
Collaborator

did you get a chance to check the files installed under pdm-plugins site-packages? especially check if the .pth files are installed correctly

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

Successfully merging a pull request may close this issue.

4 participants