tldr-pages/tldr-python-client

3.4.0 installs .doctrees files in manpage dir

Closed this issue · 3 comments

When building using python-build/python-install and sphinx on Arch I'm seeing the following files being shoved into places they shouldn't be!:

  • usr/share/man/man1/.doctrees/
  • usr/share/man/man1/.doctrees/environment.pickle.gz
  • usr/share/man/man1/.doctrees/index.doctree.gz

Hi, can you provide the exact build steps/commands you tried in your side (or PKGBUILD file if you have one), the .doctrees files would get ignored due to https://github.com/tldr-pages/tldr-python-client/blob/main/docs/.gitignore.

So the final package definitely wouldn't generate or place anything other than the .1 man page file in the man/man1 directory. (Feel free to check our PyPI source distribution for reference: https://pypi.org/project/tldr/#files and also our publish workflow https://github.com/tldr-pages/tldr-python-client/blob/main/.github/workflows/publish.yml)

cd "tldr-python-client-$pkgver"
make -C docs
python -m build --wheel --no-isolation
python -m installer --destdir="$pkgdir" dist/*.whl

I'm not sure what the .gitignore file has to do with the packaging, though. I'm using the distributed tarball in the releases page.

Hi, sorry for the delay, this issue was caused due to this line in the pyproject.toml config:

[tool.hatch.build.targets.wheel.shared-data]
"docs/man" = "share/man/man1"

I have fixed it now with the exact path to the man page:

[tool.hatch.build.targets.wheel.shared-data]
"docs/man/tldr.1" = "share/man/man1/tldr.1"

Image

I will create a release later today along with this fix.