pycontribs / ansi2html

Convert text with ansi color codes to HTML
GNU Lesser General Public License v3.0
389 stars 78 forks source link

Restore man page rendering #202

Closed hartwork closed 10 months ago

hartwork commented 1 year ago

Fixes #193

ssbarnea commented 1 year ago

@hartwork Please review https://github.com/pycontribs/ansi2html/pull/206 -- which brings back the man page generation. Let me know if it works fine or we need to tune it a little bit more.

What is annoying is that we do not have any test that ensures that the manpage is present and that can be installed as python packaging does not allow installation of manpages (due to being outside the package).

hartwork commented 1 year ago

What is annoying is that we do not have any test that ensures that the manpage is present and that can be installed as python packaging does not allow installation of manpages (due to being outside the package).

@ssbarnea man page installation is possible from Python packages, e.g. see https://github.com/hartwork/git-delete-merged-branches/blob/070cb0783694d409d6a08a266001c3ad444395d5/setup.py#L59-L62 for a real-life example.

ssbarnea commented 1 year ago

@hartwork Let me rephrase: using the deprecated setup.py you could install it but that is not supported by any current packaging standards and goes against them, as it is known as a security risk and also a source of messing distribution files as the file might be overridden or left-over when package is removed.

hartwork commented 1 year ago

@ssbarnea

I cannot confirm that pip would leave behind man pages on removal, see:

# cd "$(mktemp -d)"
# virtualenv --python=python3.11 venv
# source venv/bin/activate
# pip install git-delete-merged-branches
# find -name \*.1 | tee /dev/stderr | wc -l
./venv/share/man/man1/git-dmb.1
./venv/share/man/man1/git-delete-merged-branches.1
2
# pip uninstall --yes git-delete-merged-branches
# find -name \*.1 | tee /dev/stderr | wc -l
0
hartwork commented 1 year ago

Re-opening while #206 is not ready…

ssbarnea commented 11 months ago

@hartwork Please rebase.

hartwork commented 11 months ago

@hartwork Please rebase.

@ssbarnea coming up in a minute…

hartwork commented 11 months ago

@hartwork Please rebase.

@ssbarnea done, CI is all green.

hartwork commented 10 months ago

My arguments at https://github.com/pycontribs/ansi2html/pull/202/files#r1422642651 are being ignored, so I'll be closing this as not going anywhere…