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

Plugin is not importable #38

Closed
Gullumluvl opened this issue Apr 12, 2024 · 8 comments
Closed

Plugin is not importable #38

Gullumluvl opened this issue Apr 12, 2024 · 8 comments

Comments

@Gullumluvl
Copy link

Hi all,

I am on Ubuntu 22.04 with Python 3.10 and Pip 24.0 and I have installed pelican-linkclass (python3 -m pip install --user pelican-linkclass) but it is not importable.

In an interpreter, this causes an ImportError:

from pelican.plugins import linkclass

whereas it works for the plugin search for example.

The distribution info of the plugin is sitting in ~/.local/lib/python3.10/site-packages with name pelican_linkclass-2.1.3.dist-info alongside other namespace plugins such as search and similar-posts which can be imported normally.
However, contrary to these other plugins, it is not present in the subdirectory pelican/plugins/. Accordingly, when running pelican -D, we see that it does not discover it in the namespace plugins.

What's causing this? One difference I see is that packaging was done with pdm for linkclass, whereas other plugins were packaged with poetry.

At the moment I have to clone this repository and manually copy the proper folder into the pelican installation to make it work.

Thanks a lot for your help.

@justinmayer
Copy link
Collaborator

Thanks for reporting this. I just submitted PR #39, which I believe should address this problem.

Perhaps you could clone that PR's branch, create a new virtual environment, run pip install build && python -m build && pip install markdown dist/pelican_linkclass-2.1.3.tar.gz, and see if that addresses the problem in your environment?

@rlaboiss
Copy link
Collaborator

Thanks for your PR #39, Justin. I merged it and released version 2.1.4 of the plugin. I am hereby closing this issue.

The other plugins that I maintain (avatar, graphviz, and markdown-include) are affected by the same problem. I will fix them ASAP.

@justinmayer
Copy link
Collaborator

justinmayer commented Apr 14, 2024 via email

@rlaboiss
Copy link
Collaborator

I checked the new sdist tarballs at PyPI for the plugins avatar, graphviz, linkclass, and markdown-include. None of them contains a RELEASE.md file.

May I ask why you think that there could be a RELEASE.md file in the build assets?

@Gullumluvl
Copy link
Author

Hi @justinmayer and @rlaboiss ,
sorry for the delayed answer, the updated package is now properly installed :)
Many thanks!

@justinmayer
Copy link
Collaborator

justinmayer commented Apr 14, 2024 via email

@rlaboiss
Copy link
Collaborator

rlaboiss commented Apr 14, 2024

Because I once saw one in the tarball that appears in the GitHub releases list.

Oh, I see. Since the tarballs are generated by autopub, I suppose that this tool is doing its job correctly.

@rlaboiss
Copy link
Collaborator

Hi @justinmayer and @rlaboiss , sorry for the delayed answer, the updated package is now properly installed :) Many thanks!

You are welcome. I apologize for any inconvenience that the previous broken version has caused to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants