shyamd / mkdocs-bibtex

A MkDocs plugin for citation management using bibtex
Other
79 stars 21 forks source link

Missing dependency `pkg_resources` #160

Closed matteosantama closed 1 year ago

matteosantama commented 1 year ago

The library depends on pkg_resources but it is not listed in requirements.txt so after pip install mkdocs-bibtex I'm getting

import mkdocs_bibtex

File ~/Library/Caches/pypoetry/virtualenvs/mfglib-SRAM7qJs-py3.9/lib/python3.9/site-packages/mkdocs_bibtex/__init__.py:1
----> 1 from pkg_resources import DistributionNotFound, get_distribution
      3 from mkdocs_bibtex.plugin import BibTexPlugin
      5 try:

ModuleNotFoundError: No module named 'pkg_resources'
matteosantama commented 1 year ago

Ah, it's not pkg_resources that's actually missing -- it's setuptools. After pip install setuptools it works.

shyamd commented 1 year ago

Oh! This is quite the interesting development. I'm assuming you're using this in a package where you use poetry instead of setuptools?

matteosantama commented 1 year ago

Yes, that’s right!

Get Outlook for iOShttps://aka.ms/o0ukef


From: Shyam Dwaraknath @.> Sent: Monday, January 2, 2023 6:23:49 PM To: shyamd/mkdocs-bibtex @.> Cc: Matteo Santamaria @.>; Author @.> Subject: Re: [shyamd/mkdocs-bibtex] Missing dependency pkg_resources (Issue #160)

Oh! This is quite the interesting development. I'm assuming you're using this in a package where you use poetry instead of setuptools?

— Reply to this email directly, view it on GitHubhttps://github.com/shyamd/mkdocs-bibtex/issues/160#issuecomment-1369268712, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADGZPGDTM3BAK2Y7SZ7VUZTWQNPQLANCNFSM6AAAAAATMO6UVY. You are receiving this because you authored the thread.Message ID: @.***>

shyamd commented 1 year ago

Ok, I know the issue. Its odd, but i can fix it. Let me do some repository cleanup and i'll take care of this issue.

shyamd commented 1 year ago

The latest release: v2.8.6 should fix this. Let me know if you're still having issues. I only tried a simple dummy poetry package and I might have gotten it wrong.

shyamd commented 1 year ago

Correction, it turned out to be v2.8.8 due to some hiccups fixing GH actions.

matteosantama commented 1 year ago

Hi @shyamd, thanks for looking into this. Unfortunately I am still running into the error with v2.8.8.

When I add an explicit setuptools = "^65.6.3" dependency, mkdocs serve runs fine.

matteosantama commented 1 year ago

I would think in setup.py you need to add setuptools here (although admittedly I am not very familiar with using a setup.py file for manually building packages).