sphinx-wagtail-theme icon indicating copy to clipboard operation
sphinx-wagtail-theme copied to clipboard

Projects using `sphinx_wagtail_theme` are not picking up the dependency for `sphinx_copybutton`

Open lb- opened this issue 3 years ago • 3 comments

I would have expected that installing sphinx_wagtail_theme would also ensure that sphinx_copybutton is made available, but this seems to wrong.

When using this theme in Wagtail, we have to explicitly add sphinx_copybutton, it would be good if we did not have to do that. Unless it is kind of expected that this would be required manually.

Expected solution

  1. Add docs to this project to ensure that sphinx_copybutton is added by those using this theme
  2. Explore/add whatever config 'magic' is needed to make this work automatically.

See original comment

(Regarding why it isn't picking up the dependency in sphinx_wagtail_theme - is that actually defined anywhere other than requirements.txt? That won't get picked up when packaging sphinx_wagtail_theme for pypi, unless there's some config magic I'm unaware of...)

Originally posted by @gasman in https://github.com/wagtail/wagtail/issues/9339#issuecomment-1279132947

Relates to

  • https://github.com/wagtail/sphinx_wagtail_theme/pull/219
  • https://github.com/wagtail/sphinx_wagtail_theme/issues/45
  • https://github.com/wagtail/wagtail/pull/9339

lb- avatar Oct 14 '22 23:10 lb-

Note: I am new to package management in Python land so this could possibly be a complete confusion on my part about Python vs NPM package nested dependencies.

lb- avatar Oct 14 '22 23:10 lb-

This is strange because sphinx_copybutton is also listed on the requirements.txt file.

Can I be of any help here?

mohammadareeb95 avatar Oct 24 '22 12:10 mohammadareeb95

@mohammadareeb95 As mentioned in my comment quoted above - I'm pretty sure that putting it in requirements.txt is not enough for it to be handled automatically as a dependency when installing the package. requirements.txt is just a convenience for people setting up the package manually. To be a proper dependency, it needs to be defined in setup.py (at least, when using the traditional setuptools - for alternatives like flit it might be different).

gasman avatar Oct 26 '22 09:10 gasman