From: Stuart Henderson Subject: Re: [NEW] textproc/py-retext, textproc/py-markups, textproc/py-mdx_math To: Landry Breuil Cc: Pedro Almeida , ports@openbsd.org Date: Mon, 17 Nov 2025 18:01:22 +0000 On 2025/11/17 16:05, Landry Breuil wrote: > Le Mon, Nov 17, 2025 at 12:44:27AM +0000, Pedro Almeida a écrit : > > Hi! > > > > Please find attached a functional port for ReText, and two direct > > dependencies. > > > > ReText is a simple but powerful editor for markup languages. It is based on > > Markups module which supports Markdown, reStructuredText, Textile and > > AsciiDoc. One can also add support for custom markups using Python modules. > > > > Markups has 4 wrappers for markup languages available "by default": > > Markdown, reStructuredText, Textile and AsciiDoc, which introduces a second > > level dependencies. > > Three of them were trivial to include since they already been ported. > > For the forth, Textile, the dependcy tree is kind of "heavy" and have being > > a challenge to me for some time now. > > from what i can see at https://pypi.org/project/textile/ it needs 'nh3' > and 'regex'. only nh3 is missing in the portstree. > > > Since the port of ReText is functional for the other three, is there any > > possibility to list this dependency as optional? > > either as a comment in the Makefile, or eventually in the DESCR. > > or you could also add @comment in from the the textile-related lines in > the PLIST for markups, this way support for it isnt advertized. > > for markups, maybe the default HOMEPAGE ( https://pypi.org/project/Markups/) or > https://pymarkups.readthedocs.io/en/latest/ would be better than github ?) > > the tests run fine for markups. > > mdx-math still had a trailing dot for COMMENT, and an unneeded empty > REVISION. > > retext needs RUN_DEPENDS on x11/gtk+4,guic for the gtk-update-icon-cache > @tag line, and i dont think you need wheel and packaging in RUN_DEPENDS > (wheel will automatically be in BUILD_DEPENDS via > MODPY_PYBUILD=setuptools) > > maybe it could use a RUN_DEPENDS on pyqt6-webengine, enchant and > chardet, depending on which features they add ? webengine seems to be > used for some preview.. > > [project.optional-dependencies] > spellcheck = ["pyenchant"] > encoding-detection = ["chardet"] > webengine = ["PyQt6-WebEngine"] > > other than that, i've briefly tested retext and it looks nice > feature-wise, great addition. > > Landry > I've attached an updated set of ports incorporating this and some of my changes; common: - use "make makesum" to generate distinfo, we don't use hex SHA256 - don't repeat HOMEPAGE in DESCR, it is added automatically - flesh out DESCR a little more - add name to MAINTAINER line retext: - rename py-retext to retext, as is normally done for standalone software (py-* is more for "libraries") - don't bother patching pyproject.toml for the setuptools whining, there is lots more of this in the tree - add dep on Pygments; pyproject.toml says that it is required not optional - add enchant/chardet as RDEPs; they're optional but seem like they'd be fairly useful (and we're already pulling in various optional things for all the various Markups backends) mdx_math: - rename to stick to pypi name (python-markdown-math) - set MODPY_PYTEST_ARGS to actually run tests markups: - add missing RDEPs, add comments showing what they're needed for We could add py-textile later and then either just list as an optional dep in DESCR, or add it as a required dep (on !rust archs at least; nh3 uses rust). I'm waiting for my laptop to update to py313 packages so haven't actually tested runtime yet. Will do that later. But unless testing shows up problems I think this is in reasonable shape.